Commit 5fdab1c3 authored by Yutaka Hirano's avatar Yutaka Hirano Committed by Commit Bot

Fix memory leak for WebRequest API with WebSocket

Bug: 898179
Change-Id: Ief4827898994347056aa731b30c42b9c496e5838
Reviewed-on: https://chromium-review.googlesource.com/c/1312186
Commit-Queue: Adam Rice <ricea@chromium.org>
Reviewed-by: default avatarKen Rockot <rockot@google.com>
Reviewed-by: default avatarAdam Rice <ricea@chromium.org>
Cr-Commit-Position: refs/heads/master@{#604578}
parent a1c269a2
......@@ -48,7 +48,14 @@ WebRequestProxyingWebSocket::WebRequestProxyingWebSocket(
base::Unretained(this), net::ERR_FAILED));
}
WebRequestProxyingWebSocket::~WebRequestProxyingWebSocket() = default;
WebRequestProxyingWebSocket::~WebRequestProxyingWebSocket() {
// This is important to ensure that no outstanding blocking requests continue
// to reference state owned by this object.
if (info_) {
ExtensionWebRequestEventRouter::GetInstance()->OnRequestWillBeDestroyed(
browser_context_, &info_.value());
}
}
void WebRequestProxyingWebSocket::AddChannelRequest(
const GURL& url,
......
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