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

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

Issue 230503005: CHECK that the frames that UserScriptScheduler gets are non-NULL. We're seeing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/extensions/user_script_scheduler.cc
diff --git a/chrome/renderer/extensions/user_script_scheduler.cc b/chrome/renderer/extensions/user_script_scheduler.cc
index d4b77d1aa96a50e98bd099763cd3e79296ef9792..9b346f7b23f8d75d342d9cdd2c96fe67c8ef9bf7 100644
--- a/chrome/renderer/extensions/user_script_scheduler.cc
+++ b/chrome/renderer/extensions/user_script_scheduler.cc
@@ -171,9 +171,13 @@ void UserScriptScheduler::ExecuteCodeImpl(
if (params.user_gesture)
gesture.reset(new blink::WebScopedUserGesture);
+ GURL top_url = frame_->document().url();
+
for (std::vector<WebFrame*>::iterator frame_it = frame_vector.begin();
frame_it != frame_vector.end(); ++frame_it) {
WebFrame* child_frame = *frame_it;
+ CHECK(child_frame) << top_url;
+
// We recheck access here in the renderer for extra safety against races
// with navigation.
//
@@ -187,7 +191,7 @@ void UserScriptScheduler::ExecuteCodeImpl(
if (!params.is_web_view &&
!PermissionsData::CanExecuteScriptOnPage(extension,
child_frame->document().url(),
- frame_->document().url(),
+ top_url,
extension_helper->tab_id(),
NULL,
-1,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698