@@ -37,7 +37,6 @@ import { registerNotificationCommands } from 'vs/workbench/browser/parts/notific
3737import { NotificationsToasts } from 'vs/workbench/browser/parts/notifications/notificationsToasts' ;
3838import { IEditorService , IResourceEditor } from 'vs/workbench/services/editor/common/editorService' ;
3939import { IEditorGroupsService } from 'vs/workbench/services/editor/common/editorGroupsService' ;
40- import { IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService' ;
4140import { setARIAContainer } from 'vs/base/browser/ui/aria/aria' ;
4241import { restoreFontInfo , readFontInfo , saveFontInfo } from 'vs/editor/browser/config/configuration' ;
4342import { BareFontInfo } from 'vs/editor/common/config/fontInfo' ;
@@ -82,7 +81,7 @@ export class Workbench extends Layout {
8281 setUnexpectedErrorHandler ( error => this . handleUnexpectedError ( error , logService ) ) ;
8382
8483 // Inform user about loading issues from the loader
85- ( < any > self ) . require . config ( {
84+ ( < any > window ) . require . config ( {
8685 onError : err => {
8786 if ( err . errorCode === 'load' ) {
8887 onUnexpectedError ( new Error ( localize ( 'loaderErrorNative' , "Failed to load a required file. Please restart the application to try again. Details: {0}" , JSON . stringify ( err ) ) ) ) ;
@@ -140,7 +139,7 @@ export class Workbench extends Layout {
140139 this . initLayout ( accessor ) ;
141140
142141 // Registries
143- this . initRegistries ( accessor ) ;
142+ this . startRegistries ( accessor ) ;
144143
145144 // Context Keys
146145 this . _register ( instantiationService . createInstance ( WorkbenchContextKeysHandler ) ) ;
@@ -185,17 +184,15 @@ export class Workbench extends Layout {
185184 serviceCollection . set ( contributedService . id , contributedService . descriptor ) ;
186185 }
187186
188- const instantationServie = new InstantiationService ( serviceCollection , true ) ;
187+ const instantiationService = new InstantiationService ( serviceCollection , true ) ;
189188
190189 // Wrap up
191- instantationServie . invokeFunction ( accessor => {
190+ instantiationService . invokeFunction ( accessor => {
192191 const lifecycleService = accessor . get ( ILifecycleService ) ;
193192
194- // TODO@Ben TODO@Sandeep TODO@Martin debt around cyclic dependencies
193+ // TODO@Ben TODO@Sandeep debt around cyclic dependencies
195194 const fileService = accessor . get ( IFileService ) ;
196- const instantiationService = accessor . get ( IInstantiationService ) ;
197195 const configurationService = accessor . get ( IConfigurationService ) as any ;
198- const themeService = accessor . get ( IWorkbenchThemeService ) as any ;
199196
200197 if ( typeof configurationService . acquireFileService === 'function' ) {
201198 configurationService . acquireFileService ( fileService ) ;
@@ -205,18 +202,14 @@ export class Workbench extends Layout {
205202 configurationService . acquireInstantiationService ( instantiationService ) ;
206203 }
207204
208- if ( typeof themeService . acquireFileService === 'function' ) {
209- themeService . acquireFileService ( fileService ) ;
210- }
211-
212205 // Signal to lifecycle that services are set
213206 lifecycleService . phase = LifecyclePhase . Ready ;
214207 } ) ;
215208
216- return instantationServie ;
209+ return instantiationService ;
217210 }
218211
219- private initRegistries ( accessor : ServicesAccessor ) : void {
212+ private startRegistries ( accessor : ServicesAccessor ) : void {
220213 Registry . as < IActionBarRegistry > ( ActionBarExtensions . Actionbar ) . start ( accessor ) ;
221214 Registry . as < IWorkbenchContributionsRegistry > ( WorkbenchExtensions . Workbench ) . start ( accessor ) ;
222215 Registry . as < IEditorInputFactoryRegistry > ( EditorExtensions . EditorInputFactories ) . start ( accessor ) ;
@@ -347,7 +340,7 @@ export class Workbench extends Layout {
347340 logService : ILogService ,
348341 lifecycleService : ILifecycleService
349342 ) : Promise < void > {
350- const restorePromises : Promise < any > [ ] = [ ] ;
343+ const restorePromises : Promise < void > [ ] = [ ] ;
351344
352345 // Restore editors
353346 mark ( 'willRestoreEditors' ) ;
0 commit comments