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

Unified Diff: Source/core/workers/WorkerGlobalScope.h

Issue 178663004: Oilpan: move WorkerGlobalScope to oilpan's heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased Created 6 years, 9 months 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
« no previous file with comments | « Source/core/workers/WorkerConsole.idl ('k') | Source/core/workers/WorkerGlobalScope.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/workers/WorkerGlobalScope.h
diff --git a/Source/core/workers/WorkerGlobalScope.h b/Source/core/workers/WorkerGlobalScope.h
index c24d6fc927613e4fb7a55b4e1197633ec522d791..321d98e83b7dcf8c9f2a95b3f1bcea28dd4c65cc 100644
--- a/Source/core/workers/WorkerGlobalScope.h
+++ b/Source/core/workers/WorkerGlobalScope.h
@@ -36,7 +36,7 @@
#include "core/frame/csp/ContentSecurityPolicy.h"
#include "core/workers/WorkerConsole.h"
#include "core/workers/WorkerEventQueue.h"
-#include "core/workers/WorkerSupplementable.h"
+#include "heap/Handle.h"
#include "platform/network/ContentSecurityPolicyParsers.h"
#include "wtf/Assertions.h"
#include "wtf/HashMap.h"
@@ -58,8 +58,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 WillBeHeapSupplementable<WorkerGlobalScope>, public EventTargetWithInlineData {
+ DEFINE_EVENT_TARGET_REFCOUNTING(RefCountedWillBeRefCountedGarbageCollected<WorkerGlobalScope>);
public:
virtual ~WorkerGlobalScope();
@@ -81,6 +81,8 @@ namespace WebCore {
void clearScript() { m_script.clear(); }
void clearInspector();
+ void dispose();
+
WorkerThread* thread() const { return m_thread; }
virtual void postTask(PassOwnPtr<ExecutionContextTask>) OVERRIDE FINAL; // Executes the task on context's thread asynchronously.
@@ -124,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, ContentSecurityPolicyHeaderType);
@@ -147,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;
« no previous file with comments | « Source/core/workers/WorkerConsole.idl ('k') | Source/core/workers/WorkerGlobalScope.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698