DescriptionWorker: Add WorkerOrWorkletGlobalScope::thread() interface
This is a preparation for https://codereview.chromium.org/2456733002/
Before this CL, thread() is provided by WorkerGlobalScope and
ThreadedWorkletGlobalScope. This is not convenient when we handle them as
WorkerOrWorkletGlobalScope, a base class of both the global scopes, and want to
access WorkerThread from that. In the case, we need to cast it to
WorkerGlobalScope or ThreadedWorkletGlobalScope, and then call its thread().
After this CL, we can directly call WorkerOrWorkletGlobalScope::thread().
Note that MainThreadWorkletGlobalScope is also a sub-class of
WorkerOrWorkletGlobalScope, but it's not associated with WorkerThread, so
MainThreadWorkletGlobalScope::thread() always returns nullptr.
BUG=646559
Committed: https://crrev.com/55f5c0ef44161653b49a4f2f3a8a0c9fd74ba61e
Cr-Commit-Position: refs/heads/master@{#430532}
Patch Set 1 #Dependent Patchsets: Messages
Total messages: 16 (11 generated)
|