🚀 sandbox - enable by default and remove setting 🚀 (#181638)

* sandbox - enable by default and remove setting

* remove more

* set flags again

* fix lint

* more cleanup
This commit is contained in:
Benjamin Pasero
2023-05-12 13:36:29 +02:00
committed by GitHub
parent 424388032a
commit 8a652f9380
28 changed files with 65 additions and 388 deletions

22
src/bootstrap-fork.js vendored
View File

@@ -235,26 +235,16 @@ function terminateWhenParentTerminates() {
}
}
// TODO@bpasero remove this when sandbox is final
function configureCrashReporter() {
const crashReporterSandboxedHint = process.env['VSCODE_CRASH_REPORTER_SANDBOXED_HINT'];
if (crashReporterSandboxedHint) {
addCrashReporterParameter('_sandboxed', 'true');
}
const crashReporterProcessType = process.env['VSCODE_CRASH_REPORTER_PROCESS_TYPE'];
if (crashReporterProcessType) {
addCrashReporterParameter('processType', crashReporterProcessType);
}
}
function addCrashReporterParameter(key, value) {
try {
if (process['crashReporter'] && typeof process['crashReporter'].addExtraParameter === 'function' /* Electron only */) {
process['crashReporter'].addExtraParameter(key, value);
try {
if (process['crashReporter'] && typeof process['crashReporter'].addExtraParameter === 'function' /* Electron only */) {
process['crashReporter'].addExtraParameter('processType', crashReporterProcessType);
}
} catch (error) {
console.error(error);
}
} catch (error) {
console.error(error);
}
}