The default bug view has changed. See this FAQ.

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

RESOLVED FIXED in mozilla10

Status

()

Core
JavaScript Engine
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: dherman, Assigned: dherman)

Tracking

unspecified
mozilla10
x86
Mac OS X
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: reflect-parse)

Attachments

(1 attachment)

(Assignee)

Description

6 years ago
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
(Assignee)

Comment 1

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

Dave
(Assignee)

Comment 2

6 years ago
Created attachment 567654 [details] [diff] [review]
checks PNX_DESTRUCT bit on TOK_RC expression nodes
Attachment #567654 - Flags: review?(jorendorff)
Attachment #567654 - Flags: review?(jorendorff) → review+
(Assignee)

Comment 3

6 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/feeee0906588
(Assignee)

Updated

6 years ago
Flags: in-testsuite+
Target Milestone: --- → mozilla10
https://hg.mozilla.org/mozilla-central/rev/feeee0906588
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Depends on: 696109
You need to log in before you can comment on or make changes to this bug.