Commit 72254b44 authored by Hiroki Nakagawa's avatar Hiroki Nakagawa Committed by Commit Bot

Worker: Check GetExecutionContext() first in DCHECK

Looks like GetExecutionContext() may return nulptr in terminate().

Bug: 884091
Change-Id: Ibd2756220a83ba490c0e23966650178e0b856423
Reviewed-on: https://chromium-review.googlesource.com/c/1264337
Commit-Queue: Matt Falkenhagen <falken@chromium.org>
Reviewed-by: default avatarMatt Falkenhagen <falken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#597040}
parent 7e3da6dc
......@@ -203,7 +203,7 @@ void DedicatedWorker::Start() {
}
void DedicatedWorker::terminate() {
DCHECK(GetExecutionContext()->IsContextThread());
DCHECK(!GetExecutionContext() || GetExecutionContext()->IsContextThread());
context_proxy_->TerminateGlobalScope();
}
......
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