Commit 6ac97c21 authored by dgozman's avatar dgozman Committed by Commit bot

[DevTools] Call InnerDetach instead of NotifyDetached in DTAHI::HostClosed.

InnerDetach destroyes the current session and domain handlers, as opposite to
NotifyDetached, which prevents stale pointers and inconsistent state at the time
of DTAHI destruction.

BUG=674474

Review-Url: https://codereview.chromium.org/2579923002
Cr-Commit-Position: refs/heads/master@{#439003}
parent 0ec3cc16
...@@ -265,7 +265,7 @@ void DevToolsAgentHostImpl::HostClosed() { ...@@ -265,7 +265,7 @@ void DevToolsAgentHostImpl::HostClosed() {
DevToolsAgentHostClient* client = client_; DevToolsAgentHostClient* client = client_;
client_ = NULL; client_ = NULL;
client->AgentHostClosed(this, false); client->AgentHostClosed(this, false);
NotifyDetached(); InnerDetach();
} }
void DevToolsAgentHostImpl::InspectElement(int x, int y) { void DevToolsAgentHostImpl::InspectElement(int x, int y) {
......
...@@ -373,6 +373,7 @@ void ShellDevToolsFrontend::SendMessageAck(int request_id, ...@@ -373,6 +373,7 @@ void ShellDevToolsFrontend::SendMessageAck(int request_id,
void ShellDevToolsFrontend::AgentHostClosed( void ShellDevToolsFrontend::AgentHostClosed(
DevToolsAgentHost* agent_host, bool replaced) { DevToolsAgentHost* agent_host, bool replaced) {
agent_host_ = nullptr;
frontend_shell_->Close(); frontend_shell_->Close();
} }
......
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