Merge VS Code 1.31.1 (#4283)

This commit is contained in:
Matt Irvine
2019-03-15 13:09:45 -07:00
committed by GitHub
parent 7d31575149
commit 86bac90001
1716 changed files with 53308 additions and 48375 deletions

View File

@@ -37,7 +37,7 @@ export class InstantiationService implements IInstantiationService {
let _trace = Trace.traceInvocation(fn);
let _done = false;
try {
let accessor = {
const accessor: ServicesAccessor = {
get: <T>(id: ServiceIdentifier<T>, isOptional?: typeof optional) => {
if (_done) {
@@ -51,7 +51,7 @@ export class InstantiationService implements IInstantiationService {
return result;
}
};
return fn.apply(undefined, [accessor].concat(args));
return fn.apply(undefined, [accessor, ...args]);
} finally {
_done = true;
_trace.stop();
@@ -186,7 +186,7 @@ export class InstantiationService implements IInstantiationService {
for (let { data } of roots) {
// create instance and overwrite the service collections
const instance = this._createServiceInstanceWithOwner(data.id, data.desc.ctor, data.desc.staticArguments, false, data._trace);
const instance = this._createServiceInstanceWithOwner(data.id, data.desc.ctor, data.desc.staticArguments, data.desc.supportsDelayedInstantiation, data._trace);
this._setServiceInstance(data.id, instance);
graph.removeNode(data);
}
@@ -205,7 +205,7 @@ export class InstantiationService implements IInstantiationService {
}
}
protected _createServiceInstance<T>(ctor: any, args: any[] = [], supportsDelayedInstantiation: boolean, _trace: Trace): T {
protected _createServiceInstance<T>(ctor: any, args: any[] = [], _supportsDelayedInstantiation: boolean, _trace: Trace): T {
return this._createInstance(ctor, args, _trace);
}
}