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

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

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.cpp
diff --git a/third_party/WebKit/Source/core/dom/MessagePort.cpp b/third_party/WebKit/Source/core/dom/MessagePort.cpp
index 71b7646722829c0eb78979a6133af71c042c1919..17fc8bb34158352ab78408b5fdfc3ca45dacac78 100644
--- a/third_party/WebKit/Source/core/dom/MessagePort.cpp
+++ b/third_party/WebKit/Source/core/dom/MessagePort.cpp
@@ -98,7 +98,7 @@ PassOwnPtr<WebMessagePortChannelArray> MessagePort::toWebMessagePortChannelArray
if (channels && channels->size()) {
webChannels = adoptPtr(new WebMessagePortChannelArray(channels->size()));
for (size_t i = 0; i < channels->size(); ++i)
- (*webChannels)[i] = (*channels)[i].leakPtr();
+ (*webChannels)[i] = (*channels)[i].release();
}
return webChannels;
}
@@ -108,11 +108,11 @@ MessagePortArray* MessagePort::toMessagePortArray(ExecutionContext* context, con
{
OwnPtr<MessagePortChannelArray> channels = adoptPtr(new MessagePortChannelArray(webChannels.size()));
for (size_t i = 0; i < webChannels.size(); ++i)
- (*channels)[i] = adoptPtr(webChannels[i]);
+ (*channels)[i] = WebMessagePortChannelUniquePtr(webChannels[i]);
return MessagePort::entanglePorts(*context, std::move(channels));
}
-PassOwnPtr<WebMessagePortChannel> MessagePort::disentangle()
+WebMessagePortChannelUniquePtr MessagePort::disentangle()
{
DCHECK(m_entangledChannel);
m_entangledChannel->setClient(0);
@@ -148,7 +148,7 @@ void MessagePort::close()
m_closed = true;
}
-void MessagePort::entangle(PassOwnPtr<WebMessagePortChannel> remote)
+void MessagePort::entangle(WebMessagePortChannelUniquePtr remote)
{
// Only invoked to set our initial entanglement.
DCHECK(!m_entangledChannel);
@@ -173,7 +173,7 @@ static bool tryGetMessageFrom(WebMessagePortChannel& webChannel, RefPtr<Serializ
if (webChannels.size()) {
channels = adoptPtr(new MessagePortChannelArray(webChannels.size()));
for (size_t i = 0; i < webChannels.size(); ++i)
- (*channels)[i] = adoptPtr(webChannels[i]);
+ (*channels)[i] = WebMessagePortChannelUniquePtr(webChannels[i]);
}
message = SerializedScriptValue::create(messageString);
return true;
« no previous file with comments | « third_party/WebKit/Source/core/dom/MessagePort.h ('k') | third_party/WebKit/Source/core/workers/SharedWorker.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698