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

@ -137,9 +137,13 @@ void RendererClientBase::DidCreateScriptContext(
global.SetHidden("contextId", context_id);
}
void RendererClientBase::AddRenderBindings(
v8::Isolate* isolate,
v8::Local<v8::Object> binding_object) {}
void RendererClientBase::BindProcess(v8::Isolate* isolate,
gin_helper::Dictionary* process,
content::RenderFrame* render_frame) {
process->SetReadOnly("isMainFrame", render_frame->IsMainFrame());
process->SetReadOnly("contextIsolation",
render_frame->GetBlinkPreferences().context_isolation);
}
void RendererClientBase::RenderThreadStarted() {
auto* command_line = base::CommandLine::ForCurrentProcess();