Closed Bug 629723 Opened 14 years ago Closed 14 years ago

Decompiling for blame erroneously prints "use strict" directives

Categories

(Core :: JavaScript Engine, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: jimb, Assigned: jimb)

Details

(Whiteboard: [fixed-in-tracemonkey])

Attachments

(1 file)

Bug 628112 comment 9 mentions that "use strict" directives are being generated inappropriately: > TypeError: "use strict";tab is undefined > > Yikes. Cc'ing jimb. This looks like a bug recently introduced (which I should > have foreseen) where decompiling for blame wrongly inserts "use strict"; if the > code being blamed is strict. What are the details? How do we reproduce this?
It's trivial: js> function f(foo){"use strict";foo.bar} js> f() typein:6: TypeError: "use strict";foo is undefined /be
This also sorts the test list in js/src/tests/ecma_5/extensions; the only addition to the list is the regression test for this bug.
Assignee: general → jimb
Attachment #509037 - Flags: review?(brendan)
Comment on attachment 509037 [details] [diff] [review] Don't include directive prologues when decompiling specific expressions for error messages. Cool. This should ride along into b12. /be
Attachment #509037 - Flags: review?(brendan)
Attachment #509037 - Flags: review+
Attachment #509037 - Flags: approval2.0?
Rob, can you approve the patch? Thanks, /be
Attachment #509037 - Flags: approval2.0? → approval2.0+
Status: NEW → ASSIGNED
Whiteboard: [fixed-in-tracemonkey]
Status: ASSIGNED → RESOLVED
Closed: 14 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: