| 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 0127a065141280b0587431d5274464925a8153ee..c0f7ed63862e08ff08bf960d2ba5460074016927 100644
|
| --- a/third_party/WebKit/Source/core/workers/WorkerOrWorkletGlobalScope.h
|
| +++ b/third_party/WebKit/Source/core/workers/WorkerOrWorkletGlobalScope.h
|
| @@ -16,6 +16,16 @@ class CORE_EXPORT WorkerOrWorkletGlobalScope : public ExecutionContext {
|
| public:
|
| virtual ScriptWrappable* getScriptWrappable() const = 0;
|
| virtual WorkerOrWorkletScriptController* scriptController() = 0;
|
| +
|
| + // Returns true when the WorkerOrWorkletGlobalScope is closing (e.g. via
|
| + // WorkerGlobalScope#close() method). If this returns true, the worker is
|
| + // going to be shutdown after the current task execution. Globals that
|
| + // don't support close operation should always return false.
|
| + virtual bool isClosing() const = 0;
|
| +
|
| + // Should be called before destroying the global scope object. Allows
|
| + // sub-classes to perform any cleanup needed.
|
| + virtual void dispose() = 0;
|
| };
|
|
|
| DEFINE_TYPE_CASTS(WorkerOrWorkletGlobalScope, ExecutionContext, context, (context->isWorkerGlobalScope() || context->isWorkletGlobalScope()), (context.isWorkerGlobalScope() || context.isWorkletGlobalScope()));
|
|
|