Commit 54253913 authored by WangHui's avatar WangHui Committed by Chromium LUCI CQ

aw: Don't send error callback for request originated from within a service worker.

Don't send error callback for request originated from within a service worker since
we can't get a |AwContentsClientBridge| based on the |render_frame_id|
of the |request_|.

Bug:None
Signed-off-by: default avatarWangHui <wanghui210@huawei.com>
Change-Id: I66172b371b305b7d8ef88f87e1a21d3097d1a5ed
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2627528Reviewed-by: default avatarBo <boliu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#843378}
parent 1bba741f
......@@ -698,6 +698,12 @@ void InterceptedRequest::SendErrorCallback(int error_code,
if (sent_error_callback_)
return;
// We can't get a |AwContentsClientBridge| based on the |render_frame_id| of
// the |request_| initiated by the service worker, so interrupt it as soon as
// possible.
if (request_.originated_from_service_worker)
return;
sent_error_callback_ = true;
content::GetUIThreadTaskRunner({})->PostTask(
FROM_HERE,
......
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