WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
115539
[WK2][CustomProtocols] NSURLProtocolClient methods should be dispatched on NSURLConnection's resource loader run loop
https://bugs.webkit.org/show_bug.cgi?id=115539
Summary
[WK2][CustomProtocols] NSURLProtocolClient methods should be dispatched on NS...
Andy Estes
Reported
2013-05-02 17:26:21 PDT
[WK2][CustomProtocols] NSURLProtocolClient methods should be dispatched on NSURLConnection's resource loader run loop
Attachments
Patch
(6.59 KB, patch)
2013-05-02 17:37 PDT
,
Andy Estes
ap
: review+
ap
: commit-queue-
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Andy Estes
Comment 1
2013-05-02 17:28:26 PDT
<
rdar://problem/13695891
>
Andy Estes
Comment 2
2013-05-02 17:37:03 PDT
Created
attachment 200378
[details]
Patch
Alexey Proskuryakov
Comment 3
2013-05-02 23:01:41 PDT
Comment on
attachment 200378
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=200378&action=review
> Source/WebKit2/Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm:205 > + RetainPtr<NSError> nsError(error.nsError());
I think that we prefer assignment syntax to initialization.
> Source/WebKit2/Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm:220 > + RetainPtr<NSData> nsData([NSData dataWithBytes:(void*)data.data() length:data.size()]);
This should be RetainPtr<NSData> nsData = adoptNS([[NSData alloc] initWithBytes:...]). No need to create an autoreleased object and thrash its refcount.
> Source/WebKit2/Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm:233 > + RetainPtr<NSURLResponse> nsResponse(response.nsURLResponse());
I think that we prefer assignment syntax to initialization.
> Source/WebKit2/Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm:269 > +void CustomProtocolManager::dispatchOnResourceLoaderRunLoop(void (^block)()) > +{ > + CFRunLoopPerformBlock([NSURLConnection resourceLoaderRunLoop], kCFRunLoopDefaultMode, block); > + CFRunLoopWakeUp([NSURLConnection resourceLoaderRunLoop]); > +}
This looks like it should be a static function in .mm file.
Andy Estes
Comment 4
2013-05-03 00:09:58 PDT
Committed
r149520
: <
http://trac.webkit.org/changeset/149520
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug