mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-27 03:54:24 +01:00
sandbox - self invoke functions for shared process, issues and process explorer
This commit is contained in:
@@ -6,28 +6,40 @@
|
||||
//@ts-check
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* @type {{ load: (modules: string[], resultCallback: (result, configuration: object) => any, options?: object) => unknown }}
|
||||
*/
|
||||
const bootstrapWindow = (() => {
|
||||
// @ts-ignore (defined in bootstrap-window.js)
|
||||
return window.MonacoBootstrapWindow;
|
||||
})();
|
||||
(function () {
|
||||
const bootstrap = bootstrapLib();
|
||||
const bootstrapWindow = bootstrapWindowLib();
|
||||
|
||||
/**
|
||||
* @type {{ avoidMonkeyPatchFromAppInsights: () => void; }}
|
||||
*/
|
||||
const bootstrap = (() => {
|
||||
// @ts-ignore (defined in bootstrap.js)
|
||||
return window.MonacoBootstrap;
|
||||
})();
|
||||
// Avoid Monkey Patches from Application Insights
|
||||
bootstrap.avoidMonkeyPatchFromAppInsights();
|
||||
|
||||
// Avoid Monkey Patches from Application Insights
|
||||
bootstrap.avoidMonkeyPatchFromAppInsights();
|
||||
|
||||
bootstrapWindow.load(['vs/code/electron-browser/sharedProcess/sharedProcessMain'], function (sharedProcess, configuration) {
|
||||
sharedProcess.startup({
|
||||
machineId: configuration.machineId,
|
||||
windowId: configuration.windowId
|
||||
// Load shared process into window
|
||||
bootstrapWindow.load(['vs/code/electron-browser/sharedProcess/sharedProcessMain'], function (sharedProcess, configuration) {
|
||||
sharedProcess.startup({
|
||||
machineId: configuration.machineId,
|
||||
windowId: configuration.windowId
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
//#region Globals
|
||||
|
||||
/**
|
||||
* @returns {{ avoidMonkeyPatchFromAppInsights: () => void; }}
|
||||
*/
|
||||
function bootstrapLib() {
|
||||
// @ts-ignore (defined in bootstrap.js)
|
||||
return window.MonacoBootstrap;
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {{ load: (modules: string[], resultCallback: (result, configuration: object) => any, options?: object) => unknown }}
|
||||
*/
|
||||
function bootstrapWindowLib() {
|
||||
// @ts-ignore (defined in bootstrap-window.js)
|
||||
return window.MonacoBootstrapWindow;
|
||||
}
|
||||
|
||||
//#endregion
|
||||
|
||||
}());
|
||||
|
||||
Reference in New Issue
Block a user