Bug 244670 - Support desired callback queue for loadFromHTMLWithData to prevent deadlocks
Summary: Support desired callback queue for loadFromHTMLWithData to prevent deadlocks
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit API (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-09-01 08:53 PDT by Jonathan Bedard
Modified: 2022-09-04 12:16 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Bedard 2022-09-01 08:53:20 PDT
The UIKit usage of this API permits public clients to call into `loadObjectOfClass` from the main queue, therefore typically spinning the run loop or using semaphores. As a result, it’ll deadlock due to loadFromHTMLWithData always re-dispatching back out onto the main queue for its callback.

The only way to get around this is to provide a callback queue up front.
Comment 1 Jonathan Bedard 2022-09-01 08:53:43 PDT
<rdar://problem/99404547>
Comment 2 Kieran Senior 2022-09-01 09:14:20 PDT
Pull request: https://github.com/WebKit/WebKit/pull/3897