fix: don't execute preload scripts for internal <iframe> in <webview> (#19260)

This commit is contained in:
Milan Burda 2019-07-17 02:13:05 +02:00 committed by Cheng Zhao
parent b57e623c11
commit d1c9f5e309
7 changed files with 81 additions and 3 deletions

View file

@ -208,7 +208,8 @@ void AtomSandboxedRendererClient::DidCreateScriptContext(
base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kNodeIntegrationInSubFrames);
bool should_load_preload =
is_main_frame || is_devtools || allow_node_in_sub_frames;
(is_main_frame || is_devtools || allow_node_in_sub_frames) &&
!IsWebViewFrame(context, render_frame);
if (!should_load_preload)
return;