Closed
Bug 1317307
Opened 9 years ago
Closed 9 years ago
Throw TypeError when attempting to redefine array.length to accessor property
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla53
People
(Reporter: anba, Assigned: anba)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
5.51 KB,
patch
|
till
:
review+
|
Details | Diff | Splinter Review |
Test case:
---
Object.defineProperty([], "length", {get(){}})
---
Expected: Throws TypeError
Actual: Throws RangeError
Assignee | ||
Comment 1•9 years ago
|
||
The change in js::ArraySetLength is just a drive-by fix, I think the assertion should belong to the other block.
Attachment #8810529 -
Flags: review?(till)
Comment 2•9 years ago
|
||
Comment on attachment 8810529 [details] [diff] [review]
bug1317307.patch
Review of attachment 8810529 [details] [diff] [review]:
-----------------------------------------------------------------
r=me, thanks
Attachment #8810529 -
Flags: review?(till) → review+
Assignee | ||
Updated•9 years ago
|
Keywords: checkin-needed
Pushed by cbook@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/55b6cacff791
Throw a TypeError when attempting to change array.length to accessor property. r=till
Keywords: checkin-needed
Comment 4•9 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox53:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
Comment 5•9 years ago
|
||
We should probably look into backporting this.
Flags: needinfo?(andrebargull)
Assignee | ||
Comment 6•9 years ago
|
||
This is also a simple bug fix, but only important for test262 and not user code, because
1. We're just fixing the error type (from RangeError to TypeError)
2. and users don't try to change an array's length property to an accessor, because it doesn't make sense to begin with.
Flags: needinfo?(andrebargull)
Updated•9 years ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•