Bug 159725 - WebKit2 shouldn't signal custom protocol clients from the NSURLConnection loader thread.
Summary: WebKit2 shouldn't signal custom protocol clients from the NSURLConnection loa...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P1 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2016-07-13 10:18 PDT by Chris Dumez
Modified: 2016-07-13 13:02 PDT (History)
7 users (show)

See Also:


Attachments
Patch (5.54 KB, patch)
2016-07-13 10:40 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (5.60 KB, patch)
2016-07-13 12:47 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (5.61 KB, patch)
2016-07-13 12:54 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2016-07-13 10:18:09 PDT
WebKit2 shouldn't signal custom protocol clients from the NSURLConnection loader thread.
Comment 1 Chris Dumez 2016-07-13 10:18:26 PDT
<rdar://problem/27323131>
Comment 2 Chris Dumez 2016-07-13 10:40:17 PDT
Created attachment 283543 [details]
Patch
Comment 3 WebKit Commit Bot 2016-07-13 10:41:37 PDT
Attachment 283543 [details] did not pass style-queue:


ERROR: Source/WebKit2/NetworkProcess/CustomProtocols/Cocoa/CustomProtocolManagerCocoa.mm:69:  Should not have spaces around = in property synthesis.  [whitespace/property] [4]
Total errors found: 1 in 2 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 Andy Estes 2016-07-13 12:31:37 PDT
Comment on attachment 283543 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=283543&action=review

> Source/WebKit2/NetworkProcess/CustomProtocols/Cocoa/CustomProtocolManagerCocoa.mm:60
> +    CFRunLoopRef _initializationRunLoop;

I'd use a RetainPtr for this.

> Source/WebKit2/NetworkProcess/CustomProtocols/Cocoa/CustomProtocolManagerCocoa.mm:95
> +    _initializationRunLoop = CFRunLoopGetCurrent();

This needs to be retained.
Comment 5 Chris Dumez 2016-07-13 12:47:04 PDT
Created attachment 283561 [details]
Patch
Comment 6 Andy Estes 2016-07-13 12:51:17 PDT
Comment on attachment 283561 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=283561&action=review

> Source/WebKit2/NetworkProcess/CustomProtocols/Cocoa/CustomProtocolManagerCocoa.mm:197
> -    CFRunLoopPerformBlock([NSURLConnection resourceLoaderRunLoop], kCFRunLoopDefaultMode, block);
> -    CFRunLoopWakeUp([NSURLConnection resourceLoaderRunLoop]);
> +    CFRunLoopPerformBlock(protocol.initializationRunLoop, kCFRunLoopDefaultMode, block);
> +    CFRunLoopWakeUp(protocol.initializationRunLoop);

Nit: It'd be slightly nicer to store protocol.initializationRunLoop in a local variable.
Comment 7 Chris Dumez 2016-07-13 12:53:19 PDT
Comment on attachment 283561 [details]
Patch

I'll fix the nit.
Comment 8 Chris Dumez 2016-07-13 12:54:03 PDT
Created attachment 283562 [details]
Patch
Comment 9 Chris Dumez 2016-07-13 13:01:58 PDT
Comment on attachment 283562 [details]
Patch

Clearing flags on attachment: 283562

Committed r203174: <http://trac.webkit.org/changeset/203174>
Comment 10 Chris Dumez 2016-07-13 13:02:03 PDT
All reviewed patches have been landed.  Closing bug.