Commit 9aa52f73 authored by Tim Volodine's avatar Tim Volodine Committed by Commit Bot

[AW NS] Fix crash: execute error callback and early-out when io_thread_client is null.

Make sure to prevent crashes when io_thread_client is null,
at the time when InterceptedRequest::Restart is called.
There is a small amount of crash reports, see
crbug.com/953584, which indicate this case could arise
in special cases.

BUG=953584,841556

Cq-Include-Trybots: luci.chromium.try:android_mojo
Change-Id: I958fa4d622125a2d54ef99aee83a598f4cf46be5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1578751Reviewed-by: default avatarRichard Coles <torne@chromium.org>
Reviewed-by: default avatarJohn Abd-El-Malek <jam@chromium.org>
Commit-Queue: Tim Volodine <timvolodine@chromium.org>
Cr-Commit-Position: refs/heads/master@{#653652}
parent 1d73b862
......@@ -285,7 +285,11 @@ InterceptedRequest::~InterceptedRequest() {
void InterceptedRequest::Restart() {
std::unique_ptr<AwContentsIoThreadClient> io_thread_client =
GetIoThreadClient();
DCHECK(io_thread_client);
if (!io_thread_client) {
SendErrorAndCompleteImmediately(net::ERR_ABORTED);
return;
}
if (ShouldBlockURL(request_.url, io_thread_client.get())) {
SendErrorAndCompleteImmediately(net::ERR_ACCESS_DENIED);
......
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