Bug 135365 - Add an explicit way to initialize shared TextEncoding mappings besides accessing them.
Summary: Add an explicit way to initialize shared TextEncoding mappings besides access...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2014-07-28 16:11 PDT by Brady Eidson
Modified: 2014-07-28 16:39 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 Brady Eidson 2014-07-28 16:11:30 PDT
Add an explicit way to initialize shared TextEncoding mappings besides accessing them.

In a few places in code we know UTF8Encoding() will be accessed on a background thread, possibly before the text encoding maps are ever set up on the main thread.

We "fix" this by accessing the UTF8Encoding() on the main thread before the background thread gets going.

See LocalStorageDatabaseTracker::LocalStorageDatabaseTracker in WK2 for example.

That's only for one encoding.  We should have an explicit, obvious way of initializing all the common TextEncodings from the main thread when this comes up.

<rdar://problem/9127819>