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

Unified Diff: extensions/renderer/console.cc

Issue 678393002: Send extension console messages to the right WebFrame. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add the missing copyright notice. Created 6 years, 1 month 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: extensions/renderer/console.cc
diff --git a/extensions/renderer/console.cc b/extensions/renderer/console.cc
index 4601f6c6ce9b1b8aa62f2da2ed15adf049cc9235..3ed31fce9a18a7f7eae5eee4623556e2062832a1 100644
--- a/extensions/renderer/console.cc
+++ b/extensions/renderer/console.cc
@@ -39,9 +39,11 @@ class ByContextFinder : public content::RenderViewVisitor {
bool Visit(content::RenderView* render_view) override {
ExtensionHelper* helper = ExtensionHelper::Get(render_view);
- if (helper &&
- helper->dispatcher()->script_context_set().GetByV8Context(context_)) {
- found_ = render_view;
+ if (helper) {
+ ScriptContext* script_context =
+ helper->dispatcher()->script_context_set().GetByV8Context(context_);
+ if (script_context && script_context->GetRenderView() == render_view)
+ found_ = render_view;
}
return !found_;
}
« no previous file with comments | « chrome/test/data/extensions/api_test/uncaught_exception_logging/test.js ('k') | extensions/renderer/console_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698