Index: Source/core/workers/WorkerGlobalScope.h |
diff --git a/Source/core/workers/WorkerGlobalScope.h b/Source/core/workers/WorkerGlobalScope.h |
index e6cd948c438e20b7e9677756a6b955591cc6f1f9..9b611d1421443a8912f78ee687f44c2854023453 100644 |
--- a/Source/core/workers/WorkerGlobalScope.h |
+++ b/Source/core/workers/WorkerGlobalScope.h |
@@ -82,7 +82,17 @@ namespace WebCore { |
void clearScript() { m_script.clear(); } |
void clearInspector(); |
- void willStopActiveDOMObjects(); |
+ // FIXME: We can remove this interface when we remove openDatabaseSync. |
+ class TerminationObserver { |
+ public: |
+ virtual ~TerminationObserver() { } |
+ // The function is called in the main thread. |
haraken
2014/04/23 09:17:36
Given that this is not always called from the main
tkent
2014/04/23 09:24:53
Updated the comment.
|
+ virtual void wasRequestedToTerminate() = 0; |
+ }; |
+ void registerTerminationObserver(TerminationObserver*); |
+ void unregisterTerminationObserver(TerminationObserver*); |
+ void wasRequestedToTerminate(); |
+ |
void dispose(); |
WorkerThread* thread() const { return m_thread; } |
@@ -168,6 +178,7 @@ namespace WebCore { |
OwnPtrWillBeMember<WorkerClients> m_workerClients; |
double m_timeOrigin; |
+ TerminationObserver* m_terminationObserver; |
}; |
DEFINE_TYPE_CASTS(WorkerGlobalScope, ExecutionContext, context, context->isWorkerGlobalScope(), context.isWorkerGlobalScope()); |