summaryrefslogtreecommitdiffstats
path: root/js/src/builtin/WeakSetObject.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/builtin/WeakSetObject.cpp
parent7757e03ccc550b030fb4d342f160ee30a940f23d (diff)
downloadUXP-3a5176f4b25a2b90cefe14eb2c2de57113dc21ac.tar
UXP-3a5176f4b25a2b90cefe14eb2c2de57113dc21ac.tar.gz
UXP-3a5176f4b25a2b90cefe14eb2c2de57113dc21ac.tar.lz
UXP-3a5176f4b25a2b90cefe14eb2c2de57113dc21ac.tar.xz
UXP-3a5176f4b25a2b90cefe14eb2c2de57113dc21ac.zip
1320408 - Part 14: Change some GlobalObject methods to static method.
Diffstat (limited to 'js/src/builtin/WeakSetObject.cpp')
-rw-r--r--js/src/builtin/WeakSetObject.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/js/src/builtin/WeakSetObject.cpp b/js/src/builtin/WeakSetObject.cpp
index 7ea3f2fef..fbe5e418c 100644
--- a/js/src/builtin/WeakSetObject.cpp
+++ b/js/src/builtin/WeakSetObject.cpp
@@ -41,14 +41,15 @@ const JSFunctionSpec WeakSetObject::methods[] = {
};
JSObject*
-WeakSetObject::initClass(JSContext* cx, JSObject* obj)
+WeakSetObject::initClass(JSContext* cx, HandleObject obj)
{
- Rooted<GlobalObject*> global(cx, &obj->as<GlobalObject>());
+ Handle<GlobalObject*> global = obj.as<GlobalObject>();
RootedPlainObject proto(cx, NewBuiltinClassInstance<PlainObject>(cx));
if (!proto)
return nullptr;
- Rooted<JSFunction*> ctor(cx, global->createConstructor(cx, construct, ClassName(JSProto_WeakSet, cx), 0));
+ Rooted<JSFunction*> ctor(cx, GlobalObject::createConstructor(cx, construct,
+ ClassName(JSProto_WeakSet, cx), 0));
if (!ctor ||
!LinkConstructorAndPrototype(cx, ctor, proto) ||
!DefinePropertiesAndFunctions(cx, proto, properties, methods) ||