DevTools: Fixed handling of unexpected renderer termination

On Linux window updates properly after renderer is killed. Perhaps should be checked on Mac as well.

BUG=372504

Review URL: https://codereview.chromium.org/286843002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@271349 0039d316-1c4b-4281-b951-d872f2087c98
parent 1de076c1
...@@ -753,6 +753,11 @@ void DevToolsWindow::AddNewContents(WebContents* source, ...@@ -753,6 +753,11 @@ void DevToolsWindow::AddNewContents(WebContents* source,
void DevToolsWindow::CloseContents(WebContents* source) { void DevToolsWindow::CloseContents(WebContents* source) {
CHECK(is_docked_); CHECK(is_docked_);
// Do this first so that when GetDockedInstanceForInspectedTab is called
// from UpdateDevTools it won't return this instance
// see crbug.com/372504
content::DevToolsManager::GetInstance()->ClientHostClosing(
bindings_->frontend_host());
// This will prevent any activity after frontend is loaded. // This will prevent any activity after frontend is loaded.
action_on_load_ = DevToolsToggleAction::NoOp(); action_on_load_ = DevToolsToggleAction::NoOp();
ignore_set_is_docked_ = true; ignore_set_is_docked_ = true;
...@@ -1023,6 +1028,7 @@ InfoBarService* DevToolsWindow::GetInfoBarService() { ...@@ -1023,6 +1028,7 @@ InfoBarService* DevToolsWindow::GetInfoBarService() {
void DevToolsWindow::RenderProcessGone() { void DevToolsWindow::RenderProcessGone() {
// Docked DevToolsWindow owns its web_contents_ and must delete it. // Docked DevToolsWindow owns its web_contents_ and must delete it.
// Undocked web_contents_ are owned and handled by browser. // Undocked web_contents_ are owned and handled by browser.
// see crbug.com/369932
if (is_docked_) if (is_docked_)
CloseContents(web_contents_); CloseContents(web_contents_);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment