summaryrefslogtreecommitdiff
path: root/js/src/jsnum.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/jsnum.cpp
parent7757e03ccc550b030fb4d342f160ee30a940f23d (diff)
downloaduxp-3a5176f4b25a2b90cefe14eb2c2de57113dc21ac.tar.gz
1320408 - Part 14: Change some GlobalObject methods to static method.
Diffstat (limited to 'js/src/jsnum.cpp')
-rw-r--r--js/src/jsnum.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/js/src/jsnum.cpp b/js/src/jsnum.cpp
index 28ed151598..bde1f918e2 100644
--- a/js/src/jsnum.cpp
+++ b/js/src/jsnum.cpp
@@ -1005,15 +1005,16 @@ js::InitNumberClass(JSContext* cx, HandleObject obj)
/* XXX must do at least once per new thread, so do it per JSContext... */
FIX_FPU();
- Rooted<GlobalObject*> global(cx, &obj->as<GlobalObject>());
+ Handle<GlobalObject*> global = obj.as<GlobalObject>();
- RootedObject numberProto(cx, global->createBlankPrototype(cx, &NumberObject::class_));
+ RootedObject numberProto(cx, GlobalObject::createBlankPrototype(cx, global,
+ &NumberObject::class_));
if (!numberProto)
return nullptr;
numberProto->as<NumberObject>().setPrimitiveValue(0);
RootedFunction ctor(cx);
- ctor = global->createConstructor(cx, Number, cx->names().Number, 1);
+ ctor = GlobalObject::createConstructor(cx, Number, cx->names().Number, 1);
if (!ctor)
return nullptr;