mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 02:28:34 +01:00
Use native JS Proxy for main <-> ext host proxies
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user