| Index: content/worker/webworker_stub.cc
|
| diff --git a/content/worker/webworker_stub.cc b/content/worker/webworker_stub.cc
|
| index f782bb34d027612909cc74bca5ad19719df0953a..c146a65a96773e6d2e40c45845709d2a44464215 100644
|
| --- a/content/worker/webworker_stub.cc
|
| +++ b/content/worker/webworker_stub.cc
|
| @@ -11,6 +11,7 @@
|
| #include "content/common/webmessageportchannel_impl.h"
|
| #include "content/common/worker_messages.h"
|
| #include "content/worker/worker_devtools_agent.h"
|
| +#include "third_party/WebKit/Source/WebKit/chromium/public/WebMessagePortChannel.h"
|
| #include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h"
|
| #include "third_party/WebKit/Source/WebKit/chromium/public/WebURL.h"
|
| #include "third_party/WebKit/Source/WebKit/chromium/public/WebWorker.h"
|
| @@ -71,11 +72,23 @@ void WebWorkerStub::OnPostMessage(
|
| const string16& message,
|
| const std::vector<int>& sent_message_port_ids,
|
| const std::vector<int>& new_routing_ids) {
|
| - WebKit::WebMessagePortChannelArray channels(sent_message_port_ids.size());
|
| + WebKit::WebTransferableReceiptArray receipts(sent_message_port_ids.size());
|
| for (size_t i = 0; i < sent_message_port_ids.size(); i++) {
|
| - channels[i] = new WebMessagePortChannelImpl(
|
| + WebMessagePortChannelImpl* impl = new WebMessagePortChannelImpl(
|
| new_routing_ids[i], sent_message_port_ids[i]);
|
| +#ifndef WebTransferableReceipt_h
|
| + receipts[i] = impl;
|
| +#else
|
| + receipts[i] = new WebKit::WebMessagePortReceipt(impl);
|
| +#endif
|
| }
|
|
|
| - impl_->postMessageToWorkerContext(message, channels);
|
| + impl_->postMessageToWorkerContext(message, receipts);
|
| +
|
| +#ifdef WebTransferableReceipt_h
|
| + for (size_t i = 0; i < receipts.size(); ++i) {
|
| + delete receipts[i];
|
| + receipts[i] = 0;
|
| + }
|
| +#endif
|
| }
|
|
|