Use native JS Proxy for main <-> ext host proxies

This commit is contained in:
Alex Dima
2016-06-26 15:09:42 +02:00
parent 04faa2e4c1
commit 10cae007cd
30 changed files with 514 additions and 279 deletions

View File

@@ -5,17 +5,18 @@
'use strict';
import {TPromise} from 'vs/base/common/winjs.base';
import {Remotable, IThreadService} from 'vs/platform/thread/common/thread';
import {IThreadService} from 'vs/platform/thread/common/thread';
import {IModeService} from 'vs/editor/common/services/modeService';
import {MainContext} from './extHostProtocol';
export class ExtHostLanguages {
private _proxy: MainThreadLanguages;
constructor(
@IThreadService threadService: IThreadService
threadService: IThreadService
) {
this._proxy = threadService.getRemotable(MainThreadLanguages);
this._proxy = threadService.get(MainContext.MainThreadLanguages);
}
getLanguages(): TPromise<string[]> {
@@ -23,7 +24,6 @@ export class ExtHostLanguages {
}
}
@Remotable.MainContext('MainThreadLanguages')
export class MainThreadLanguages {
private _modeService: IModeService;