Closed Bug 600392 Opened 14 years ago Closed 14 years ago

Object.preventExtensions([]).length = 0 should do nothing, not throw

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: Waldo, Unassigned)

References

Details

This calls Array.[[DefineOwnProperty]]("length", { [[Value]]: 0 }, false), which, elaborately, should do nothing as there are no trailing array elements to be implicitly removed.
WFM - reopen if I'm missing something, but here's what I get:

js> Object.preventExtensions([]).length = 0
0
js> "use strict"; Object.preventExtensions([]).length = 0
0

/be
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → WONTFIX
This got fixed in d416528b5782 with the backout to fix bug 599159.  I'll add a couple tests for this just to be safe in the future -- in my queue now, waiting til the next time I push stuff.
Resolution: WONTFIX → WORKSFORME
Tested:

http://hg.mozilla.org/tracemonkey/rev/02d096c1a578
Flags: in-testsuite+
You need to log in before you can comment on or make changes to this bug.