NEW 203875
JSC should not be using WTF::String::createCFString().
https://bugs.webkit.org/show_bug.cgi?id=203875
Summary JSC should not be using WTF::String::createCFString().
Mark Lam
Reported 2019-11-05 18:24:47 PST
After https://bugs.webkit.org/show_bug.cgi?id=203873, there's only one instance of this bad idiom: formatLocaleDate() in DatePrototype.cpp.
Attachments
Yusuke Suzuki
Comment 1 2019-11-06 00:59:37 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.
Keith Miller
Comment 2 2019-11-06 10:46:54 PST
Why is this a bad idiom? Just because we don't want to allocate CF strings?
Mark Lam
Comment 3 2019-11-06 11:25:46 PST
(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.
Note You need to log in before you can comment on or make changes to this bug.