Index: extensions/renderer/console.cc |
diff --git a/extensions/renderer/console.cc b/extensions/renderer/console.cc |
index ccfef7590e619f35de1676a3fa2ace1402f0473a..2388d34c3b4d3a7b9fa02c3127369e48fd074a2e 100644 |
--- a/extensions/renderer/console.cc |
+++ b/extensions/renderer/console.cc |
@@ -39,9 +39,14 @@ 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 && |
+ content::RenderView::FromWebView( |
+ script_context->web_frame()->view()) == render_view) { |
not at google - send to devlin
2014/11/07 16:24:03
You should just be able to do "script_context->Get
|
+ found_ = render_view; |
+ } |
} |
return !found_; |
} |