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

Unified Diff: webkit/tools/test_shell/test_worker/test_webworker.cc

Issue 173193: Updating Worker.postMessage(), DOMWindow.postMessage(), and... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 4 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
« no previous file with comments | « webkit/tools/test_shell/test_worker/test_webworker.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/tools/test_shell/test_worker/test_webworker.cc
===================================================================
--- webkit/tools/test_shell/test_worker/test_webworker.cc (revision 23787)
+++ webkit/tools/test_shell/test_worker/test_webworker.cc (working copy)
@@ -40,8 +40,9 @@
webworker_impl_->startWorkerContext(script_url, user_agent, source_code);
+ WebKit::WebMessagePortChannelArray emptyArray;
for (size_t i = 0; i < queued_messages_.size(); ++i)
- webworker_impl_->postMessageToWorkerContext(queued_messages_[i], NULL);
+ webworker_impl_->postMessageToWorkerContext(queued_messages_[i], emptyArray);
queued_messages_.clear();
}
@@ -50,10 +51,11 @@
webworker_impl_->terminateWorkerContext();
}
-void TestWebWorker::postMessageToWorkerContext(const WebString& message,
- WebKit::WebMessagePortChannel*) {
+void TestWebWorker::postMessageToWorkerContext(
+ const WebString& message,
+ const WebKit::WebMessagePortChannelArray& channels) {
if (webworker_impl_)
- webworker_impl_->postMessageToWorkerContext(message, NULL);
+ webworker_impl_->postMessageToWorkerContext(message, channels);
else
queued_messages_.push_back(message);
}
@@ -66,15 +68,16 @@
Release(); // Releases the reference held for worker object.
}
-void TestWebWorker::postMessageToWorkerObject(const WebString& message,
- WebKit::WebMessagePortChannel*) {
+void TestWebWorker::postMessageToWorkerObject(
+ const WebString& message,
+ const WebKit::WebMessagePortChannelArray& channels) {
if (!webworkerclient_delegate_)
return;
// The string was created in the dll's memory space as a result of a postTask.
// If we pass it to test shell's memory space, it'll cause problems when GC
// occurs. So duplicate it from the test shell's memory space first.
webworkerclient_delegate_->postMessageToWorkerObject(
- webworker_helper_->DuplicateString(message), NULL);
+ webworker_helper_->DuplicateString(message), channels);
}
void TestWebWorker::postExceptionToWorkerObject(const WebString& error_message,
« no previous file with comments | « webkit/tools/test_shell/test_worker/test_webworker.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698