DevTools: don't show the unresponsive dialog for inspected tabs
BUG=66458
TEST=DevToolsManagerTest.NoUnresponsiveDialogInInspectedTab
Review URL: http://codereview.chromium.org/7565008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95798 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/content/browser/tab_contents/tab_contents.cc b/content/browser/tab_contents/tab_contents.cc
index 14a387a6..8ff4d06 100644
--- a/content/browser/tab_contents/tab_contents.cc
+++ b/content/browser/tab_contents/tab_contents.cc
@@ -1758,6 +1758,14 @@
if (rvh != render_view_host())
return;
+ // Ignore renderer unresponsive event if debugger is attached to the tab
+ // since the event may be a result of the renderer sitting on a breakpoint.
+ // See http://crbug.com/65458
+ DevToolsManager* devtools_manager = DevToolsManager::GetInstance();
+ if (devtools_manager &&
+ devtools_manager->GetDevToolsClientHostFor(rvh) != NULL)
+ return;
+
if (is_during_unload) {
// Hang occurred while firing the beforeunload/unload handler.
// Pretend the handler fired so tab closing continues as if it had.