Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(83)

Unified Diff: extensions/renderer/programmatic_script_injector.cc

Issue 942533003: Enable <webview>.executeScript outside of Apps and Extensions [1] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@decouple_brower_isolated_world_routingid_user_script_UserScriptSet_non_hostset_2
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « extensions/renderer/extension_injection_host.cc ('k') | extensions/renderer/script_injection_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/programmatic_script_injector.cc
diff --git a/extensions/renderer/programmatic_script_injector.cc b/extensions/renderer/programmatic_script_injector.cc
index f393f9e213a299cf1244d467752264942bd426a6..c0656b541c4540c3b550552efd372a98f48466f4 100644
--- a/extensions/renderer/programmatic_script_injector.cc
+++ b/extensions/renderer/programmatic_script_injector.cc
@@ -83,6 +83,9 @@ PermissionsData::AccessType ProgrammaticScriptInjector::CanExecuteOnFrame(
: PermissionsData::ACCESS_DENIED;
}
+ if (injection_host->id().type() != HostID::EXTENSIONS)
+ return PermissionsData::ACCESS_DENIED;
Fady Samuel 2015/02/19 19:52:54 I'm confused by this, doesn't this disable execute
Xi Han 2015/02/19 19:56:04 Yes, this disable executeScript for WebUI, but not
+
return injection_host->CanExecuteOnFrame(
effective_document_url, top_url, tab_id, true /* is_declarative */);
}
« no previous file with comments | « extensions/renderer/extension_injection_host.cc ('k') | extensions/renderer/script_injection_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698