Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(148)

Unified Diff: third_party/WebKit/Source/core/workers/WorkerOrWorkletGlobalScope.h

Issue 2481843003: Worker: Add WorkerOrWorkletGlobalScope::thread() interface (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/workers/WorkerOrWorkletGlobalScope.h
diff --git a/third_party/WebKit/Source/core/workers/WorkerOrWorkletGlobalScope.h b/third_party/WebKit/Source/core/workers/WorkerOrWorkletGlobalScope.h
index 79e81270d9220bdd2d2d25302cec4e3c4ab24dc9..348dd1fcb9211c0d13092411bf4fac44acd8224c 100644
--- a/third_party/WebKit/Source/core/workers/WorkerOrWorkletGlobalScope.h
+++ b/third_party/WebKit/Source/core/workers/WorkerOrWorkletGlobalScope.h
@@ -11,6 +11,7 @@ namespace blink {
class ScriptWrappable;
class WorkerOrWorkletScriptController;
+class WorkerThread;
class CORE_EXPORT WorkerOrWorkletGlobalScope : public ExecutionContext {
public:
@@ -26,6 +27,10 @@ class CORE_EXPORT WorkerOrWorkletGlobalScope : public ExecutionContext {
// Should be called before destroying the global scope object. Allows
// sub-classes to perform any cleanup needed.
virtual void dispose() = 0;
+
+ // May return nullptr if this global scope is not threaded (i.e.,
+ // MainThreadWorkletGlobalScope) or after dispose() is called.
+ virtual WorkerThread* thread() const = 0;
};
DEFINE_TYPE_CASTS(

Powered by Google App Engine
This is Rietveld 408576698