diff options
author | Gaming4JC <g4jc@hyperbola.info> | 2019-06-08 23:28:04 -0400 |
---|---|---|
committer | Gaming4JC <g4jc@hyperbola.info> | 2019-07-18 22:38:25 -0400 |
commit | 3a5176f4b25a2b90cefe14eb2c2de57113dc21ac (patch) | |
tree | bc6f6b9a4830a764c825e0dd78a4367b9d0a46a4 /js/src/builtin/SymbolObject.cpp | |
parent | 7757e03ccc550b030fb4d342f160ee30a940f23d (diff) | |
download | UXP-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/SymbolObject.cpp')
-rw-r--r-- | js/src/builtin/SymbolObject.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/js/src/builtin/SymbolObject.cpp b/js/src/builtin/SymbolObject.cpp index ae38d5371..8fa860ef3 100644 --- a/js/src/builtin/SymbolObject.cpp +++ b/js/src/builtin/SymbolObject.cpp @@ -53,17 +53,17 @@ const JSFunctionSpec SymbolObject::staticMethods[] = { JSObject* SymbolObject::initClass(JSContext* cx, HandleObject obj) { - Rooted<GlobalObject*> global(cx, &obj->as<GlobalObject>()); + Handle<GlobalObject*> global = obj.as<GlobalObject>(); // This uses &JSObject::class_ because: "The Symbol prototype object is an // ordinary object. It is not a Symbol instance and does not have a // [[SymbolData]] internal slot." (ES6 rev 24, 19.4.3) - RootedObject proto(cx, global->createBlankPrototype<PlainObject>(cx)); + RootedObject proto(cx, GlobalObject::createBlankPrototype<PlainObject>(cx, global)); if (!proto) return nullptr; - RootedFunction ctor(cx, global->createConstructor(cx, construct, - ClassName(JSProto_Symbol, cx), 0)); + RootedFunction ctor(cx, GlobalObject::createConstructor(cx, construct, + ClassName(JSProto_Symbol, cx), 0)); if (!ctor) return nullptr; |