diff options
author | Gaming4JC <g4jc@hyperbola.info> | 2019-06-08 23:29:58 -0400 |
---|---|---|
committer | Gaming4JC <g4jc@hyperbola.info> | 2019-07-18 22:38:26 -0400 |
commit | caf39feeeb457ffb143110826a0220211c00afb6 (patch) | |
tree | 3734dd19f40a0450c4dca46e8dd8de01ff1955d0 /js/src/vm/NativeObject.cpp | |
parent | 3a5176f4b25a2b90cefe14eb2c2de57113dc21ac (diff) | |
download | UXP-caf39feeeb457ffb143110826a0220211c00afb6.tar UXP-caf39feeeb457ffb143110826a0220211c00afb6.tar.gz UXP-caf39feeeb457ffb143110826a0220211c00afb6.tar.lz UXP-caf39feeeb457ffb143110826a0220211c00afb6.tar.xz UXP-caf39feeeb457ffb143110826a0220211c00afb6.zip |
1320408 - Part 15: Change NativeObject::addDataProperty to static method.
Diffstat (limited to 'js/src/vm/NativeObject.cpp')
-rw-r--r-- | js/src/vm/NativeObject.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/js/src/vm/NativeObject.cpp b/js/src/vm/NativeObject.cpp index a3f28653a..8940f93c4 100644 --- a/js/src/vm/NativeObject.cpp +++ b/js/src/vm/NativeObject.cpp @@ -996,23 +996,22 @@ NativeObject::freeSlot(ExclusiveContext* cx, uint32_t slot) setSlot(slot, UndefinedValue()); } -Shape* -NativeObject::addDataProperty(ExclusiveContext* cx, jsid idArg, uint32_t slot, unsigned attrs) +/* static */ Shape* +NativeObject::addDataProperty(ExclusiveContext* cx, HandleNativeObject obj, + jsid idArg, uint32_t slot, unsigned attrs) { MOZ_ASSERT(!(attrs & (JSPROP_GETTER | JSPROP_SETTER))); - RootedNativeObject self(cx, this); RootedId id(cx, idArg); - return addProperty(cx, self, id, nullptr, nullptr, slot, attrs, 0); + return addProperty(cx, obj, id, nullptr, nullptr, slot, attrs, 0); } -Shape* -NativeObject::addDataProperty(ExclusiveContext* cx, HandlePropertyName name, - uint32_t slot, unsigned attrs) +/* static */ Shape* +NativeObject::addDataProperty(ExclusiveContext* cx, HandleNativeObject obj, + HandlePropertyName name, uint32_t slot, unsigned attrs) { MOZ_ASSERT(!(attrs & (JSPROP_GETTER | JSPROP_SETTER))); - RootedNativeObject self(cx, this); RootedId id(cx, NameToId(name)); - return addProperty(cx, self, id, nullptr, nullptr, slot, attrs, 0); + return addProperty(cx, obj, id, nullptr, nullptr, slot, attrs, 0); } template <AllowGC allowGC> |