diff options
author | Gaming4JC <g4jc@hyperbola.info> | 2019-06-08 19:20:00 -0400 |
---|---|---|
committer | Gaming4JC <g4jc@hyperbola.info> | 2019-07-18 22:38:22 -0400 |
commit | af6768fb1f2e44b0bfe4136c79d8031028d073b1 (patch) | |
tree | 56268abe6db8edf94a2c14c61b27e6b19b6c92c9 /js/src/jsobjinlines.h | |
parent | c2b1e70b763660da2a41a826b4049360090ff373 (diff) | |
download | uxp-af6768fb1f2e44b0bfe4136c79d8031028d073b1.tar.gz |
1320408 - Part 4: Change JSObject::getGroup to static method.
Diffstat (limited to 'js/src/jsobjinlines.h')
-rw-r--r-- | js/src/jsobjinlines.h | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/js/src/jsobjinlines.h b/js/src/jsobjinlines.h index 7028310cee..c132ee6b26 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 |