Rooted implementation casts between unrelated types
Categories
(Core :: JavaScript: GC, task, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox94 | --- | fixed |
People
(Reporter: jonco, Assigned: jonco)
References
(Blocks 1 open bug)
Details
Attachments
(7 files)
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review |
The implementation of Rooted currently casts between different Rooted<T> classes that are not related by inheritance. Although this currently works everywhere, this is not guaranteed and it's generally pretty dubious.
Assignee | ||
Comment 1•3 years ago
|
||
I don't think this does anything. The type is always present so we won't
restrict use of this constructor by SFINAE, although I may have misunderstood
the purpose of this.
I tried 'fixing' the SFINAE to what I though it should be by using enable_if_t
but it had the same effect as removing it. In both cases the code compiles, and
if I try to construct a rooted with an inappropriate argument it fails with a
sensible error.
Assignee | ||
Comment 2•3 years ago
|
||
These are really mixins used to add public methods based on the type and don't
need to the base of an inheritance tree.
Depends on D125949
Assignee | ||
Comment 3•3 years ago
|
||
This removes the need for a bunch of reinterpret_casts.
Depends on D125950
Assignee | ||
Comment 4•3 years ago
|
||
The link pointers move to the base class in a similar way to PersistentRootedBase.
This lets us get rid of a bunch more reinterpret_casts.
Depends on D125951
Assignee | ||
Comment 5•3 years ago
|
||
This adds typed base classes with trace() methods. RootedTraceable is removed
and we store T directly in Rooted.
Depends on D125952
Assignee | ||
Comment 6•3 years ago
|
||
I don't know exactly why this is happening but we're now directly constructing
MyContainer and not copying it. I confirmed that this is calling the first
Rooted consturctor so I updated the tests to expect this.
Depends on D125953
Assignee | ||
Comment 7•3 years ago
|
||
Depends on D125954
Comment 9•3 years ago
|
||
Backed out for causing spider-monkey bustages in RootingAPI
Comment 10•3 years ago
|
||
Assignee | ||
Updated•3 years ago
|
Comment 11•3 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/5c9145f71f55
https://hg.mozilla.org/mozilla-central/rev/b45dc61300b1
https://hg.mozilla.org/mozilla-central/rev/bc5898ff5c3d
https://hg.mozilla.org/mozilla-central/rev/d7e74bfc08ef
https://hg.mozilla.org/mozilla-central/rev/ac495f8eecd2
https://hg.mozilla.org/mozilla-central/rev/a9372964d060
https://hg.mozilla.org/mozilla-central/rev/f76391987517
Description
•