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

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

Issue 2422793002: HTML MessagePort as mojo::MessagePipeHandle (Closed)
Patch Set: Remove unnecessary histogram Created 3 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: 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 ca49716c767e71823f1a2477ee953478abfce931..663aa085d0b6082f9fbb7b32fe462df1808ab83c 100644
--- a/third_party/WebKit/Source/core/dom/MessagePort.cpp
+++ b/third_party/WebKit/Source/core/dom/MessagePort.cpp
@@ -95,7 +95,7 @@ MessagePort::toWebMessagePortChannelArray(
webChannels =
WTF::wrapUnique(new WebMessagePortChannelArray(channels->size()));
for (size_t i = 0; i < channels->size(); ++i)
- (*webChannels)[i] = (*channels)[i].release();
+ (*webChannels)[i].reset((*channels)[i].release());
dcheng 2017/02/07 00:01:37 Nit: does webChannels[i] = std::move((*channels)[i
darin (slow to review) 2017/02/07 00:06:13 Done.
}
return webChannels;
}
@@ -103,11 +103,11 @@ MessagePort::toWebMessagePortChannelArray(
// static
MessagePortArray* MessagePort::toMessagePortArray(
ExecutionContext* context,
- const WebMessagePortChannelArray& webChannels) {
+ WebMessagePortChannelArray webChannels) {
std::unique_ptr<MessagePortChannelArray> channels =
WTF::wrapUnique(new MessagePortChannelArray(webChannels.size()));
for (size_t i = 0; i < webChannels.size(); ++i)
- (*channels)[i] = WebMessagePortChannelUniquePtr(webChannels[i]);
+ (*channels)[i] = std::move(webChannels[i]);
return MessagePort::entanglePorts(*context, std::move(channels));
}
@@ -175,7 +175,7 @@ static bool tryGetMessageFrom(
if (webChannels.size()) {
channels = WTF::wrapUnique(new MessagePortChannelArray(webChannels.size()));
for (size_t i = 0; i < webChannels.size(); ++i)
- (*channels)[i] = WebMessagePortChannelUniquePtr(webChannels[i]);
+ (*channels)[i] = std::move(webChannels[i]);
}
message = SerializedScriptValue::create(messageString);
return true;

Powered by Google App Engine
This is Rietveld 408576698