diff --git a/src/vs/base/common/worker/workerClient.ts b/src/vs/base/common/worker/workerClient.ts index 9e88a1f4c0e..32fcd8bccf3 100644 --- a/src/vs/base/common/worker/workerClient.ts +++ b/src/vs/base/common/worker/workerClient.ts @@ -39,7 +39,6 @@ export class WorkerClient { private _lastMessageId:number; private _promises:{[id:string]:IActiveRequest;}; - private _messageHandlers:{[type:string]:(payload:any)=>void;}; private _workerId:number; private _worker:IWorker; @@ -57,7 +56,6 @@ export class WorkerClient { this._decodeMessageName = decodeMessageName; this._lastMessageId = 0; this._promises = {}; - this._messageHandlers= {}; this._messagesQueue = []; this._processQueueTimeout = -1; @@ -152,14 +150,6 @@ export class WorkerClient { this._worker.terminate(); } - public addMessageHandler(message:string, handler:(payload:any)=>void): void { - this._messageHandlers[message]= handler; - } - - public removeMessageHandler(message:string): void { - delete this._messageHandlers[message]; - } - private _sendMessage(type:string, payload:any, forceTimestamp:number=(new Date()).getTime()):TPromise { let msg = { @@ -359,10 +349,6 @@ export class WorkerClient { return this._invokeHandler(this[msg.type], this, msg.payload); } - if (typeof this._messageHandlers[msg.type] === 'function') { - return this._invokeHandler(this._messageHandlers[msg.type], null, msg.payload); - } - this._onError('Received unexpected message from Worker:', msg); return TPromise.wrapError(new Error('No handler found')); } diff --git a/src/vs/base/common/worker/workerServer.ts b/src/vs/base/common/worker/workerServer.ts index de3592c9c39..c113f04bd2a 100644 --- a/src/vs/base/common/worker/workerServer.ts +++ b/src/vs/base/common/worker/workerServer.ts @@ -213,17 +213,14 @@ export class WorkerServer { } if ((msg.type in this._requestHandler) && (typeof this._requestHandler[msg.type] === 'function')) { - //var now = (new Date()).getTime(); + // var now = (new Date()).getTime(); try { this._requestHandler[msg.type].call(this._requestHandler, this, c, e, p, msg.payload); } catch (handlerError) { e(errors.transformErrorForSerialization(handlerError)); } - //var what = msg.type; - //if (msg.type === 'rawRequest') { - // what += '(' + msg.payload.name + ')'; - //} - //console.info(what + ' took ' + ((new Date().getTime())-now)); + // var what = msg.type; + // console.info(what + ' took ' + ((new Date().getTime())-now)); } else { this._requestHandler.request(this, c, e, p, msg); diff --git a/src/vs/editor/browser/standalone/standaloneServices.ts b/src/vs/editor/browser/standalone/standaloneServices.ts index 3140b171759..a9438038c4f 100644 --- a/src/vs/editor/browser/standalone/standaloneServices.ts +++ b/src/vs/editor/browser/standalone/standaloneServices.ts @@ -181,7 +181,7 @@ export function getOrCreateStaticServices(services?: IEditorOverrideServices): I var messageService = services.messageService || new SimpleServices.SimpleMessageService(); var pluginService = services.pluginService || new SimpleServices.SimplePluginService(); - var markerService = services.markerService || new MarkerService.MarkerService(threadService); + var markerService = services.markerService || new MarkerService.MainProcessMarkerService(threadService); var requestService = services.requestService || new SimpleServices.SimpleEditorRequestService(contextService, telemetryService); var modelService = services.modelService || new ModelServiceImpl(threadService, markerService); diff --git a/src/vs/editor/common/worker/editorWorkerServer.ts b/src/vs/editor/common/worker/editorWorkerServer.ts index 499f5a1cda6..8f1a280614d 100644 --- a/src/vs/editor/common/worker/editorWorkerServer.ts +++ b/src/vs/editor/common/worker/editorWorkerServer.ts @@ -11,7 +11,7 @@ import 'vs/editor/common/modes/abstractModeWorker'; import 'vs/editor/common/languages.common'; import {WorkerServer} from 'vs/base/common/worker/workerServer'; -import {MarkerService} from 'vs/platform/markers/common/markerService'; +import {SecondaryMarkerService} from 'vs/platform/markers/common/markerService'; import {WorkerThreadService} from 'vs/platform/thread/common/workerThreadService'; import InstantiationService = require('vs/platform/instantiation/common/instantiationService'); import {EventService} from 'vs/platform/event/common/eventService'; @@ -98,15 +98,13 @@ export class EditorWorkerServer { var contextService = new BaseWorkspaceContextService(initData.contextService.workspace, initData.contextService.configuration, initData.contextService.options); - this.threadService = new WorkerThreadService(initData.threadService, mainThread.getRemoteCom(), (messageName: string, payload: any) => { - return mainThread.request(messageName, payload); - }); + this.threadService = new WorkerThreadService(initData.threadService, mainThread.getRemoteCom()); this.threadService.setInstantiationService(InstantiationService.create({ threadService: this.threadService })); var telemetryServiceInstance = new WorkerTelemetryService(this.threadService); var resourceService = new ResourceService(); - var markerService = new MarkerService(this.threadService); + var markerService = new SecondaryMarkerService(this.threadService); var modeService = new ModeServiceImpl(this.threadService, pluginService); diff --git a/src/vs/languages/css/test/common/css-worker.test.ts b/src/vs/languages/css/test/common/css-worker.test.ts index f67deda48cc..81496ee139c 100644 --- a/src/vs/languages/css/test/common/css-worker.test.ts +++ b/src/vs/languages/css/test/common/css-worker.test.ts @@ -32,7 +32,7 @@ suite('Validation - CSS', () => { var url = URI.parse('inmemory://localhost/vs/editor/common/model/mirrorModel/1'); var mirrorModel:any= mockMirrorModel(source, url); - var markerService = new MarkerService.MarkerService(NULL_THREAD_SERVICE); + var markerService = new MarkerService.MainProcessMarkerService(NULL_THREAD_SERVICE); var resourceService = new ResourceService.ResourceService(); resourceService.insert(url, mirrorModel); @@ -55,7 +55,7 @@ suite('Validation - CSS', () => { var model = mockMirrorModel(content, url); resourceService.insert(url, model); - var markerService = new MarkerService.MarkerService(NULL_THREAD_SERVICE); + var markerService = new MarkerService.MainProcessMarkerService(NULL_THREAD_SERVICE); let services = servicesUtil2.createMockEditorWorkerServices({ resourceService: resourceService, diff --git a/src/vs/languages/html/test/common/html-worker.test.ts b/src/vs/languages/html/test/common/html-worker.test.ts index 15b4e3b1708..aec44ac311d 100644 --- a/src/vs/languages/html/test/common/html-worker.test.ts +++ b/src/vs/languages/html/test/common/html-worker.test.ts @@ -37,7 +37,7 @@ suite('HTML - worker', () => { var model = mm.createMirrorModelFromString(null, 0, content, mode, url); resourceService.insert(url, model); - var markerService = new MarkerService.MarkerService(NULL_THREAD_SERVICE); + var markerService = new MarkerService.MainProcessMarkerService(NULL_THREAD_SERVICE); let services = servicesUtil2.createMockEditorWorkerServices({ resourceService: resourceService, diff --git a/src/vs/languages/typescript.workbench/test/common/projectResolver.test.ts b/src/vs/languages/typescript.workbench/test/common/projectResolver.test.ts index 6351ef4b3e9..b94c6c545df 100644 --- a/src/vs/languages/typescript.workbench/test/common/projectResolver.test.ts +++ b/src/vs/languages/typescript.workbench/test/common/projectResolver.test.ts @@ -188,7 +188,7 @@ var instantiationService: IInstantiationService; function setup() { instantiationService = instantiation.create({ eventService: new eventEmitter.EventEmitter(), - markerService: new markerService.MarkerService(NULL_THREAD_SERVICE), + markerService: new markerService.MainProcessMarkerService(NULL_THREAD_SERVICE), fileService: createFileService(), searchService: createSearchService(), messageService: createMessageService(), diff --git a/src/vs/platform/markers/common/markerService.ts b/src/vs/platform/markers/common/markerService.ts index a8811f9d937..e1ae4e6005c 100644 --- a/src/vs/platform/markers/common/markerService.ts +++ b/src/vs/platform/markers/common/markerService.ts @@ -11,8 +11,7 @@ import collections = require('vs/base/common/collections'); import URI from 'vs/base/common/uri'; import Event, {Emitter} from 'vs/base/common/event'; import Severity from 'vs/base/common/severity'; -import {IThreadService, IThreadSynchronizableObject} from 'vs/platform/thread/common/thread'; -import {MainThreadAttr} from 'vs/platform/thread/common/threadService'; +import {Remotable, IThreadService} from 'vs/platform/thread/common/thread'; import {IMarkerService, IMarkerData, IResourceMarker, IMarker, MarkerStatistics} from './markers'; interface Key { @@ -49,42 +48,23 @@ export interface MarkerData { [k: string]: IMarkerData[]; } -export class MarkerService implements IMarkerService, IThreadSynchronizableObject { + +export abstract class MarkerService implements IMarkerService { public serviceId = IMarkerService; private _data: { [k: string]: IMarkerData[] }; private _stats: MarkerStatistics; private _onMarkerChanged: Emitter; - constructor(threadService: IThreadService) { + constructor() { this._data = Object.create(null); this._stats = this._emptyStats(); this._onMarkerChanged = new Emitter(); - threadService.registerInstance(this); - } - - // ---- IThreadSynchronizableObject ------------------------------ - - public getId(): string { - return '__markerService'; - } - - public getSerializableState(): MarkerData { - return this._data; - } - - public setData(data: MarkerData): void { - this._data = data; } public getStatistics(): MarkerStatistics { return this._stats; } - // ---- Threading attributes to invoke functions everywhere ------ - - static $changeOne = MainThreadAttr(MarkerService, MarkerService.prototype.changeOne); - static $changeAll = MainThreadAttr(MarkerService, MarkerService.prototype.changeAll); - // ---- IMarkerService ------------------------------------------ public get onMarkerChanged(): Event { @@ -306,4 +286,40 @@ export class MarkerService implements IMarkerService, IThreadSynchronizableObjec data.endLineNumber = data.endLineNumber >= data.startLineNumber ? data.endLineNumber : data.startLineNumber; data.endColumn = data.endColumn > 0 ? data.endColumn : data.startColumn; } -} \ No newline at end of file +} + +export class SecondaryMarkerService extends MarkerService { + + private _proxy: MainProcessMarkerService; + + constructor(threadService: IThreadService) { + super(); + this._proxy = threadService.getRemotable(MainProcessMarkerService); + } + + public changeOne(owner: string, resource: URI, markers: IMarkerData[]): void { + this._proxy.changeOne(owner, resource, markers); + } + + public changeAll(owner: string, data: IResourceMarker[]): void { + this._proxy.changeAll(owner, data); + } + +} + +@Remotable.MainContext('MainProcessMarkerService') +export class MainProcessMarkerService extends MarkerService { + + constructor(threadService: IThreadService) { + super(); + threadService.registerRemotableInstance(MainProcessMarkerService, this); + } + + public changeOne(owner: string, resource: URI, markers: IMarkerData[]): void { + super.changeOne(owner, resource, markers); + } + + public changeAll(owner: string, data: IResourceMarker[]): void { + super.changeAll(owner, data); + } +} diff --git a/src/vs/platform/markers/test/common/markerService.test.ts b/src/vs/platform/markers/test/common/markerService.test.ts index dab8cff7bfc..fddac4106f7 100644 --- a/src/vs/platform/markers/test/common/markerService.test.ts +++ b/src/vs/platform/markers/test/common/markerService.test.ts @@ -26,7 +26,7 @@ suite('Marker Service', () => { test('query', () => { - let service = new markerService.MarkerService(NULL_THREAD_SERVICE); + let service = new markerService.MainProcessMarkerService(NULL_THREAD_SERVICE); service.changeAll('far', [{ resource: URI.parse('file:///c/test/file.cs'), @@ -52,7 +52,7 @@ suite('Marker Service', () => { test('changeOne override', () => { - let service = new markerService.MarkerService(NULL_THREAD_SERVICE); + let service = new markerService.MainProcessMarkerService(NULL_THREAD_SERVICE); service.changeOne('far', URI.parse('/path/only.cs'), [randomMarkerData()]); assert.equal(service.read().length, 1); assert.equal(service.read({ owner: 'far' }).length, 1); @@ -70,7 +70,7 @@ suite('Marker Service', () => { test('changeOne/All clears', () => { - let service = new markerService.MarkerService(NULL_THREAD_SERVICE); + let service = new markerService.MainProcessMarkerService(NULL_THREAD_SERVICE); service.changeOne('far', URI.parse('/path/only.cs'), [randomMarkerData()]); service.changeOne('boo', URI.parse('/path/only.cs'), [randomMarkerData()]); assert.equal(service.read({ owner: 'far' }).length, 1); @@ -90,7 +90,7 @@ suite('Marker Service', () => { test('changeAll sends event for cleared', () => { - let service = new markerService.MarkerService(NULL_THREAD_SERVICE); + let service = new markerService.MainProcessMarkerService(NULL_THREAD_SERVICE); service.changeAll('far', [{ resource: URI.parse('file:///d/path'), marker: randomMarkerData() @@ -111,7 +111,7 @@ suite('Marker Service', () => { }); test('changeAll merges', () => { - let service = new markerService.MarkerService(NULL_THREAD_SERVICE); + let service = new markerService.MainProcessMarkerService(NULL_THREAD_SERVICE); service.changeAll('far', [{ resource: URI.parse('file:///c/test/file.cs'), diff --git a/src/vs/platform/test/common/nullThreadService.ts b/src/vs/platform/test/common/nullThreadService.ts index 638377168a0..3923e5352ae 100644 --- a/src/vs/platform/test/common/nullThreadService.ts +++ b/src/vs/platform/test/common/nullThreadService.ts @@ -24,10 +24,6 @@ export class NullThreadService extends abstractThreadService.AbstractThreadServi return super._doCreateInstance(params); } - MainThread(obj: IThreadSynchronizableObject, methodName: string, target: Function, params: any[]): winjs.Promise { - return target.apply(obj, params); - } - OneWorker(obj: IThreadSynchronizableObject, methodName: string, target: Function, params: any[], affinity: ThreadAffinity): winjs.Promise { return winjs.TPromise.as(null); } diff --git a/src/vs/platform/thread/common/abstractThreadService.ts b/src/vs/platform/thread/common/abstractThreadService.ts index 1e7d0a0feba..93bb234214b 100644 --- a/src/vs/platform/thread/common/abstractThreadService.ts +++ b/src/vs/platform/thread/common/abstractThreadService.ts @@ -119,10 +119,6 @@ export abstract class AbstractThreadService implements remote.IManyHandler { return instance; } - registerInstance>(instance: T): void { - this._finishInstance(instance); - } - public handle(rpcId: string, methodName: string, args: any[]): any { if (!this._localObjMap[rpcId]) { throw new Error('Unknown actor ' + rpcId); diff --git a/src/vs/platform/thread/common/mainThreadService.ts b/src/vs/platform/thread/common/mainThreadService.ts index f577899e398..aceaf6413bb 100644 --- a/src/vs/platform/thread/common/mainThreadService.ts +++ b/src/vs/platform/thread/common/mainThreadService.ts @@ -169,18 +169,6 @@ export class MainThreadService extends abstractThreadService.AbstractThreadServi options: this._contextService.getOptions() } }); - worker.addMessageHandler('threadService', (msg: any) => { - let identifier = msg.identifier; - let memberName = msg.memberName; - let args = msg.args; - - if (!this._boundObjects.hasOwnProperty(identifier)) { - throw new Error('Object ' + identifier + ' was not found on the main thread.'); - } - - let obj = this._boundObjects[identifier]; - return TPromise.as(obj[memberName].apply(obj, args)); - }); return worker; } @@ -196,10 +184,6 @@ export class MainThreadService extends abstractThreadService.AbstractThreadServi return r; } - MainThread(obj: IThreadSynchronizableObject, methodName: string, target: Function, params: any[]): TPromise { - return target.apply(obj, params); - } - private _getWorkerIndex(obj: IThreadSynchronizableObject, affinity: ThreadAffinity): number { if (affinity === ThreadAffinity.None) { let winners: number[] = [0], diff --git a/src/vs/platform/thread/common/pluginHostThreadService.ts b/src/vs/platform/thread/common/pluginHostThreadService.ts index bb128264d0e..ef55e61dd60 100644 --- a/src/vs/platform/thread/common/pluginHostThreadService.ts +++ b/src/vs/platform/thread/common/pluginHostThreadService.ts @@ -21,10 +21,6 @@ export class PluginHostThreadService extends abstractThreadService.AbstractThrea this._remoteCom.setManyHandler(this); } - MainThread(obj: IThreadSynchronizableObject, methodName: string, target: Function, params: any[]): TPromise { - return target.apply(obj, params); - } - OneWorker(obj: IThreadSynchronizableObject, methodName: string, target: Function, params: any[], affinity: ThreadAffinity): TPromise { return TPromise.as(null); } diff --git a/src/vs/platform/thread/common/thread.ts b/src/vs/platform/thread/common/thread.ts index f740f70de91..7b2801f90ae 100644 --- a/src/vs/platform/thread/common/thread.ts +++ b/src/vs/platform/thread/common/thread.ts @@ -26,7 +26,6 @@ export interface IThreadService { addStatusListener(listener: IThreadServiceStatusListener): void; removeStatusListener(listener: IThreadServiceStatusListener): void; - MainThread(obj: IThreadSynchronizableObject, methodName: string, target: Function, param: any[]): TPromise; OneWorker(obj: IThreadSynchronizableObject, methodName: string, target: Function, param: any[], affinity: ThreadAffinity): TPromise; AllWorkers(obj: IThreadSynchronizableObject, methodName: string, target: Function, param: any[]): TPromise; Everywhere(obj: IThreadSynchronizableObject, methodName: string, target: Function, param: any[]): any; @@ -41,8 +40,6 @@ export interface IThreadService { createInstance>(descriptor: descriptors.AsyncDescriptor2, a1: A1, a2: A2): T; createInstance>(descriptor: descriptors.AsyncDescriptor3, a1: A1, a2: A2, a3: A3): T; - registerInstance>(instance: T): void; - // --- END deprecated methods getRemotable(ctor: instantiation.INewConstructorSignature0): T; diff --git a/src/vs/platform/thread/common/threadService.ts b/src/vs/platform/thread/common/threadService.ts index bf0659207df..bd61b006460 100644 --- a/src/vs/platform/thread/common/threadService.ts +++ b/src/vs/platform/thread/common/threadService.ts @@ -27,13 +27,6 @@ function findThreadService(obj: any): thread.IThreadService { return threadService; } -export function MainThreadAttr(type: Function, target: Function): void { - let methodName = findMember(type.prototype, target); - type.prototype[methodName] = function(...param: any[]) { - return findThreadService(this).MainThread(this, methodName, target, param); - }; -} - export interface IOneWorkerAnnotation { (type: Function, target: Function, affinity?: thread.ThreadAffinity): void; (type: Function, target: Function, condition: () => TPromise, affinity?: thread.ThreadAffinity): void; diff --git a/src/vs/platform/thread/common/workerThreadService.ts b/src/vs/platform/thread/common/workerThreadService.ts index 0195f315dfa..1c5f1bc67ad 100644 --- a/src/vs/platform/thread/common/workerThreadService.ts +++ b/src/vs/platform/thread/common/workerThreadService.ts @@ -10,23 +10,16 @@ import remote = require('vs/base/common/remote'); import {SyncDescriptor0} from 'vs/platform/instantiation/common/descriptors'; import {IThreadService, IThreadServiceStatusListener, IThreadSynchronizableObject, ThreadAffinity} from 'vs/platform/thread/common/thread'; -export interface IMainThreadPublisher { - (messageName: string, payload: any): TPromise; -} - export class WorkerThreadService extends abstractThreadService.AbstractThreadService implements IThreadService { public serviceId = IThreadService; private _mainThreadData: abstractThreadService.IThreadServiceData; - private _publisher: IMainThreadPublisher; protected _remoteCom: remote.IRemoteCom; - constructor(mainThreadData: abstractThreadService.IThreadServiceData, remoteCom: remote.IRemoteCom, workerPublisher: IMainThreadPublisher) { + constructor(mainThreadData: abstractThreadService.IThreadServiceData, remoteCom: remote.IRemoteCom) { super(false); this._mainThreadData = mainThreadData; this._remoteCom = remoteCom; this._remoteCom.setManyHandler(this); - - this._publisher = workerPublisher; } private _handleRequest(identifier: string, memberName: string, args: any[]): TPromise { @@ -72,14 +65,6 @@ export class WorkerThreadService extends abstractThreadService.AbstractThreadSer return super._finishInstance(instance); } - MainThread(obj: IThreadSynchronizableObject, methodName: string, target: Function, params: any[]): TPromise { - return this._publisher('threadService', { - identifier: obj.getId(), - memberName: methodName, - args: params - }); - } - OneWorker(obj: IThreadSynchronizableObject, methodName: string, target: Function, params: any[], affinity: ThreadAffinity): TPromise { return target.apply(obj, params); } diff --git a/src/vs/workbench/electron-browser/shell.ts b/src/vs/workbench/electron-browser/shell.ts index fbc12f325ad..c433914040e 100644 --- a/src/vs/workbench/electron-browser/shell.ts +++ b/src/vs/workbench/electron-browser/shell.ts @@ -43,7 +43,7 @@ import {SearchService} from 'vs/workbench/services/search/node/searchService'; import {LifecycleService} from 'vs/workbench/services/lifecycle/electron-browser/lifecycleService'; import {WorkbenchKeybindingService} from 'vs/workbench/services/keybinding/electron-browser/keybindingService'; import {MainThreadService} from 'vs/workbench/services/thread/electron-browser/threadService'; -import {MarkerService} from 'vs/platform/markers/common/markerService'; +import {MainProcessMarkerService} from 'vs/platform/markers/common/markerService'; import {IActionsService} from 'vs/platform/actions/common/actions'; import ActionsService from 'vs/platform/actions/common/actionsService'; import {IModelService} from 'vs/editor/common/services/modelService'; @@ -267,7 +267,7 @@ export class WorkbenchShell { ); lifecycleService.onShutdown(() => requestService.dispose()); - let markerService = new MarkerService(this.threadService); + let markerService = new MainProcessMarkerService(this.threadService); let pluginService = new MainProcessPluginService(this.contextService, this.threadService, this.messageService, this.telemetryService); this.keybindingService.setPluginService(pluginService); diff --git a/src/vs/workbench/test/node/api/extHostApiCommands.test.ts b/src/vs/workbench/test/node/api/extHostApiCommands.test.ts index d8c8680e540..2497bae5fcb 100644 --- a/src/vs/workbench/test/node/api/extHostApiCommands.test.ts +++ b/src/vs/workbench/test/node/api/extHostApiCommands.test.ts @@ -16,7 +16,7 @@ import * as EditorCommon from 'vs/editor/common/editorCommon'; import {Model as EditorModel} from 'vs/editor/common/model/model'; import {TestThreadService} from './testThreadService' import {create as createInstantiationService} from 'vs/platform/instantiation/common/instantiationService'; -import {MarkerService} from 'vs/platform/markers/common/markerService'; +import {MainProcessMarkerService} from 'vs/platform/markers/common/markerService'; import {IMarkerService} from 'vs/platform/markers/common/markers'; import {IThreadService} from 'vs/platform/thread/common/thread'; import {IKeybindingService} from 'vs/platform/keybinding/common/keybindingService'; @@ -60,7 +60,7 @@ suite('ExtHostLanguageFeatureCommands', function() { return TPromise.as(instantiationService.invokeFunction(handler, args)); } }); - instantiationService.addSingleton(IMarkerService, new MarkerService(threadService)); + instantiationService.addSingleton(IMarkerService, new MainProcessMarkerService(threadService)); instantiationService.addSingleton(IThreadService, threadService); instantiationService.addSingleton(IModelService, { serviceId: IModelService, diff --git a/src/vs/workbench/test/node/api/extHostLanguageFeatures.test.ts b/src/vs/workbench/test/node/api/extHostLanguageFeatures.test.ts index a1539b249ce..85993cee24f 100644 --- a/src/vs/workbench/test/node/api/extHostLanguageFeatures.test.ts +++ b/src/vs/workbench/test/node/api/extHostLanguageFeatures.test.ts @@ -15,7 +15,7 @@ import * as EditorCommon from 'vs/editor/common/editorCommon'; import {Model as EditorModel} from 'vs/editor/common/model/model'; import {TestThreadService} from './testThreadService' import {create as createInstantiationService} from 'vs/platform/instantiation/common/instantiationService'; -import {MarkerService} from 'vs/platform/markers/common/markerService'; +import {MainProcessMarkerService} from 'vs/platform/markers/common/markerService'; import {IMarkerService} from 'vs/platform/markers/common/markers'; import {IThreadService} from 'vs/platform/thread/common/thread'; import {ExtHostLanguageFeatures, MainThreadLanguageFeatures} from 'vs/workbench/api/node/extHostLanguageFeatures'; @@ -56,7 +56,7 @@ suite('ExtHostLanguageFeatures', function() { let instantiationService = createInstantiationService(); threadService = new TestThreadService(instantiationService); - instantiationService.addSingleton(IMarkerService, new MarkerService(threadService)); + instantiationService.addSingleton(IMarkerService, new MainProcessMarkerService(threadService)); instantiationService.addSingleton(IThreadService, threadService); originalErrorHandler = errorHandler.getUnexpectedErrorHandler();