Closed Bug 521456 Opened 16 years ago Closed 15 years ago

Incorrect decompilation with "new eval"

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9.3a2

People

(Reporter: jruderman, Assigned: Waldo)

Details

(Keywords: testcase, Whiteboard: fixed-in-tracemonkey)

Attachments

(1 file)

js> (function() { new(eval('({s:1})').s) }) (function () {new eval("({s:1})").s;}) js> (function () {new eval("({s:1})").s;}) (function () {(new eval("({s:1})")).s;}) At some point, the error message for executing the function changes from TypeError: eval("({s:1})").s is not a constructor to EvalError: function eval must be called directly, and not by way of a function of another name None of this happens with a function with a name other than eval: js> (function() { new(eeee('({s:1})').s) }) (function () {new (eeee("({s:1})").s);})
Attached patch PatchSplinter Review
Assignee: general → jwalden+bmo
Status: NEW → ASSIGNED
Attachment #420805 - Flags: review?(mrbkap)
Comment on attachment 420805 [details] [diff] [review] Patch I think you need JSOP_APPLY in that list as well. r=me with that looked into.
Attachment #420805 - Flags: review?(mrbkap) → review+
http://hg.mozilla.org/tracemonkey/rev/8a19567a3633 (with JSOP_APPLY addressed and tested as well, thanks for noting that)
OS: Mac OS X → All
Hardware: x86 → All
Whiteboard: fixed-in-tracemonkey
Target Milestone: --- → mozilla1.9.3a2
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: