Unregister webview reviver on dispose

Part of #48065
This commit is contained in:
Matt Bierner
2018-04-17 10:03:33 -07:00
parent ea680fae1c
commit f2a2f394c7

View File

@@ -53,10 +53,11 @@ export class MainThreadWebviews implements MainThreadWebviewsShape, WebviewReviv
this._proxy = context.getProxy(ExtHostContext.ExtHostWebviews);
editorGroupService.onEditorsChanged(this.onEditorsChanged, this, this._toDispose);
_webviewService.registerReviver(MainThreadWebviews.viewType, this);
this._toDispose.push(lifecycleService.onWillShutdown(e => {
this._toDispose.push(_webviewService.registerReviver(MainThreadWebviews.viewType, this));
lifecycleService.onWillShutdown(e => {
e.veto(this._onWillShutdown());
}));
}, this, this._toDispose);
}
dispose(): void {