mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 13:51:41 +00:00
Bug 1731218 - Part 6: Check that we don't increase the size of Rooted for GC thing types r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D125955
This commit is contained in:
parent
c6196ebacd
commit
032eecdec3
@ -51,6 +51,9 @@ template <typename T>
|
||||
static inline void TraceExactStackRootList(JSTracer* trc,
|
||||
StackRootedBase* listHead,
|
||||
const char* name) {
|
||||
// Check size of Rooted<T> does not increase.
|
||||
static_assert(sizeof(Rooted<T>) == sizeof(T) + 2 * sizeof(uintptr_t));
|
||||
|
||||
for (StackRootedBase* root = listHead; root; root = root->previous()) {
|
||||
static_cast<Rooted<T>*>(root)->trace(trc, name);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user