summaryrefslogtreecommitdiff
path: root/js/src/jsmath.cpp
diff options
context:
space:
mode:
authorGaming4JC <g4jc@hyperbola.info>2019-06-08 23:28:04 -0400
committerGaming4JC <g4jc@hyperbola.info>2019-07-18 22:38:25 -0400
commit3a5176f4b25a2b90cefe14eb2c2de57113dc21ac (patch)
treebc6f6b9a4830a764c825e0dd78a4367b9d0a46a4 /js/src/jsmath.cpp
parent7757e03ccc550b030fb4d342f160ee30a940f23d (diff)
downloaduxp-3a5176f4b25a2b90cefe14eb2c2de57113dc21ac.tar.gz
1320408 - Part 14: Change some GlobalObject methods to static method.
Diffstat (limited to 'js/src/jsmath.cpp')
-rw-r--r--js/src/jsmath.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/js/src/jsmath.cpp b/js/src/jsmath.cpp
index 08fbe048c0..78a2310030 100644
--- a/js/src/jsmath.cpp
+++ b/js/src/jsmath.cpp
@@ -1417,7 +1417,8 @@ static const JSFunctionSpec math_static_methods[] = {
JSObject*
js::InitMathClass(JSContext* cx, HandleObject obj)
{
- RootedObject proto(cx, obj->as<GlobalObject>().getOrCreateObjectPrototype(cx));
+ Handle<GlobalObject*> global = obj.as<GlobalObject>();
+ RootedObject proto(cx, GlobalObject::getOrCreateObjectPrototype(cx, global));
if (!proto)
return nullptr;
RootedObject Math(cx, NewObjectWithGivenProto(cx, &MathClass, proto, SingletonObject));