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

Unified Diff: Source/core/dom/MessageChannel.h

Issue 177073004: Oilpan: move core/workers 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/dom/MessageChannel.h
diff --git a/Source/core/dom/MessageChannel.h b/Source/core/dom/MessageChannel.h
index 5b1dc49a04fac99bcb7d28eca14def9f13cbb13a..94bb4ec032678109a964b958bc23b0540e2f6477 100644
--- a/Source/core/dom/MessageChannel.h
+++ b/Source/core/dom/MessageChannel.h
@@ -28,6 +28,7 @@
#define MessageChannel_h
#include "bindings/v8/ScriptWrappable.h"
+#include "heap/Handle.h"
#include "wtf/PassRefPtr.h"
#include "wtf/RefCounted.h"
#include "wtf/RefPtr.h"
@@ -37,19 +38,25 @@ namespace WebCore {
class MessagePort;
class ExecutionContext;
-class MessageChannel : public RefCounted<MessageChannel>, public ScriptWrappable {
+class MessageChannel : public RefCountedWillBeGarbageCollectedFinalized<MessageChannel>, public ScriptWrappable {
+ DECLARE_GC_INFO;
public:
- static PassRefPtr<MessageChannel> create(ExecutionContext* context) { return adoptRef(new MessageChannel(context)); }
+ static PassRefPtrWillBeRawPtr<MessageChannel> create(ExecutionContext* context)
+ {
+ return adoptRefWillBeNoop(new MessageChannel(context));
+ }
~MessageChannel();
MessagePort* port1() const { return m_port1.get(); }
MessagePort* port2() const { return m_port2.get(); }
+ void trace(Visitor*);
+
private:
explicit MessageChannel(ExecutionContext*);
- RefPtr<MessagePort> m_port1;
- RefPtr<MessagePort> m_port2;
+ RefPtrWillBeMember<MessagePort> m_port1;
+ RefPtrWillBeMember<MessagePort> m_port2;
};
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698