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

Unified Diff: content/browser/web_contents/web_contents_impl.cc

Issue 744653002: Ignore DevTools messages from the old inspected RVH after navigation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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: content/browser/web_contents/web_contents_impl.cc
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 8f6bfe119faf03f2fae0155768483b36596ada24..363717426192333d3aadb94d51b5a9438bfaca89 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -24,6 +24,7 @@
#include "content/browser/browser_plugin/browser_plugin_guest.h"
#include "content/browser/child_process_security_policy_impl.h"
#include "content/browser/devtools/devtools_manager.h"
+#include "content/browser/devtools/render_view_devtools_agent_host.h"
#include "content/browser/dom_storage/dom_storage_context_wrapper.h"
#include "content/browser/dom_storage/session_storage_namespace_impl.h"
#include "content/browser/download/download_stats.h"
@@ -486,10 +487,17 @@ bool WebContentsImpl::OnMessageReceived(RenderViewHost* render_view_host,
// Message handlers should be aware of which
// RenderViewHost/RenderFrameHost sent the message, which is temporarily
// stored in render_(view|frame)_message_source_.
- if (render_frame_host)
+ if (render_frame_host) {
+ if (RenderViewDevToolsAgentHost::DispatchIPCMessage(
Charlie Reis 2014/11/20 23:11:10 I don't think we should be adding this here; it do
yurys 2014/11/21 08:14:14 This's just where it was before crrev.com/288297.
Charlie Reis 2014/11/22 00:38:17 Ah, I didn't realize it was here before. I'm hesi
+ render_frame_host->GetRenderViewHost(), message))
+ return true;
render_frame_message_source_ = render_frame_host;
- else
+ } else {
+ if (RenderViewDevToolsAgentHost::DispatchIPCMessage(render_view_host,
+ message))
+ return true;
render_view_message_source_ = render_view_host;
+ }
bool handled = true;
IPC_BEGIN_MESSAGE_MAP(WebContentsImpl, message)

Powered by Google App Engine
This is Rietveld 408576698