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

Unified Diff: third_party/WebKit/Source/core/dom/MessagePort.h

Issue 2043583002: Remove the use of OwnedPtrDeleter in WebMessagePortChannel. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
Index: third_party/WebKit/Source/core/dom/MessagePort.h
diff --git a/third_party/WebKit/Source/core/dom/MessagePort.h b/third_party/WebKit/Source/core/dom/MessagePort.h
index 75257d22c23edf572d8e7ed90e23065bcede2885..4742b7d82a7b8815a289857d52eb951a5ec165ad 100644
--- a/third_party/WebKit/Source/core/dom/MessagePort.h
+++ b/third_party/WebKit/Source/core/dom/MessagePort.h
@@ -40,6 +40,7 @@
#include "wtf/PassRefPtr.h"
#include "wtf/RefPtr.h"
#include "wtf/Vector.h"
+#include <memory>
namespace blink {
@@ -49,8 +50,8 @@ class MessagePort;
class ScriptState;
class SerializedScriptValue;
-// Not to be confused with WebMessagePortChannelArray; this one uses Vector and OwnPtr instead of WebVector and raw pointers.
-typedef Vector<OwnPtr<WebMessagePortChannel>, 1> MessagePortChannelArray;
+// Not to be confused with WebMessagePortChannelArray; this one uses Vector and std::unique_ptr instead of WebVector and raw pointers.
+typedef Vector<WebMessagePortChannelUniquePtr, 1> MessagePortChannelArray;
class CORE_EXPORT MessagePort
: public EventTargetWithInlineData
@@ -68,8 +69,8 @@ public:
void start();
void close();
- void entangle(PassOwnPtr<WebMessagePortChannel>);
- PassOwnPtr<WebMessagePortChannel> disentangle();
+ void entangle(WebMessagePortChannelUniquePtr);
+ WebMessagePortChannelUniquePtr disentangle();
// Returns nullptr if the passed-in array is nullptr/empty.
static PassOwnPtr<WebMessagePortChannelArray> toWebMessagePortChannelArray(PassOwnPtr<MessagePortChannelArray>);
@@ -119,7 +120,7 @@ private:
void messageAvailable() override;
void dispatchMessages();
- OwnPtr<WebMessagePortChannel> m_entangledChannel;
+ WebMessagePortChannelUniquePtr m_entangledChannel;
bool m_started;
bool m_closed;
« no previous file with comments | « third_party/WebKit/Source/core/dom/MessageChannel.cpp ('k') | third_party/WebKit/Source/core/dom/MessagePort.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698