Closed
Bug 1233011
Opened 9 years ago
Closed 9 years ago
Subclassing SharedArrayBuffer does not work properly
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla46
Tracking | Status | |
---|---|---|
firefox46 | --- | fixed |
People
(Reporter: lth, Assigned: lth)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
(deleted),
patch
|
efaust
:
review+
|
Details | Diff | Splinter Review |
Consider:
class C1 extends ArrayBuffer {
constructor(n) { super(n) }
}
var c1 = new C1(10);
c1 instanceof ArrayBuffer // true
c1 instanceof C1 // true
But then:
class C2 extends SharedArrayBuffer {
constructor(n) { super(n) }
}
var c1 = new C2(10);
c1 instanceof SharedArrayBuffer // true
c1 instanceof C2 // ***false***
Probably just needs a small adjustment somewhere.
Assignee | ||
Comment 1•9 years ago
|
||
A number of test cases for this will land with bug 1232966 in jit-test/tests/sharedbuf/methods.js but could usefully be broken out and/or generalized when we fix the present bug.
Assignee | ||
Updated•9 years ago
|
Assignee | ||
Comment 2•9 years ago
|
||
Copied from the ArrayBuffer case. Plus test cases.
Attachment #8698982 -
Flags: review?(efaustbmo)
Comment 3•9 years ago
|
||
Comment on attachment 8698982 [details] [diff] [review]
SharedArrayBuffer subclassing + tests
Review of attachment 8698982 [details] [diff] [review]:
-----------------------------------------------------------------
Looks perfect. If it's a cargo-cult, it's a very well understood one :P
Attachment #8698982 -
Flags: review?(efaustbmo) → review+
Comment 4•9 years ago
|
||
For extra credit, you can even add testBuiltin(SharedArrayBuffer) to tests/ecma_6/Class/extendBuiltinConstructors.js, if you want, though the current test coverage is sufficient.
Assignee | ||
Comment 5•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/70cfa74485fd6927c6547e2f5df4c3848e382757
Bug 1233011 - SharedArrayBuffer subclassing + tests. r=efaust
Comment 6•9 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox46:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla46
Assignee | ||
Comment 7•8 years ago
|
||
Note, this change was incomplete, we also need a SpeciesConstructor thingie. See bug 1314564.
You need to log in
before you can comment on or make changes to this bug.
Description
•