mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-25 02:58:56 +01:00
Merge branch 'lifecycle'
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
|
||||
import URI from 'vs/base/common/uri';
|
||||
import Event, {Emitter} from 'vs/base/common/event';
|
||||
import {IDisposable, disposeAll} from 'vs/base/common/lifecycle';
|
||||
import {IDisposable, dispose} from 'vs/base/common/lifecycle';
|
||||
import {TPromise} from 'vs/base/common/winjs.base';
|
||||
import {Remotable, IThreadService} from 'vs/platform/thread/common/thread';
|
||||
import {ExtHostModelService, ExtHostDocumentData} from 'vs/workbench/api/node/extHostDocuments';
|
||||
@@ -508,10 +508,10 @@ export class MainThreadEditors {
|
||||
|
||||
public dispose(): void {
|
||||
Object.keys(this._textEditorsListenersMap).forEach((editorId) => {
|
||||
disposeAll(this._textEditorsListenersMap[editorId]);
|
||||
dispose(this._textEditorsListenersMap[editorId]);
|
||||
});
|
||||
this._textEditorsListenersMap = Object.create(null);
|
||||
this._toDispose = disposeAll(this._toDispose);
|
||||
this._toDispose = dispose(this._toDispose);
|
||||
}
|
||||
|
||||
private _onTextEditorAdd(textEditor: MainThreadTextEditor): void {
|
||||
@@ -537,7 +537,7 @@ export class MainThreadEditors {
|
||||
|
||||
private _onTextEditorRemove(textEditor: MainThreadTextEditor): void {
|
||||
let id = textEditor.getId();
|
||||
disposeAll(this._textEditorsListenersMap[id]);
|
||||
dispose(this._textEditorsListenersMap[id]);
|
||||
delete this._textEditorsListenersMap[id];
|
||||
delete this._textEditorsMap[id];
|
||||
this._proxy._acceptTextEditorRemove(id);
|
||||
|
||||
Reference in New Issue
Block a user