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

Unified Diff: third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp

Issue 1916703002: Prepare for move-only PassOwnPtr in the remaining directories. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@core1
Patch Set: Merge with trunk. Created 4 years, 8 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: third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp b/third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp
index 8d0d19c24a6b5f6934da01047a5fadc2478a7bac..b1ac919bf2f569928e015ab3e0c80a957640c662 100644
--- a/third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp
+++ b/third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp
@@ -265,26 +265,26 @@ void WebSharedWorkerImpl::workerThreadTerminatedOnMainThread()
void WebSharedWorkerImpl::postTaskToLoader(PassOwnPtr<ExecutionContextTask> task)
{
- m_mainFrame->frame()->document()->postTask(BLINK_FROM_HERE, task);
+ m_mainFrame->frame()->document()->postTask(BLINK_FROM_HERE, std::move(task));
}
bool WebSharedWorkerImpl::postTaskToWorkerGlobalScope(PassOwnPtr<ExecutionContextTask> task)
{
- m_workerThread->postTask(BLINK_FROM_HERE, task);
+ m_workerThread->postTask(BLINK_FROM_HERE, std::move(task));
return true;
}
void WebSharedWorkerImpl::connect(WebMessagePortChannel* webChannel)
{
workerThread()->postTask(
- BLINK_FROM_HERE, createCrossThreadTask(&connectTask, adoptPtr(webChannel)));
+ BLINK_FROM_HERE, createCrossThreadTask(&connectTask, passed(adoptPtr(webChannel))));
}
void WebSharedWorkerImpl::connectTask(PassOwnPtr<WebMessagePortChannel> channel, ExecutionContext* context)
{
// Wrap the passed-in channel in a MessagePort, and send it off via a connect event.
MessagePort* port = MessagePort::create(*context);
- port->entangle(channel);
+ port->entangle(std::move(channel));
WorkerGlobalScope* workerGlobalScope = toWorkerGlobalScope(context);
ASSERT_WITH_SECURITY_IMPLICATION(workerGlobalScope->isSharedWorkerGlobalScope());
workerGlobalScope->dispatchEvent(createConnectEvent(port));

Powered by Google App Engine
This is Rietveld 408576698