diff --git a/js/src/vm/GlobalObject.h b/js/src/vm/GlobalObject.h index 992a7e88ab5..c57097b3322 100644 --- a/js/src/vm/GlobalObject.h +++ b/js/src/vm/GlobalObject.h @@ -363,9 +363,9 @@ class GlobalObject : public JSObject } bool hasIntrinsicFunction(JSContext *cx, PropertyName *name) { - RootedObject holder(cx, &getSlotRef(INTRINSICS).toObject()); + Rooted self(cx, this); Value fun = NullValue(); - return HasDataProperty(cx, holder, NameToId(name), &fun); + return HasDataProperty(cx, self, NameToId(name), &fun); } bool getIntrinsicValue(JSContext *cx, PropertyName *name, MutableHandleValue value) {