<?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>9182</bug_id>
          
          <creation_ts>2006-05-31 02:34:35 -0700</creation_ts>
          <short_desc>Add support for toSource and/or uneval</short_desc>
          <delta_ts>2009-07-07 22:49:29 -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>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Enhancement</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jesse Ruderman">jruderman</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>emacemac7</cc>
    
    <cc>gavin.sharp</cc>
    
    <cc>ian</cc>
    
    <cc>mike</cc>
    
    <cc>mjs</cc>
    
    <cc>mrowe</cc>
    
    <cc>oliver</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>44099</commentid>
    <comment_count>0</comment_count>
    <who name="Jesse Ruderman">jruderman</who>
    <bug_when>2006-05-31 02:34:35 -0700</bug_when>
    <thetext>Firefox&apos;s toString and uneval are pretty handy.  It would be nice if I could use them in WebKit, instead of having to serialize strings and objects manually when I want to port something from Gecko to WebKit.

uneval(&quot;foo&quot;) --&gt; &quot;\&quot;foo\&quot;&quot;
uneval({a:1}) --&gt; &quot;({a:1})&quot;

I&apos;m not sure if uneval and toSource are the same.  I have the feeling they&apos;re not.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10532</commentid>
    <comment_count>1</comment_count>
    <who name="Jesse Ruderman">jruderman</who>
    <bug_when>2007-05-09 18:22:45 -0700</bug_when>
    <thetext>I of course meant &quot;toSource&quot;, not &quot;toString&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68184</commentid>
    <comment_count>2</comment_count>
    <who name="Oliver Hunt">oliver</who>
    <bug_when>2008-01-24 20:48:58 -0800</bug_when>
    <thetext>This makes it easier to run jsfunfuzz https://bugzilla.mozilla.org/attachment.cgi?id=240710</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68185</commentid>
    <comment_count>3</comment_count>
    <who name="Oliver Hunt">oliver</who>
    <bug_when>2008-01-24 20:54:55 -0800</bug_when>
    <thetext>Hmm, some digging would appear to indicate there is no way to define a self referencing parameter in json :-/

eg. a=[]; a[0]=a; uneval(a);

or at a greater extreme:
a = {b:{c:a}}; a.c = a.b.c; uneval(a);</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>130372</commentid>
    <comment_count>4</comment_count>
    <who name="Oliver Hunt">oliver</who>
    <bug_when>2009-07-07 22:49:29 -0700</bug_when>
    <thetext>We support JSON.stringify now which is basically what was being requested</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>