Last Comment Bug 590036 - Make eval(json-like string) fast for arrays too
: Make eval(json-like string) fast for arrays too
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: unspecified
: All All
-- enhancement (vote)
: ---
Assigned To: Tom Schuster [:evilpie]
: Jason Orendorff [:jorendorff]
Depends on: 578216
  Show dependency treegraph
Reported: 2010-08-23 22:38 PDT by Jesse Ruderman
Modified: 2014-04-25 15:18 PDT (History)
14 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

v1 (3.19 KB, patch)
2011-12-04 05:09 PST, Tom Schuster [:evilpie]
jorendorff: review+
Details | Diff | Splinter Review

Description User image Jesse Ruderman 2010-08-23 22:38:02 PDT
If a string passed to eval starts with '[', it's reasonable to try the JSON parser.  We did this for '(' in bug 578216.
Comment 1 User image Nicholas Nethercote [:njn] 2010-08-23 22:46:26 PDT
We should work out the test failures in bug 578216 first, though!
Comment 2 User image Tom Schuster [:evilpie] 2011-12-04 05:09:50 PST
Created attachment 578897 [details] [diff] [review]

This takes about 1/3 of the time and should be safe to do.
Comment 3 User image Jason Orendorff [:jorendorff] 2011-12-06 08:44:11 PST
Comment on attachment 578897 [details] [diff] [review]

Sure, ok.
Comment 4 User image Tom Schuster [:evilpie] 2011-12-13 11:24:52 PST

Note You need to log in before you can comment on or make changes to this bug.