summaryrefslogtreecommitdiffstats
path: root/js/src/vm/TypeInference.cpp
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/vm/TypeInference.cpp
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/vm/TypeInference.cpp')
-rw-r--r--js/src/vm/TypeInference.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/js/src/vm/TypeInference.cpp b/js/src/vm/TypeInference.cpp
index 63daec36e..60d9e183a 100644
--- a/js/src/vm/TypeInference.cpp
+++ b/js/src/vm/TypeInference.cpp
@@ -1319,7 +1319,8 @@ js::EnsureTrackPropertyTypes(JSContext* cx, JSObject* obj, jsid id)
AutoEnterAnalysis enter(cx);
if (obj->hasLazyGroup()) {
AutoEnterOOMUnsafeRegion oomUnsafe;
- if (!obj->getGroup(cx)) {
+ RootedObject objRoot(cx, obj);
+ if (!JSObject::getGroup(cx, objRoot)) {
oomUnsafe.crash("Could not allocate ObjectGroup in EnsureTrackPropertyTypes");
return;
}
@@ -1338,9 +1339,12 @@ HeapTypeSetKey::instantiate(JSContext* cx)
{
if (maybeTypes())
return true;
- if (object()->isSingleton() && !object()->singleton()->getGroup(cx)) {
- cx->clearPendingException();
- return false;
+ if (object()->isSingleton()) {
+ RootedObject obj(cx, object()->singleton());
+ if (!JSObject::getGroup(cx, obj)) {
+ cx->clearPendingException();
+ return false;
+ }
}
JSObject* obj = object()->isSingleton() ? object()->singleton() : nullptr;
maybeTypes_ = object()->maybeGroup()->getProperty(cx, obj, id());
@@ -3088,7 +3092,7 @@ js::AddClearDefiniteGetterSetterForPrototypeChain(JSContext* cx, ObjectGroup* gr
*/
RootedObject proto(cx, group->proto().toObjectOrNull());
while (proto) {
- ObjectGroup* protoGroup = proto->getGroup(cx);
+ ObjectGroup* protoGroup = JSObject::getGroup(cx, proto);
if (!protoGroup) {
cx->recoverFromOutOfMemory();
return false;