Commit 3fb58fd2 authored by Yuki Yamada's avatar Yuki Yamada Committed by Commit Bot

Check IsContextDestroyed() before calling Abandon()

It is not necessary to call Abandon() if the ExecutionContext is already
destroyed. This is tested in PrerenderingTest.AbandonPrerender.

Bug: 1115764, 1100257
Change-Id: I3f21953c03b2688d0b3760b05a9aabf1ee8ca781
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2355357
Commit-Queue: Yuki Yamada <yukiy@chromium.org>
Reviewed-by: default avatarKeishi Hattori <keishi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#798541}
parent 84fc425e
......@@ -104,7 +104,7 @@ PrerenderHandle::PrerenderHandle(
PrerenderHandle::~PrerenderHandle() = default;
void PrerenderHandle::Dispose() {
if (remote_handle_.is_bound())
if (remote_handle_.is_bound() && !GetExecutionContext()->IsContextDestroyed())
remote_handle_->Abandon();
Detach();
}
......
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