diff options
author | kaznacheev@chromium.org <kaznacheev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-23 23:29:50 +0000 |
---|---|---|
committer | kaznacheev@chromium.org <kaznacheev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-23 23:29:50 +0000 |
commit | 3cf6eec1ad683c34c1be8eb65a1055900185c4aa (patch) | |
tree | bc90a93f99ce8ee4cd352fa4f4af87f4d10d9138 /content | |
parent | 8cc72d86e0487032ce15be4df91577abb89a6850 (diff) | |
download | chromium_src-3cf6eec1ad683c34c1be8eb65a1055900185c4aa.zip chromium_src-3cf6eec1ad683c34c1be8eb65a1055900185c4aa.tar.gz chromium_src-3cf6eec1ad683c34c1be8eb65a1055900185c4aa.tar.bz2 |
Filter out inactive RenderViewHost instances when enumerating available debug targets
When a tab navigates to a different domain two RenderViewHost instances attached to the same WebContents may exist for a short time.
Debugger should not discover the instance that is going away.
BUG=222533
Review URL: https://chromiumcodereview.appspot.com/12731018
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@190115 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r-- | content/browser/devtools/render_view_devtools_agent_host.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/content/browser/devtools/render_view_devtools_agent_host.cc b/content/browser/devtools/render_view_devtools_agent_host.cc index 1005101..b342f76 100644 --- a/content/browser/devtools/render_view_devtools_agent_host.cc +++ b/content/browser/devtools/render_view_devtools_agent_host.cc @@ -150,6 +150,12 @@ std::vector<RenderViewHost*> DevToolsAgentHost::GetValidRenderViewHosts() { if (static_cast<RenderViewHostImpl*>(rvh)->is_swapped_out()) continue; + WebContents* web_contents = WebContents::FromRenderViewHost(rvh); + // Don't report a RenderViewHost if it is not the current RenderViewHost + // for some WebContents. + if (!web_contents || rvh != web_contents->GetRenderViewHost()) + continue; + result.push_back(rvh); } } |