Make eval(json-like string) fast for arrays too

RESOLVED FIXED

Status

()

Core
JavaScript Engine
--
enhancement
RESOLVED FIXED
7 years ago
3 years ago

People

(Reporter: Jesse Ruderman, Assigned: evilpie)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

7 years ago
If a string passed to eval starts with '[', it's reasonable to try the JSON parser.  We did this for '(' in bug 578216.
We should work out the test failures in bug 578216 first, though!
(Assignee)

Updated

6 years ago
Assignee: general → evilpies
(Assignee)

Comment 2

6 years ago
Created attachment 578897 [details] [diff] [review]
v1

This takes about 1/3 of the time and should be safe to do.
Attachment #578897 - Flags: review?(jorendorff)
Comment on attachment 578897 [details] [diff] [review]
v1

Sure, ok.
Attachment #578897 - Flags: review?(jorendorff) → review+
(Assignee)

Comment 4

5 years ago
http://hg.mozilla.org/mozilla-central/rev/317182c27445
(Assignee)

Updated

5 years ago
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.