mirror of
https://github.com/coder/code-server.git
synced 2026-05-26 22:27:27 +02:00
chore(vscode): update to 1.56.0
This commit is contained in:
18
lib/vscode/src/bootstrap.js
vendored
18
lib/vscode/src/bootstrap.js
vendored
@@ -173,7 +173,7 @@
|
||||
/**
|
||||
* @returns {typeof import('./vs/base/parts/sandbox/electron-sandbox/globals') | undefined}
|
||||
*/
|
||||
function safeGlobals() {
|
||||
function safeSandboxGlobals() {
|
||||
const globals = (typeof self === 'object' ? self : typeof global === 'object' ? global : {});
|
||||
|
||||
return globals.vscode;
|
||||
@@ -183,13 +183,13 @@
|
||||
* @returns {import('./vs/base/parts/sandbox/electron-sandbox/globals').ISandboxNodeProcess | NodeJS.Process}
|
||||
*/
|
||||
function safeProcess() {
|
||||
if (typeof process !== 'undefined') {
|
||||
return process; // Native environment (non-sandboxed)
|
||||
const sandboxGlobals = safeSandboxGlobals();
|
||||
if (sandboxGlobals) {
|
||||
return sandboxGlobals.process; // Native environment (sandboxed)
|
||||
}
|
||||
|
||||
const globals = safeGlobals();
|
||||
if (globals) {
|
||||
return globals.process; // Native environment (sandboxed)
|
||||
if (typeof process !== 'undefined') {
|
||||
return process; // Native environment (non-sandboxed)
|
||||
}
|
||||
|
||||
return undefined;
|
||||
@@ -199,9 +199,9 @@
|
||||
* @returns {import('./vs/base/parts/sandbox/electron-sandbox/electronTypes').IpcRenderer | undefined}
|
||||
*/
|
||||
function safeIpcRenderer() {
|
||||
const globals = safeGlobals();
|
||||
if (globals) {
|
||||
return globals.ipcRenderer;
|
||||
const sandboxGlobals = safeSandboxGlobals();
|
||||
if (sandboxGlobals) {
|
||||
return sandboxGlobals.ipcRenderer;
|
||||
}
|
||||
|
||||
return undefined;
|
||||
|
||||
Reference in New Issue
Block a user