Bug 891215 (part 17) - Move SizeOfRegExpStaticsData() into the RegExpStaticsObject class. r=terrence.

--HG--
extra : rebase_source : 5ab7214b39e0ea7633e08eb912bb9dcbc7f973ef
This commit is contained in:
Nicholas Nethercote 2013-07-10 16:23:28 -07:00
parent 552adee9b0
commit 2070010e4a
4 changed files with 5 additions and 9 deletions

View File

@ -5589,7 +5589,7 @@ JSObject::sizeOfExcludingThis(mozilla::MallocSizeOf mallocSizeOf, JS::ObjectsExt
if (is<ArgumentsObject>()) {
sizes->argumentsData = as<ArgumentsObject>().sizeOfMisc(mallocSizeOf);
} else if (is<RegExpStaticsObject>()) {
sizes->regExpStatics = js::SizeOfRegExpStaticsData(this, mallocSizeOf);
sizes->regExpStatics = as<RegExpStaticsObject>().sizeOfData(mallocSizeOf);
} else if (is<PropertyIteratorObject>()) {
sizes->propertyIteratorData = as<PropertyIteratorObject>().sizeOfMisc(mallocSizeOf);
#ifdef JS_HAS_CTYPES

View File

@ -212,12 +212,6 @@ js::GlobalObject::getRegExpStatics() const
return static_cast<RegExpStatics *>(resObj.getPrivate());
}
inline size_t
SizeOfRegExpStaticsData(const JSObject *obj, mozilla::MallocSizeOf mallocSizeOf)
{
return mallocSizeOf(obj->getPrivate());
}
inline bool
RegExpStatics::createDependent(JSContext *cx, size_t start, size_t end, MutableHandleValue out)
{

View File

@ -20,8 +20,6 @@ namespace js {
class PreserveRegExpStatics;
class RegExpStatics;
size_t SizeOfRegExpStaticsData(const JSObject *obj, mozilla::MallocSizeOf mallocSizeOf);
} /* namespace js */
#endif /* vm_RegExpStatics_h */

View File

@ -15,6 +15,10 @@ class RegExpStaticsObject : public JSObject
{
public:
static Class class_;
size_t sizeOfData(mozilla::MallocSizeOf mallocSizeOf) {
return mallocSizeOf(getPrivate());
}
};
} // namespace js