RESOLVED FIXED 154966
Remove PassRefPtr from ThreadableLoader and relatives
https://bugs.webkit.org/show_bug.cgi?id=154966
Summary Remove PassRefPtr from ThreadableLoader and relatives
youenn fablet
Reported 2016-03-03 06:32:06 PST
We should remove PassRefPtr from ThreadableLoader and relatives.
Attachments
Patch (10.21 KB, patch)
2016-03-03 06:46 PST, youenn fablet
no flags
Patch for landing (10.44 KB, patch)
2016-03-03 23:27 PST, youenn fablet
no flags
youenn fablet
Comment 1 2016-03-03 06:46:35 PST
WebKit Commit Bot
Comment 2 2016-03-03 06:48:23 PST
Attachment 272756 [details] did not pass style-queue: ERROR: Source/WebCore/loader/WorkerThreadableLoader.cpp:89: Code inside a namespace should not be indented. [whitespace/indent] [4] ERROR: Source/WebCore/loader/WorkerThreadableLoader.cpp:89: Wrong number of spaces before statement. (expected: 8) [whitespace/indent] [4] Total errors found: 2 in 7 files If any of these errors are false positives, please file a bug against check-webkit-style.
Darin Adler
Comment 3 2016-03-03 09:08:19 PST
Comment on attachment 272756 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=272756&action=review > Source/WebCore/loader/DocumentThreadableLoader.cpp:79 > return DocumentThreadableLoader::create(document, client, request, options, nullptr); Should just be "return create"; no need to repeat the class name. > Source/WebCore/loader/ThreadableLoader.cpp:75 > ASSERT(client); > ASSERT(context); Note these two heavy clues that the context and client arguments should be references, not pointers. > Source/WebCore/loader/WorkerThreadableLoader.cpp:55 > + , m_bridge(*(new MainThreadBridge(*m_workerClientWrapper, workerGlobalScope->thread().workerLoaderProxy(), taskMode, request, options, workerGlobalScope->url().strippedForUseAsReferrer(), workerGlobalScope->securityOrigin(), workerGlobalScope->contentSecurityPolicy()))) Extra parentheses here around the call to "new" are unneeded.
youenn fablet
Comment 4 2016-03-03 23:27:16 PST
Created attachment 272836 [details] Patch for landing
youenn fablet
Comment 5 2016-03-03 23:30:24 PST
Thanks for the review. (In reply to comment #3) > Comment on attachment 272756 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=272756&action=review > > > Source/WebCore/loader/DocumentThreadableLoader.cpp:79 > > return DocumentThreadableLoader::create(document, client, request, options, nullptr); > > Should just be "return create"; no need to repeat the class name. Fixed. > > Source/WebCore/loader/ThreadableLoader.cpp:75 > > ASSERT(client); > > ASSERT(context); > > Note these two heavy clues that the context and client arguments should be > references, not pointers. Yes, code could be improved with that respect. There might also be some RefPtr->Ref changes. > > Source/WebCore/loader/WorkerThreadableLoader.cpp:55 > > + , m_bridge(*(new MainThreadBridge(*m_workerClientWrapper, workerGlobalScope->thread().workerLoaderProxy(), taskMode, request, options, workerGlobalScope->url().strippedForUseAsReferrer(), workerGlobalScope->securityOrigin(), workerGlobalScope->contentSecurityPolicy()))) > > Extra parentheses here around the call to "new" are unneeded. Fixed.
WebKit Commit Bot
Comment 6 2016-03-04 00:27:28 PST
Comment on attachment 272836 [details] Patch for landing Clearing flags on attachment: 272836 Committed r197551: <http://trac.webkit.org/changeset/197551>
WebKit Commit Bot
Comment 7 2016-03-04 00:27:33 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.