Bug 222005 - REGRESSION (r271493 ) Crash in +[NSAttributedString(WKPrivate) _loadFromHTMLWithOptions:contentLoader:completionHandler:] on background thread
Summary: REGRESSION (r271493 ) Crash in +[NSAttributedString(WKPrivate) _loadFromHTMLW...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-02-16 15:12 PST by Brady Eidson
Modified: 2021-02-16 18:32 PST (History)
2 users (show)

See Also:


Attachments
Patch (1.59 KB, patch)
2021-02-16 15:54 PST, Brady Eidson
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brady Eidson 2021-02-16 15:12:38 PST
REGRESSION (r271493 ) Crash in +[NSAttributedString(WKPrivate) _loadFromHTMLWithOptions:contentLoader:completionHandler:] on background thread

This method is meant to be thread safe by dispatching background thread work back up to WebKit's main thread.

If called before Webkit is initialized on the main thread, it gets it wrong.

Restore this call site back to dispatch_async to fix.
Comment 1 Brady Eidson 2021-02-16 15:54:28 PST
Created attachment 420556 [details]
Patch

Even tried to write a test, but TestWebKitAPI isn't set up right for it :)
Comment 2 Geoffrey Garen 2021-02-16 16:13:24 PST
Comment on attachment 420556 [details]
Patch

r=me
Comment 3 EWS 2021-02-16 18:31:35 PST
Committed r272972: <https://commits.webkit.org/r272972>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 420556 [details].
Comment 4 Radar WebKit Bug Importer 2021-02-16 18:32:15 PST
<rdar://problem/74416544>