提交 3e78e05f 编写于 作者: B Benjamin Pasero

electron 3.0.x - --no-untrusted-code-mitigations does not seem to do anything

上级 2d0492fd
......@@ -175,14 +175,6 @@ function resolveJSFlags(cliArgs, ...jsFlags) {
jsFlags.push(`--max_old_space_size=${cliArgs['max-memory']}`);
}
// Since Electron 3 we use a V8 version that comes with untrusted code mitigations
// enabled by default (https://v8.dev/docs/untrusted-code-mitigations). This comes
// at a performance cost according to the blog. Since we do not execute untrusted
// code, we disable these mitigations.
// TODO@Ben revisit this for later Electron versions, search for more usages of
// --no-untrusted-code-mitigations
jsFlags.push('--no-untrusted-code-mitigations');
return jsFlags.length > 0 ? jsFlags.join(' ') : null;
}
......
......@@ -196,11 +196,6 @@ export class Client implements IChannelClient, IDisposable {
forkOpts.execArgv = ['--nolazy', '--inspect-brk=' + this.options.debugBrk];
}
if (!Array.isArray(forkOpts.execArgv)) {
forkOpts.execArgv = [];
}
forkOpts.execArgv.push('--no-untrusted-code-mitigations');
this.child = fork(this.modulePath, args, forkOpts);
const onMessageEmitter = new Emitter<Buffer>();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册