register ExtHostExtensionService as singleton

This commit is contained in:
Johannes Rieken
2019-08-08 12:53:01 +02:00
parent 90f79e1a2a
commit 66b499a016
8 changed files with 50 additions and 49 deletions

View File

@@ -3,8 +3,9 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { MainContext, MainThreadStorageShape, IMainContext, ExtHostStorageShape } from './extHost.protocol';
import { MainContext, MainThreadStorageShape, ExtHostStorageShape } from './extHost.protocol';
import { Emitter } from 'vs/base/common/event';
import { IExtHostRpcService } from 'vs/workbench/api/common/rpcService';
export interface IStorageChangeEvent {
shared: boolean;
@@ -19,7 +20,7 @@ export class ExtHostStorage implements ExtHostStorageShape {
private _onDidChangeStorage = new Emitter<IStorageChangeEvent>();
readonly onDidChangeStorage = this._onDidChangeStorage.event;
constructor(mainContext: IMainContext) {
constructor(mainContext: IExtHostRpcService) {
this._proxy = mainContext.getProxy(MainContext.MainThreadStorage);
}