Bug 133375

Summary: Replace uses of CrossThreadTask in DefaultSharedWorkerRepository, WorkerMessagingProxy with C++11 lambdas
Product: WebKit Reporter: Zan Dobersek <zan>
Component: New BugsAssignee: Zan Dobersek <zan>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch darin: review+

Zan Dobersek
Reported 2014-05-29 04:21:10 PDT
Replaces uses of CrossThreadTask with C++11 lambdas
Attachments
Patch (10.22 KB, patch)
2014-05-29 04:25 PDT, Zan Dobersek
no flags
Patch (12.90 KB, patch)
2014-06-05 02:13 PDT, Zan Dobersek
darin: review+
Zan Dobersek
Comment 1 2014-05-29 04:25:21 PDT
WebKit Commit Bot
Comment 2 2014-05-29 04:28:34 PDT
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.
Darin Adler
Comment 3 2014-05-31 15:35:11 PDT
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?
Zan Dobersek
Comment 4 2014-06-05 02:12:32 PDT
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.
Zan Dobersek
Comment 5 2014-06-05 02:13:28 PDT
WebKit Commit Bot
Comment 6 2014-06-05 02:14:19 PDT
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.
Zan Dobersek
Comment 7 2014-06-07 06:07:26 PDT
Note You need to log in before you can comment on or make changes to this bug.