ScriptExecutionContext::Task parameters should always be rvalue references
authorzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 18 Jun 2014 17:53:33 +0000 (17:53 +0000)
committerzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 18 Jun 2014 17:53:33 +0000 (17:53 +0000)
commitfc324fb63011ad53a4dd91484fd36c179e4b289a
treefa47f87684aa73862b9f9e0b72ad7a694e762465
parent477ccd3e580f9b2d014bd7fbec75525fe0058d97
ScriptExecutionContext::Task parameters should always be rvalue references
https://bugs.webkit.org/show_bug.cgi?id=133615

Reviewed by Darin Adler.

ScriptExecutionContext::Task parameters should be rvalue references as the
passed-in objects are always ScriptExecutionContext::Task rvalues that were
implicitly constructed from a lambda function or rvalues of objects that
derive from ScriptExecutionContext::Task.

This isn't really necessary since ScriptExecutionContext::Task is non-copyable
and we have to use move semantics anyway, but it makes it clear that these
objects are expiring rvalues that must be properly dealt with.

* dom/Document.cpp:
(WebCore::Document::postTask):
* dom/Document.h:
* dom/ScriptExecutionContext.h:
* workers/DefaultSharedWorkerRepository.cpp:
(WebCore::SharedWorkerProxy::postTaskToLoader):
(WebCore::SharedWorkerProxy::postTaskForModeToWorkerGlobalScope):
* workers/WorkerGlobalScope.cpp:
(WebCore::WorkerGlobalScope::postTask):
* workers/WorkerGlobalScope.h:
* workers/WorkerLoaderProxy.h:
* workers/WorkerMessagingProxy.cpp:
(WebCore::WorkerMessagingProxy::postTaskToLoader):
(WebCore::WorkerMessagingProxy::postTaskForModeToWorkerGlobalScope):
* workers/WorkerMessagingProxy.h:
* workers/WorkerRunLoop.cpp:
(WebCore::WorkerRunLoop::postTask):
(WebCore::WorkerRunLoop::postTaskAndTerminate):
(WebCore::WorkerRunLoop::postTaskForMode):
(WebCore::WorkerRunLoop::Task::create):
(WebCore::WorkerRunLoop::Task::Task):
* workers/WorkerRunLoop.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170106 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed:
Source/WebCore/ChangeLog
Source/WebCore/dom/Document.cpp
Source/WebCore/dom/Document.h
Source/WebCore/dom/ScriptExecutionContext.h
Source/WebCore/workers/DefaultSharedWorkerRepository.cpp
Source/WebCore/workers/WorkerGlobalScope.cpp
Source/WebCore/workers/WorkerGlobalScope.h
Source/WebCore/workers/WorkerLoaderProxy.h
Source/WebCore/workers/WorkerMessagingProxy.cpp
Source/WebCore/workers/WorkerMessagingProxy.h
Source/WebCore/workers/WorkerRunLoop.cpp
Source/WebCore/workers/WorkerRunLoop.h