Index: Source/core/workers/WorkerGlobalScope.h |
diff --git a/Source/core/workers/WorkerGlobalScope.h b/Source/core/workers/WorkerGlobalScope.h |
index 3648d24ca677ec7a9e6cfffefb88aee541d16ffb..81c6bd5a65e4464fed8fcb4bb656c75b2fe97d04 100644 |
--- a/Source/core/workers/WorkerGlobalScope.h |
+++ b/Source/core/workers/WorkerGlobalScope.h |
@@ -57,8 +57,8 @@ namespace WebCore { |
class WorkerNavigator; |
class WorkerThread; |
- class WorkerGlobalScope : public RefCounted<WorkerGlobalScope>, public ScriptWrappable, public SecurityContext, public ExecutionContext, public ExecutionContextClient, public WorkerSupplementable, public EventTargetWithInlineData { |
- REFCOUNTED_EVENT_TARGET(WorkerGlobalScope); |
+ class WorkerGlobalScope : public RefCountedWillBeRefCountedGarbageCollected<WorkerGlobalScope>, public ScriptWrappable, public SecurityContext, public ExecutionContext, public ExecutionContextClient, public WorkerSupplementable, public EventTargetWithInlineData { |
+ DEFINE_EVENT_TARGET_REFCOUNTING(RefCountedWillBeRefCountedGarbageCollected<WorkerGlobalScope>); |
public: |
virtual ~WorkerGlobalScope(); |
@@ -80,7 +80,10 @@ namespace WebCore { |
void clearScript() { m_script.clear(); } |
void clearInspector(); |
+ void detach(); |
+ |
WorkerThread* thread() const { return m_thread; } |
+ void clearThread() { m_thread = 0; } |
virtual void postTask(PassOwnPtr<ExecutionContextTask>) OVERRIDE FINAL; // Executes the task on context's thread asynchronously. |
@@ -123,6 +126,8 @@ namespace WebCore { |
using SecurityContext::securityOrigin; |
using SecurityContext::contentSecurityPolicy; |
+ virtual void trace(Visitor*); |
+ |
protected: |
WorkerGlobalScope(const KURL&, const String& userAgent, WorkerThread*, double timeOrigin, PassOwnPtr<WorkerClients>); |
void applyContentSecurityPolicyFromString(const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType); |
@@ -146,9 +151,9 @@ namespace WebCore { |
KURL m_url; |
String m_userAgent; |
- mutable RefPtr<WorkerConsole> m_console; |
- mutable RefPtr<WorkerLocation> m_location; |
- mutable RefPtr<WorkerNavigator> m_navigator; |
+ mutable RefPtrWillBeMember<WorkerConsole> m_console; |
+ mutable RefPtrWillBeMember<WorkerLocation> m_location; |
+ mutable RefPtrWillBeMember<WorkerNavigator> m_navigator; |
OwnPtr<WorkerScriptController> m_script; |
WorkerThread* m_thread; |
@@ -156,8 +161,6 @@ namespace WebCore { |
OwnPtr<WorkerInspectorController> m_workerInspectorController; |
bool m_closing; |
- HashSet<Observer*> m_workerObservers; |
- |
OwnPtr<WorkerEventQueue> m_eventQueue; |
OwnPtr<WorkerClients> m_workerClients; |