summaryrefslogtreecommitdiffstats
path: root/js/src/jsobjinlines.h
diff options
context:
space:
mode:
authorGaming4JC <g4jc@hyperbola.info>2019-06-08 19:20:00 -0400
committerGaming4JC <g4jc@hyperbola.info>2019-07-18 22:38:22 -0400
commitaf6768fb1f2e44b0bfe4136c79d8031028d073b1 (patch)
tree56268abe6db8edf94a2c14c61b27e6b19b6c92c9 /js/src/jsobjinlines.h
parentc2b1e70b763660da2a41a826b4049360090ff373 (diff)
downloadUXP-af6768fb1f2e44b0bfe4136c79d8031028d073b1.tar
UXP-af6768fb1f2e44b0bfe4136c79d8031028d073b1.tar.gz
UXP-af6768fb1f2e44b0bfe4136c79d8031028d073b1.tar.lz
UXP-af6768fb1f2e44b0bfe4136c79d8031028d073b1.tar.xz
UXP-af6768fb1f2e44b0bfe4136c79d8031028d073b1.zip
1320408 - Part 4: Change JSObject::getGroup to static method.
Diffstat (limited to 'js/src/jsobjinlines.h')
-rw-r--r--js/src/jsobjinlines.h15
1 files changed, 7 insertions, 8 deletions
diff --git a/js/src/jsobjinlines.h b/js/src/jsobjinlines.h
index 7028310ce..c132ee6b2 100644
--- a/js/src/jsobjinlines.h
+++ b/js/src/jsobjinlines.h
@@ -117,17 +117,16 @@ JSObject::setSingleton(js::ExclusiveContext* cx, js::HandleObject obj)
return true;
}
-inline js::ObjectGroup*
-JSObject::getGroup(JSContext* cx)
+/* static */ inline js::ObjectGroup*
+JSObject::getGroup(JSContext* cx, js::HandleObject obj)
{
- MOZ_ASSERT(cx->compartment() == compartment());
- if (hasLazyGroup()) {
- JS::RootedObject self(cx, this);
- if (cx->compartment() != compartment())
+ MOZ_ASSERT(cx->compartment() == obj->compartment());
+ if (obj->hasLazyGroup()) {
+ if (cx->compartment() != obj->compartment())
MOZ_CRASH();
- return makeLazyGroup(cx, self);
+ return makeLazyGroup(cx, obj);
}
- return group_;
+ return obj->group_;
}
inline void