Enable sandbox and contextIsolation for process explorer when running with --__sandbox (#102924)

* sandbox - allow to enable sandbox and contextIsolation for process explorer

* fix asar lookup
This commit is contained in:
Benjamin Pasero
2020-07-20 10:30:20 +02:00
committed by GitHub
parent 040b60f4d1
commit e5b3ff76ba
13 changed files with 202 additions and 84 deletions

View File

@@ -43,12 +43,12 @@ export class SharedProcess implements ISharedProcess {
backgroundColor: this.themeMainService.getBackgroundColor(),
webPreferences: {
preload: URI.parse(require.toUrl('vs/base/parts/sandbox/electron-browser/preload.js')).fsPath,
images: false,
nodeIntegration: true,
webgl: false,
enableWebSQL: false,
enableRemoteModule: false,
nativeWindowOpen: true,
images: false,
webgl: false,
disableBlinkFeatures: 'Auxclick' // do NOT change, allows us to identify this window as shared-process in the process explorer
}
});

View File

@@ -168,10 +168,10 @@ export class CodeWindow extends Disposable implements ICodeWindow {
webPreferences: {
preload: URI.parse(this.doGetPreloadUrl()).fsPath,
nodeIntegration: true,
webviewTag: true,
enableWebSQL: false,
enableRemoteModule: false,
nativeWindowOpen: true,
webviewTag: true,
zoomFactor: zoomLevelToZoomFactor(windowConfig?.zoomLevel)
}
};