Closed Bug 490339 Opened 16 years ago Closed 16 years ago

Unexpected ReferenceError when using "new Function()"

Categories

(Core :: JavaScript Engine, defect, P1)

defect

Tracking

()

RESOLVED FIXED
mozilla1.9.1

People

(Reporter: soubok, Assigned: brendan)

References

Details

(Keywords: fixed1.9.1, Whiteboard: fixed-in-tracemonkey)

Attachments

(2 files)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.9.0.9) Gecko/2009040821 Firefox/3.0.9 Build Identifier: mozilla-central-ea128fc02710 The following script throw a ReferenceError when foo() is called. function B( c ) { c(); } var foo = new Function("\ var a = {};\ function C() {\ return function() {\ return a;\ }\ }\ B( C() );\ "); foo(); // ReferenceError: a is not defined Reproducible: Always
confirmed on 1.9.1 and later but not on 1.9.0 or earlier.
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows XP → All
Version: unspecified → Trunk
Blocks: upvar2
Flags: blocking1.9.1?
Hardware: x86 → All
Attached patch fix (deleted) — Splinter Review
Assignee: general → brendan
Status: NEW → ASSIGNED
Attachment #374814 - Flags: review?(mrbkap)
Priority: -- → P1
Target Milestone: --- → mozilla1.9.1
Flags: blocking1.9.1? → blocking1.9.1+
Attachment #374814 - Flags: review?(mrbkap) → review+
Attached file shell testcase (deleted) —
Whiteboard: fixed-in-tracemonkey
Status: ASSIGNED → RESOLVED
Closed: 16 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: