Closed Bug 350666 Opened 19 years ago Closed 19 years ago

"delete y.(x)" in for's increment-expression expands to something containing a semicolon

Categories

(Core :: JavaScript Engine, defect, P2)

defect

Tracking

()

VERIFIED FIXED
mozilla1.8.1

People

(Reporter: jruderman, Assigned: brendan)

Details

(Keywords: testcase, verified1.8.1)

Attachments

(1 file)

> function () { for(;; delete y.(x)) { } } function () { for (;; y.(x); true) { } } Feeding that back into the JavaScript engine gives a syntax error: "missing ) after for-loop control"
You don't need to use the new ".()" operator to trigger this bug; addition works too. > function () { for(;; delete (y+x)) { } } function () { for (;; y + x; true) { } } This may or may not be the same bug: > function () { let (y) delete (x+y); } function () { x + y; let (y) true; }
Attached patch fixSplinter Review
We need a bytecode sequence that will decompile as an expression, not a statement. /be
Assignee: general → brendan
Status: NEW → ASSIGNED
Attachment #237069 - Flags: review?(mrbkap)
OS: Mac OS X 10.4 → All
Priority: -- → P2
Hardware: Macintosh → All
Target Milestone: --- → mozilla1.8.1
Attachment #237069 - Flags: review?(mrbkap) → review+
Fixed on trunk. /be
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Comment on attachment 237069 [details] [diff] [review] fix Another delete fix, this time to emit code that looks to the decompiler like an expression instead of a statement sequence. Spot fix, easy to test, no non-local effects except to make the decompiler happy. /be
Attachment #237069 - Flags: approval1.8.1?
Comment on attachment 237069 [details] [diff] [review] fix a=beltzner on behalf of 181drivers
Attachment #237069 - Flags: approval1.8.1? → approval1.8.1+
Fixed on the 1.8 branch. /be
Keywords: fixed1.8.1
Checking in regress-350666.js; /cvsroot/mozilla/js/tests/js1_5/Regress/regress-350666.js,v <-- regress-350666.js initial revision: 1.1
Flags: in-testsuite+
verified fixed 1.8 1.9 20060909 windows/mac*/linux
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: