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

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

Issue 319183007: Oilpan: move MessageChannel to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 6 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/bindings/v8/custom/V8MessageChannelCustom.cpp ('k') | Source/core/dom/MessageChannel.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/MessageChannel.h
diff --git a/Source/core/dom/MessageChannel.h b/Source/core/dom/MessageChannel.h
index 5b1dc49a04fac99bcb7d28eca14def9f13cbb13a..750c601e5fc14769306c9fb4661788ddef36e681 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 "platform/heap/Handle.h"
#include "wtf/PassRefPtr.h"
#include "wtf/RefCounted.h"
#include "wtf/RefPtr.h"
@@ -37,19 +38,24 @@ namespace WebCore {
class MessagePort;
class ExecutionContext;
-class MessageChannel : public RefCounted<MessageChannel>, public ScriptWrappable {
+class MessageChannel FINAL : public RefCountedWillBeGarbageCollectedFinalized<MessageChannel>, public ScriptWrappable {
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
« no previous file with comments | « Source/bindings/v8/custom/V8MessageChannelCustom.cpp ('k') | Source/core/dom/MessageChannel.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698