Closed Bug 695238 Opened 8 years ago Closed 8 years ago

Reflect.parse doesn't reject missing RHS in object literals

Categories

(Core :: JavaScript Engine, defect)

x86
macOS
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla10

People

(Reporter: dherman, Assigned: dherman)

References

Details

(Whiteboard: reflect-parse)

Attachments

(1 file)

This should fail:

    Reflect.parse("({foo})")

but doesn't. The problem is that jsemit.cpp does the check (and throws a TypeError with JSMSG_BAD_OBJECT_INIT), and jsreflect.cpp is not doing the same check.

Fix should be easy: just check for the PNX_DESTRUCT bit, same as jsemit.cpp.

Dave
CC'ing Jesse, who may want to feed his fuzzer with some tasty new inputs.

Dave
Attachment #567654 - Flags: review?(jorendorff) → review+
Flags: in-testsuite+
Target Milestone: --- → mozilla10
https://hg.mozilla.org/mozilla-central/rev/feeee0906588
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Depends on: 696109
You need to log in before you can comment on or make changes to this bug.