mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 22:01:30 +00:00
Bug 1199220 - Implement JS::ubi::Node::size for js::BaseShape referents; r=sfink
This commit is contained in:
parent
dd4075f4da
commit
5c1fb4b1f9
@ -1663,3 +1663,9 @@ JS::ubi::Concrete<js::Shape>::size(mozilla::MallocSizeOf mallocSizeOf) const
|
||||
|
||||
return size;
|
||||
}
|
||||
|
||||
JS::ubi::Node::Size
|
||||
JS::ubi::Concrete<js::BaseShape>::size(mozilla::MallocSizeOf mallocSizeOf) const
|
||||
{
|
||||
return js::gc::Arena::thingSize(get().asTenured().getAllocKind());
|
||||
}
|
||||
|
@ -1445,7 +1445,16 @@ template<> struct Concrete<js::Shape> : TracerConcreteWithCompartment<js::Shape>
|
||||
static void construct(void *storage, js::Shape *ptr) { new (storage) Concrete(ptr); }
|
||||
};
|
||||
|
||||
template<> struct Concrete<js::BaseShape> : TracerConcreteWithCompartment<js::BaseShape> { };
|
||||
template<> struct Concrete<js::BaseShape> : TracerConcreteWithCompartment<js::BaseShape> {
|
||||
Size size(mozilla::MallocSizeOf mallocSizeOf) const override;
|
||||
|
||||
protected:
|
||||
explicit Concrete(js::BaseShape *ptr) : TracerConcreteWithCompartment<js::BaseShape>(ptr) { }
|
||||
|
||||
public:
|
||||
static void construct(void *storage, js::BaseShape *ptr) { new (storage) Concrete(ptr); }
|
||||
};
|
||||
|
||||
} // namespace ubi
|
||||
} // namespace JS
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user