Handle exceptions in webview serialize

This commit is contained in:
Matt Bierner
2018-04-05 19:04:45 -07:00
parent e873a42e27
commit 753b18ddc1

View File

@@ -166,7 +166,9 @@ export class MainThreadWebviews implements MainThreadWebviewsShape, WebviewReviv
const reviveResponses = toRevive.map(handle =>
TPromise.any([
this._proxy.$serializeWebview(handle).then(state => ({ handle, state })),
this._proxy.$serializeWebview(handle).then(
state => ({ handle, state }),
() => ({ handle, state: null })),
TPromise.timeout(MainThreadWebviews.serializeTimeout).then(() => ({ handle, state: null }))
]).then(x => x.value));