Support ExecutionContext::GetScheduler on main thread worklets
ExecutionContext::GetScheduler used to hit a DCHECK if it's called on
a main thread worklet, as its impl uses WorkerOrWorkletGlobalScope::
GetThread, which is unavailable on the main thread worklet.
This CL moves its impl from WorkerOrWorkletGlobalScope to its subclasses,
so that GetScheduler always works.
Change-Id: I929b238c906740fbce25f24fba000b69db07314f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1616922
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Commit-Queue: Taiju Tsuiki <tzik@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#661666}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 1a71a721b9a3979ed0efc0f86e36b1e5582ea1fe
6 files changed