Bug 115223 - [WebKit2] Loading a resource from a custom protocol in a synchronous XHR times out
Summary: [WebKit2] Loading a resource from a custom protocol in a synchronous XHR time...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac All
: P2 Normal
Assignee: Andy Estes
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2013-04-25 22:32 PDT by Andy Estes
Modified: 2013-04-26 11:14 PDT (History)
6 users (show)

See Also:


Attachments
Patch (35.41 KB, patch)
2013-04-25 22:58 PDT, Andy Estes
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andy Estes 2013-04-25 22:32:11 PDT
[WebKit2] Loading a resource from a custom protocol in a synchronous XHR times out
Comment 1 Andy Estes 2013-04-25 22:33:14 PDT
<rdar://problem/12890540>
Comment 2 Andy Estes 2013-04-25 22:58:46 PDT
Created attachment 199785 [details]
Patch
Comment 3 Andy Estes 2013-04-26 09:54:26 PDT
Committed r149194: <http://trac.webkit.org/changeset/149194>
Comment 4 Alexey Proskuryakov 2013-04-26 10:09:21 PDT
This change means that messages are now handled on a secondary thread. What is the design for CustomProtocolManager thread safety?
Comment 5 Andy Estes 2013-04-26 10:22:02 PDT
(In reply to comment #4)
> This change means that messages are now handled on a secondary thread. What is the design for CustomProtocolManager thread safety?

The messages that are handled on this thread do two things:

1) Look up a WKCustomProtocol by ID. This was made thread-safe in <http://trac.webkit.org/changeset/149121>.
2) Call a method on NSURLProtocolClient. I believe this is thread-safe by code inspection.
Comment 6 Andy Estes 2013-04-26 10:29:19 PDT
(In reply to comment #4)
> This change means that messages are now handled on a secondary thread. What is the design for CustomProtocolManager thread safety?

Oh, we do need to protect m_registeredSchemes. We add/remove schemes to that set from the work queue but look them up from some thread managed by NSURLConnection. I'll fix that in a follow-up. Thanks for making me double-check!
Comment 7 Andy Estes 2013-04-26 11:14:28 PDT
(In reply to comment #6)
> I'll fix that in a follow-up.

Filed <https://bugs.webkit.org/show_bug.cgi?id=115267>.