mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 22:01:30 +00:00
Bug 1199221 - Implement JS::ubi::Node::size for js::ObjectGroup referents; r=sfink
This commit is contained in:
parent
5c1fb4b1f9
commit
1952467338
@ -4450,3 +4450,11 @@ TypeScript::printTypes(JSContext* cx, HandleScript script) const
|
||||
fprintf(stderr, "\n");
|
||||
}
|
||||
#endif /* DEBUG */
|
||||
|
||||
JS::ubi::Node::Size
|
||||
JS::ubi::Concrete<js::ObjectGroup>::size(mozilla::MallocSizeOf mallocSizeOf) const
|
||||
{
|
||||
Size size = js::gc::Arena::thingSize(get().asTenured().getAllocKind());
|
||||
size += get().sizeOfExcludingThis(mallocSizeOf);
|
||||
return size;
|
||||
}
|
||||
|
@ -1295,7 +1295,18 @@ PrintTypes(JSContext* cx, JSCompartment* comp, bool force);
|
||||
// with no associated compartment.
|
||||
namespace JS {
|
||||
namespace ubi {
|
||||
template<> struct Concrete<js::ObjectGroup> : TracerConcrete<js::ObjectGroup> { };
|
||||
|
||||
template<>
|
||||
struct Concrete<js::ObjectGroup> : TracerConcrete<js::ObjectGroup> {
|
||||
Size size(mozilla::MallocSizeOf mallocSizeOf) const override;
|
||||
|
||||
protected:
|
||||
explicit Concrete(js::ObjectGroup *ptr) : TracerConcrete<js::ObjectGroup>(ptr) { }
|
||||
|
||||
public:
|
||||
static void construct(void *storage, js::ObjectGroup *ptr) { new (storage) Concrete(ptr); }
|
||||
};
|
||||
|
||||
} // namespace ubi
|
||||
} // namespace JS
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user