Summary: | JSC should not be using WTF::String::createCFString(). | ||
---|---|---|---|
Product: | WebKit | Reporter: | Mark Lam <mark.lam> |
Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> |
Status: | NEW --- | ||
Severity: | Normal | CC: | fpizlo, keith_miller, msaboff, rmorisset, saam, tzagallo, ysuzuki |
Priority: | P2 | ||
Version: | WebKit Nightly Build | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=203873 |
Description
Mark Lam
2019-11-05 18:24:47 PST
There is other WTF functions that are internally using createCFString (like, mac/FileSystemMac.mm). So they should be changed too since these functions can be called from JSC. Why is this a bad idiom? Just because we don't want to allocate CF strings? (In reply to Keith Miller from comment #2) > Why is this a bad idiom? Just because we don't want to allocate CF strings? Because String::createCFString() uses StringImpl::createCFString(), which relies on the concept of isMainThread(), which is only meaningful if WebCore is the client of JSC. For all other clients, this can result in badness. |