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

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: Created 6 years, 10 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
Index: Source/core/workers/WorkerGlobalScope.h
diff --git a/Source/core/workers/WorkerGlobalScope.h b/Source/core/workers/WorkerGlobalScope.h
index 3648d24ca677ec7a9e6cfffefb88aee541d16ffb..9a1bc4d0c6433d2a6176460f965b88fcf0ba893e 100644
--- a/Source/core/workers/WorkerGlobalScope.h
+++ b/Source/core/workers/WorkerGlobalScope.h
@@ -57,8 +57,9 @@ 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 {
sof 2014/02/24 22:46:24 Just noticed: we now need to address Supplementabl
haraken 2014/02/25 01:30:49 Just to help me understand: Why do we need to addr
sof 2014/02/25 08:56:35 The problem isn't that such Persistents won't be c
haraken 2014/02/25 11:16:28 Let me make sure that I'm understanding correctly:
sof 2014/02/25 11:38:02 Correct.
sof 2014/02/25 21:56:43 WorkerGlobalScope is now a GCed Supplementable alo
+ DECLARE_GC_INFO;
+ DEFINE_EVENT_TARGET_REFCOUNTING(RefCountedWillBeRefCountedGarbageCollected<WorkerGlobalScope>);
public:
virtual ~WorkerGlobalScope();
@@ -123,6 +124,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 +149,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;
haraken 2014/02/25 01:30:49 This raw pointer will cause an issue. - WorkerThr
sof 2014/02/25 07:46:44 If you look at WorkerThread::workerThread(), it as
Vyacheslav Egorov (Chromium) 2014/02/25 10:41:27 WorkerGlobalScope can't outlive the thread because
@@ -156,8 +159,6 @@ namespace WebCore {
OwnPtr<WorkerInspectorController> m_workerInspectorController;
bool m_closing;
- HashSet<Observer*> m_workerObservers;
-
OwnPtr<WorkerEventQueue> m_eventQueue;
OwnPtr<WorkerClients> m_workerClients;

Powered by Google App Engine
This is Rietveld 408576698