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

Unified Diff: content/child/service_worker/web_service_worker_impl.cc

Issue 2422793002: HTML MessagePort as mojo::MessagePipeHandle (Closed)
Patch Set: Address feedback from Selim 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: content/child/service_worker/web_service_worker_impl.cc
diff --git a/content/child/service_worker/web_service_worker_impl.cc b/content/child/service_worker/web_service_worker_impl.cc
index 947359eb70a9e7f794c2934d61a3ffa0a60af94c..5583ecd1943078292012813f273227c81fd3565b 100644
--- a/content/child/service_worker/web_service_worker_impl.cc
+++ b/content/child/service_worker/web_service_worker_impl.cc
@@ -43,16 +43,15 @@ class HandleImpl : public blink::WebServiceWorker::Handle {
DISALLOW_COPY_AND_ASSIGN(HandleImpl);
};
-void SendPostMessageToWorkerOnMainThread(
- ThreadSafeSender* thread_safe_sender,
- int handle_id,
- int provider_id,
- const base::string16& message,
- const url::Origin& source_origin,
- std::unique_ptr<WebMessagePortChannelArray> channels) {
+void SendPostMessageToWorkerOnMainThread(ThreadSafeSender* thread_safe_sender,
+ int handle_id,
+ int provider_id,
+ const base::string16& message,
+ const url::Origin& source_origin,
+ WebMessagePortChannelArray channels) {
thread_safe_sender->Send(new ServiceWorkerHostMsg_PostMessageToWorker(
handle_id, provider_id, message, source_origin,
- WebMessagePortChannelImpl::ExtractMessagePortIDs(std::move(channels))));
+ WebMessagePortChannelImpl::ExtractMessagePorts(std::move(channels))));
}
} // namespace
@@ -101,7 +100,7 @@ void WebServiceWorkerImpl::postMessage(
blink::WebServiceWorkerProvider* provider,
const WebString& message,
const WebSecurityOrigin& source_origin,
- WebMessagePortChannelArray* channels) {
+ WebMessagePortChannelArray channels) {
WebServiceWorkerProviderImpl* provider_impl =
static_cast<WebServiceWorkerProviderImpl*>(provider);
ServiceWorkerDispatcher* dispatcher =
@@ -120,7 +119,7 @@ void WebServiceWorkerImpl::postMessage(
// We convert WebString to string16 before crossing
// threads for thread-safety.
message.utf16(), url::Origin(source_origin),
- base::Passed(base::WrapUnique(channels))));
+ base::Passed(&channels)));
kinuko 2017/02/09 06:21:30 I think we could remove this PostTask too? Could
}
void WebServiceWorkerImpl::terminate() {

Powered by Google App Engine
This is Rietveld 408576698