feat: add process.contextIsolation property (#28030)

This commit is contained in:
Milan Burda 2021-03-17 19:23:29 +01:00 committed by GitHub
parent 485fa5bea9
commit fc7f2042ec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 40 additions and 12 deletions

View file

@ -146,9 +146,8 @@ void ElectronRendererClient::DidCreateScriptContext(
// Add Electron extended APIs.
electron_bindings_->BindTo(env->isolate(), env->process_object());
AddRenderBindings(env->isolate(), env->process_object());
gin_helper::Dictionary process_dict(env->isolate(), env->process_object());
process_dict.SetReadOnly("isMainFrame", render_frame->IsMainFrame());
BindProcess(env->isolate(), &process_dict, render_frame);
// Load everything.
node_bindings_->LoadEnvironment(env);