Closed
Bug 1233040
Opened 9 years ago
Closed 8 years ago
ArrayBuffer.prototype.slice does not respect subclassing
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
DUPLICATE
of bug 1165053
People
(Reporter: lth, Assigned: mrrrgn)
References
(Blocks 1 open bug)
Details
Consider: Also see bug 1233011, bug 1232966 for analogous cases for SharedArrayBuffer and references to (currently pending) test cases. class MySub extends ArrayBuffer { constructor(n) { super(n) } } var m = new MySub(10) m.byteLength // 10 m instanceof ArrayBuffer // true m instanceof MySub // true var xx = m.slice(0,5) xx instanceof MySub // ***false*** Almost certainly that last one should be true, cf ES6 24.1.4.3, steps 13 and 15, which will use SpeciesConstructor to pick up a constructor that is appropriate to the "this" object, which is a MySub.
Reporter | ||
Comment 1•9 years ago
|
||
A dup of part 11 of the monster bug :arai is working on.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
Reporter | ||
Comment 2•9 years ago
|
||
Groan, 1165052 is about Array (only), not ArrayBuffer.
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
Reporter | ||
Updated•9 years ago
|
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → winter2718
Comment 3•8 years ago
|
||
apparently fixed by bug 1165053, and the testcase in comment #0 returns true now. also, there are some more testcases about subclassing added by the patch there, so I think we can just close this bug. https://hg.mozilla.org/mozilla-central/rev/35e1fd91ca89
Status: REOPENED → RESOLVED
Closed: 9 years ago → 8 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•