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

Unified Diff: content/browser/devtools/render_view_devtools_agent_host.cc

Issue 22824002: Better fix for a redundant call to Reattach in RenderViewDevToolsAgentHost::ConnectRenderViewHost (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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: content/browser/devtools/render_view_devtools_agent_host.cc
diff --git a/content/browser/devtools/render_view_devtools_agent_host.cc b/content/browser/devtools/render_view_devtools_agent_host.cc
index efc5242cf3bb1f763b54b57e599586bb507271f6..7455c160d8e5c89f70bdb803cd44ea597363315c 100644
--- a/content/browser/devtools/render_view_devtools_agent_host.cc
+++ b/content/browser/devtools/render_view_devtools_agent_host.cc
@@ -229,7 +229,7 @@ RenderViewDevToolsAgentHost::~RenderViewDevToolsAgentHost() {
void RenderViewDevToolsAgentHost::AboutToNavigateRenderView(
RenderViewHost* dest_rvh) {
- if (!render_view_host_ || !IsAttached())
+ if (!render_view_host_)
return;
if (render_view_host_ == dest_rvh && static_cast<RenderViewHostImpl*>(
@@ -273,7 +273,8 @@ void RenderViewDevToolsAgentHost::SetRenderViewHost(RenderViewHost* rvh) {
void RenderViewDevToolsAgentHost::ConnectRenderViewHost(RenderViewHost* rvh) {
SetRenderViewHost(rvh);
- Reattach(state_);
+ if (IsAttached())
+ Reattach(state_);
}
void RenderViewDevToolsAgentHost::DisconnectRenderViewHost() {
« 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