Replace uses of CrossThreadTask in DefaultSharedWorkerRepository, WorkerMessagingProx...
authorzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 7 Jun 2014 13:06:47 +0000 (13:06 +0000)
committerzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 7 Jun 2014 13:06:47 +0000 (13:06 +0000)
commit25a34f280e55b6bddf80775cb9a2682bed2ccd7e
tree53ac55aa5789740b87517b2ce3770f34e5179b60
parent00bd6083af14e74e031fd286d77302a6d689ae3d
Replace uses of CrossThreadTask in DefaultSharedWorkerRepository, WorkerMessagingProxy with C++11 lambdas
https://bugs.webkit.org/show_bug.cgi?id=133375

Reviewed by Darin Adler.

Uses of CrossThreadTask in the two classes are replaced with C++11 lambdas.
The necessary cross-thread copies are created manually and passed into the
lambdas by value, removing the need for CrossThreadTask and its use of CrossThreadCopier.

Remove the explicit use of this pointer in some lambdas -- it is captured automatically when
capturing by value, so enforcing its capturing through explicit use is not necessary.

* workers/DefaultSharedWorkerRepository.cpp:
(WebCore::SharedWorkerProxy::postExceptionToWorkerObject):
(WebCore::SharedWorkerProxy::postConsoleMessageToWorkerObject):
(WebCore::postExceptionTask): Deleted.
(WebCore::postConsoleMessageTask): Deleted.
* workers/WorkerMessagingProxy.cpp:
(WebCore::WorkerMessagingProxy::postMessageToWorkerObject):
(WebCore::WorkerMessagingProxy::postConsoleMessageToWorkerObject):
(WebCore::WorkerMessagingProxy::workerObjectDestroyed):
(WebCore::WorkerMessagingProxy::notifyNetworkStateChange):
(WebCore::WorkerMessagingProxy::connectToInspector):
(WebCore::WorkerMessagingProxy::disconnectFromInspector):
(WebCore::WorkerMessagingProxy::sendMessageToInspector):
(WebCore::WorkerMessagingProxy::postMessageToPageInspector):
(WebCore::WorkerMessagingProxy::confirmMessageFromWorkerObject):
(WebCore::WorkerMessagingProxy::reportPendingActivity):
(WebCore::postConsoleMessageTask): Deleted.
(WebCore::WorkerMessagingProxy::workerObjectDestroyedInternal): Deleted.
(WebCore::connectToWorkerGlobalScopeInspectorTask): Deleted.
(WebCore::disconnectFromWorkerGlobalScopeInspectorTask): Deleted.
(WebCore::dispatchOnInspectorBackendTask): Deleted.
* workers/WorkerMessagingProxy.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@169673 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/workers/DefaultSharedWorkerRepository.cpp
Source/WebCore/workers/WorkerMessagingProxy.cpp
Source/WebCore/workers/WorkerMessagingProxy.h