| Index: content/common/webmessageportchannel_impl.cc
|
| diff --git a/content/common/webmessageportchannel_impl.cc b/content/common/webmessageportchannel_impl.cc
|
| index 6a9ac365498fccc7dcce673f4e78552e853df271..6e0df7fdc67d4d7791245892cc54630bb7e17683 100644
|
| --- a/content/common/webmessageportchannel_impl.cc
|
| +++ b/content/common/webmessageportchannel_impl.cc
|
| @@ -11,7 +11,7 @@
|
| #include "third_party/WebKit/Source/WebKit/chromium/public/WebMessagePortChannelClient.h"
|
|
|
| using WebKit::WebMessagePortChannel;
|
| -using WebKit::WebMessagePortChannelArray;
|
| +using WebKit::WebTransferableReceiptArray;
|
| using WebKit::WebMessagePortChannelClient;
|
| using WebKit::WebString;
|
|
|
| @@ -76,25 +76,25 @@ void WebMessagePortChannelImpl::entangle(WebMessagePortChannel* channel) {
|
|
|
| void WebMessagePortChannelImpl::postMessage(
|
| const WebString& message,
|
| - WebMessagePortChannelArray* channels) {
|
| + WebTransferableReceiptArray* receipts) {
|
| if (MessageLoop::current() != ChildThread::current()->message_loop()) {
|
| ChildThread::current()->message_loop()->PostTask(FROM_HERE,
|
| NewRunnableMethod(this, &WebMessagePortChannelImpl::postMessage,
|
| - message, channels));
|
| + message, receipts));
|
| return;
|
| }
|
|
|
| - std::vector<int> message_port_ids(channels ? channels->size() : 0);
|
| - if (channels) {
|
| + std::vector<int> message_port_ids(receipts ? receipts->size() : 0);
|
| + if (receipts) {
|
| // Extract the port IDs from the source array, then free it.
|
| - for (size_t i = 0; i < channels->size(); ++i) {
|
| + for (size_t i = 0; i < receipts->size(); ++i) {
|
| WebMessagePortChannelImpl* webchannel =
|
| - static_cast<WebMessagePortChannelImpl*>((*channels)[i]);
|
| + static_cast<WebMessagePortChannelImpl*>((*receipts)[i]);
|
| message_port_ids[i] = webchannel->message_port_id();
|
| webchannel->QueueMessages();
|
| DCHECK(message_port_ids[i] != MSG_ROUTING_NONE);
|
| }
|
| - delete channels;
|
| + delete receipts;
|
| }
|
|
|
| IPC::Message* msg = new WorkerProcessHostMsg_PostMessage(
|
| @@ -104,7 +104,7 @@ void WebMessagePortChannelImpl::postMessage(
|
|
|
| bool WebMessagePortChannelImpl::tryGetMessage(
|
| WebString* message,
|
| - WebMessagePortChannelArray& channels) {
|
| + WebTransferableReceiptArray& receipts) {
|
| base::AutoLock auto_lock(lock_);
|
| if (message_queue_.empty())
|
| return false;
|
| @@ -112,12 +112,12 @@ bool WebMessagePortChannelImpl::tryGetMessage(
|
| *message = message_queue_.front().message;
|
| const std::vector<WebMessagePortChannelImpl*>& channel_array =
|
| message_queue_.front().ports;
|
| - WebMessagePortChannelArray result_ports(channel_array.size());
|
| + WebTransferableReceiptArray result_ports(channel_array.size());
|
| for (size_t i = 0; i < channel_array.size(); i++) {
|
| result_ports[i] = channel_array[i];
|
| }
|
|
|
| - channels.swap(result_ports);
|
| + receipts.swap(result_ports);
|
| message_queue_.pop();
|
| return true;
|
| }
|
|
|