fix: illegal access errors with nodeIntegrationInSubFrames (#29093)

This commit is contained in:
Shelley Vohr 2021-05-14 13:36:15 +02:00 committed by GitHub
parent 4073599f59
commit b7a23450b7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 104 additions and 4 deletions

View file

@ -209,8 +209,10 @@ void ElectronSandboxedRendererClient::DidCreateScriptContext(
bool is_main_frame = render_frame->IsMainFrame();
bool is_devtools =
IsDevTools(render_frame) || IsDevToolsExtension(render_frame);
bool allow_node_in_sub_frames =
render_frame->GetBlinkPreferences().node_integration_in_sub_frames;
bool should_load_preload =
(is_main_frame || is_devtools || allow_node_in_sub_frames) &&
!IsWebViewFrame(context, render_frame);