<?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>5154</bug_id>
          
          <creation_ts>2005-09-27 11:54:49 -0700</creation_ts>
          <short_desc>JSC should switch from Core Foundation to unix time/date functions</short_desc>
          <delta_ts>2005-10-09 14:08:54 -0700</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>420+</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.4</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>5280</dup_id>
          
          <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="Geoffrey Garen">ggaren</reporter>
          <assigned_to name="Darin Adler">darin</assigned_to>
          <cc>ap</cc>
    
    <cc>darin</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>20672</commentid>
    <comment_count>0</comment_count>
    <who name="Geoffrey Garen">ggaren</who>
    <bug_when>2005-09-27 11:54:49 -0700</bug_when>
    <thetext>There are two parts to this task:

1. Change e.g. localtime calls to e.g. localtime_r calls.
2. Remove Core Foundation calls and replace with true unix calls.

The CF stuff was a performance hack that we no longer need. 

The non-_r time/date functions are not thread-safe or re-entrant. This can cause surprising bugs due to 
more than one time/date call in the same call stack or using date code on multiple threads.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20675</commentid>
    <comment_count>1</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2005-09-27 13:36:43 -0700</bug_when>
    <thetext>Actually, on Darwin, localtime() uses a per-thread global &lt;http://darwinsource.opendarwin.org/10.4.2/
Libc-391/stdtime/FreeBSD/localtime.c&gt;. A lot of other functions that used to operate on static globals do 
the same.

MS Windows doesn&apos;t have localtime_r at all (if Windows portability is a concern).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20981</commentid>
    <comment_count>2</comment_count>
    <who name="Geoffrey Garen">ggaren</who>
    <bug_when>2005-09-30 08:53:48 -0700</bug_when>
    <thetext>OK, thread safety is no longer a concern. The call stack problem remains, but I suppose that just calls for 
careful coding.

So, let&apos;s use this bug just to track the switch away from CF calls.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21601</commentid>
    <comment_count>3</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2005-10-08 23:24:55 -0700</bug_when>
    <thetext>To fix bug 5280, I recommended we do this. And my patch attached to bug 5280 does this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21626</commentid>
    <comment_count>4</comment_count>
    <who name="Geoffrey Garen">ggaren</who>
    <bug_when>2005-10-09 14:08:54 -0700</bug_when>
    <thetext>Changing the bug name to reflect that the remaining work is to switch away from CF calls.

*** This bug has been marked as a duplicate of 5280 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>