Replaces uses of CrossThreadTask with C++11 lambdas
Created attachment 232241 [details] Patch
Attachment 232241 [details] did not pass style-queue: ERROR: Source/WebCore/workers/DefaultSharedWorkerRepository.cpp:186: Multi line control clauses should use braces. [whitespace/braces] [4] Total errors found: 1 in 3 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 232241 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=232241&action=review Looks good. I’d like to eliminate the context argument to the function at some point. I don’t think it adds much over a function with no arguments. > Source/WebCore/workers/DefaultSharedWorkerRepository.cpp:188 > + context->reportException(errorMessageCopy, lineNumber, columnNumber, sourceURLCopy); Need to add a nullptr to this line, after sourceURLCopy. > Source/WebCore/workers/WorkerMessagingProxy.cpp:170 > + if (this->askedToTerminate()) No need for "this->" here. > Source/WebCore/workers/WorkerMessagingProxy.cpp:238 > + toWorkerGlobalScope(context)->workerInspectorController().disconnectFrontend(Inspector::InspectorDisconnectReason::InspectorDestroyed); Could we just capture a worker global scope here instead of casting the context?
Comment on attachment 232241 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=232241&action=review >> Source/WebCore/workers/WorkerMessagingProxy.cpp:170 >> + if (this->askedToTerminate()) > > No need for "this->" here. Right, and it can be removed in some other places as well. >> Source/WebCore/workers/WorkerMessagingProxy.cpp:238 >> + toWorkerGlobalScope(context)->workerInspectorController().disconnectFrontend(Inspector::InspectorDisconnectReason::InspectorDestroyed); > > Could we just capture a worker global scope here instead of casting the context? Where from? This task is posted in WorkerMessagingProxy::disconnectFromInspector(), and there's no WorkerGlobalScope available there for capturing.
Created attachment 232531 [details] Patch
Attachment 232531 [details] did not pass style-queue: ERROR: Source/WebCore/workers/DefaultSharedWorkerRepository.cpp:187: Multi line control clauses should use braces. [whitespace/braces] [4] Total errors found: 1 in 3 files If any of these errors are false positives, please file a bug against check-webkit-style.
Committed r169673: <http://trac.webkit.org/changeset/169673>