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

Unified Diff: Source/core/dom/MessagePort.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/MessagePort.h
diff --git a/Source/core/dom/MessagePort.h b/Source/core/dom/MessagePort.h
index 65e0cba4e3b3af3d89386fe7efc09431a273b224..fb7094c10a9fc97898f7586d3ccf20961ee9dcc9 100644
--- a/Source/core/dom/MessagePort.h
+++ b/Source/core/dom/MessagePort.h
@@ -31,6 +31,7 @@
#include "core/dom/ActiveDOMObject.h"
#include "core/events/EventListener.h"
#include "core/events/EventTarget.h"
+#include "heap/Handle.h"
#include "public/platform/WebMessagePortChannel.h"
#include "public/platform/WebMessagePortChannelClient.h"
#include "wtf/OwnPtr.h"
@@ -56,14 +57,15 @@ typedef Vector<RefPtr<MessagePort>, 1> MessagePortArray;
// Not to be confused with blink::WebMessagePortChannelArray; this one uses Vector and OwnPtr instead of WebVector and raw pointers.
typedef Vector<OwnPtr<blink::WebMessagePortChannel>, 1> MessagePortChannelArray;
-class MessagePort FINAL : public RefCounted<MessagePort>
+class MessagePort FINAL : public RefCountedWillBeRefCountedGarbageCollected<MessagePort>
, public ActiveDOMObject
, public EventTargetWithInlineData
, public ScriptWrappable
, public blink::WebMessagePortChannelClient {
- REFCOUNTED_EVENT_TARGET(MessagePort);
+ DECLARE_GC_INFO;
+ DEFINE_EVENT_TARGET_REFCOUNTING(RefCountedWillBeRefCountedGarbageCollected<MessagePort>);
public:
- static PassRefPtr<MessagePort> create(ExecutionContext&);
+ static PassRefPtrWillBeRawPtr<MessagePort> create(ExecutionContext&);
virtual ~MessagePort();
void postMessage(PassRefPtr<SerializedScriptValue> message, const MessagePortArray*, ExceptionState&);
@@ -103,6 +105,8 @@ public:
// A port gets neutered when it is transferred to a new owner via postMessage().
bool isNeutered() const { return !m_entangledChannel; }
+ void trace(Visitor*) { }
+
private:
explicit MessagePort(ExecutionContext&);

Powered by Google App Engine
This is Rietveld 408576698