<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>203875</bug_id>
          
          <creation_ts>2019-11-05 18:24:47 -0800</creation_ts>
          <short_desc>JSC should not be using WTF::String::createCFString().</short_desc>
          <delta_ts>2019-11-06 11:25:46 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>JavaScriptCore</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=203873</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Mark Lam">mark.lam</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>fpizlo</cc>
    
    <cc>keith_miller</cc>
    
    <cc>msaboff</cc>
    
    <cc>rmorisset</cc>
    
    <cc>saam</cc>
    
    <cc>tzagallo</cc>
    
    <cc>ysuzuki</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1587638</commentid>
    <comment_count>0</comment_count>
    <who name="Mark Lam">mark.lam</who>
    <bug_when>2019-11-05 18:24:47 -0800</bug_when>
    <thetext>After https://bugs.webkit.org/show_bug.cgi?id=203873, there&apos;s only one instance of this bad idiom: formatLocaleDate() in DatePrototype.cpp.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1587712</commentid>
    <comment_count>1</comment_count>
    <who name="Yusuke Suzuki">ysuzuki</who>
    <bug_when>2019-11-06 00:59:37 -0800</bug_when>
    <thetext>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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1587837</commentid>
    <comment_count>2</comment_count>
    <who name="Keith Miller">keith_miller</who>
    <bug_when>2019-11-06 10:46:54 -0800</bug_when>
    <thetext>Why is this a bad idiom? Just because we don&apos;t want to allocate CF strings?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1587846</commentid>
    <comment_count>3</comment_count>
    <who name="Mark Lam">mark.lam</who>
    <bug_when>2019-11-06 11:25:46 -0800</bug_when>
    <thetext>(In reply to Keith Miller from comment #2)
&gt; Why is this a bad idiom? Just because we don&apos;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.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>