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

Unified Diff: chrome/renderer/extensions/user_script_slave.cc

Issue 10863002: Added check to prevent extensions from injecting scrips into other extensions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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
Index: chrome/renderer/extensions/user_script_slave.cc
diff --git a/chrome/renderer/extensions/user_script_slave.cc b/chrome/renderer/extensions/user_script_slave.cc
index f9166632d1a2e6dd75584d013f5ae184aa94ab01..c807516c75de13f98fe0b116634a044688f39617 100644
--- a/chrome/renderer/extensions/user_script_slave.cc
+++ b/chrome/renderer/extensions/user_script_slave.cc
@@ -281,6 +281,7 @@ void UserScriptSlave::InjectScripts(WebFrame* frame,
// Content scripts are not tab-specific.
int kNoTabId = -1;
if (!extension->CanExecuteScriptOnPage(data_source_url,
+ frame->top()->document().url(),
kNoTabId,
script,
NULL)) {

Powered by Google App Engine
This is Rietveld 408576698