WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 9182
Add support for toSource and/or uneval
https://bugs.webkit.org/show_bug.cgi?id=9182
Summary
Add support for toSource and/or uneval
Jesse Ruderman
Reported
2006-05-31 02:34:35 PDT
Firefox'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("foo") --> "\"foo\"" uneval({a:1}) --> "({a:1})" I'm not sure if uneval and toSource are the same. I have the feeling they're not.
Attachments
Add attachment
proposed patch, testcase, etc.
Jesse Ruderman
Comment 1
2007-05-09 18:22:45 PDT
I of course meant "toSource", not "toString".
Oliver Hunt
Comment 2
2008-01-24 20:48:58 PST
This makes it easier to run jsfunfuzz
https://bugzilla.mozilla.org/attachment.cgi?id=240710
Oliver Hunt
Comment 3
2008-01-24 20:54:55 PST
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);
Oliver Hunt
Comment 4
2009-07-07 22:49:29 PDT
We support JSON.stringify now which is basically what was being requested
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug