Commit 4b93906f authored by Stephane Zermatten's avatar Stephane Zermatten Committed by Commit Bot

[Autofill Assistant] Detach DevtoolsClient in destructor.

Before this patch the DevToolsAgentHost was left with a pointer to
deleted client when Autofill Assistant finished, causing a crash when
the tab was destroyed.

This patch fixes that issue by having the client detach itself when it
is deleted.

Bug: 806868
Change-Id: Id10f0ba7fdaa0216d7b3053c25d965c7ce02bcc7
Reviewed-on: https://chromium-review.googlesource.com/1253106
Commit-Queue: Stephane Zermatten <szermatt@chromium.org>
Reviewed-by: default avatarGanggui Tang <gogerald@chromium.org>
Cr-Commit-Position: refs/heads/master@{#595728}
parent 2a6bc1c0
......@@ -33,7 +33,9 @@ DevtoolsClient::DevtoolsClient(
agent_host_->AttachClient(this);
}
DevtoolsClient::~DevtoolsClient() {}
DevtoolsClient::~DevtoolsClient() {
agent_host_->DetachClient(this);
}
input::Domain* DevtoolsClient::GetInput() {
return &input_domain_;
......
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