mirror of
https://github.com/coder/code-server.git
synced 2025-07-31 22:13:52 +08:00
chore(vscode): update to 1.54.2
This commit is contained in:
13
lib/vscode/src/bootstrap.js
vendored
13
lib/vscode/src/bootstrap.js
vendored
@ -170,6 +170,9 @@
|
||||
return nlsConfig;
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {typeof import('./vs/base/parts/sandbox/electron-sandbox/globals') | undefined}
|
||||
*/
|
||||
function safeGlobals() {
|
||||
const globals = (typeof self === 'object' ? self : typeof global === 'object' ? global : {});
|
||||
|
||||
@ -177,7 +180,7 @@
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {NodeJS.Process | undefined}
|
||||
* @returns {import('./vs/base/parts/sandbox/electron-sandbox/globals').IPartialNodeProcess | NodeJS.Process}
|
||||
*/
|
||||
function safeProcess() {
|
||||
if (typeof process !== 'undefined') {
|
||||
@ -188,16 +191,20 @@
|
||||
if (globals) {
|
||||
return globals.process; // Native environment (sandboxed)
|
||||
}
|
||||
|
||||
return undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {Electron.IpcRenderer | undefined}
|
||||
* @returns {import('./vs/base/parts/sandbox/electron-sandbox/electronTypes').IpcRenderer | undefined}
|
||||
*/
|
||||
function safeIpcRenderer() {
|
||||
const globals = safeGlobals();
|
||||
if (globals) {
|
||||
return globals.ipcRenderer;
|
||||
}
|
||||
|
||||
return undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -236,7 +243,7 @@
|
||||
}
|
||||
|
||||
//#endregion
|
||||
|
||||
|
||||
|
||||
//#region ApplicationInsights
|
||||
|
||||
|
Reference in New Issue
Block a user