Chromium Code Reviews| 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; |