mirror of
https://github.com/Microsoft/vscode
synced 2024-10-30 04:17:37 +00:00
Also fire webview dispose event when dispose is called
This commit is contained in:
parent
165686e333
commit
06c070690e
1 changed files with 3 additions and 1 deletions
|
@ -130,6 +130,8 @@ export class ExtHostWebviewPanel implements vscode.WebviewPanel {
|
|||
}
|
||||
|
||||
this._isDisposed = true;
|
||||
this.onDisposeEmitter.fire();
|
||||
|
||||
this._proxy.$disposeWebview(this._handle);
|
||||
|
||||
this.onDisposeEmitter.dispose();
|
||||
|
@ -255,7 +257,7 @@ export class ExtHostWebviews implements ExtHostWebviewsShape {
|
|||
$onDidDisposeWeview(handle: WebviewHandle): Thenable<void> {
|
||||
const panel = this.getWebviewPanel(handle);
|
||||
if (panel) {
|
||||
panel.onDisposeEmitter.fire();
|
||||
panel.dispose();
|
||||
this._webviewPanels.delete(handle);
|
||||
}
|
||||
return TPromise.as(void 0);
|
||||
|
|
Loading…
Reference in a new issue