summaryrefslogtreecommitdiffstats
path: root/js/src/builtin/Object.cpp
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2019-08-18 16:25:15 +0200
committerwolfbeast <mcwerewolf@wolfbeast.com>2019-08-18 16:26:16 +0200
commit202296d02aa99afa90581333ab059c050b9c3ade (patch)
tree6ed8a1289bed1bb06d2703ea77cba5fccd3bdffa /js/src/builtin/Object.cpp
parent1530f48c27fb13d7cbd2708c9f0fcf2dabc6ed6a (diff)
parentab6242a93b849b0a3c7525b16bc01dd3172fc167 (diff)
downloadUXP-202296d02aa99afa90581333ab059c050b9c3ade.tar
UXP-202296d02aa99afa90581333ab059c050b9c3ade.tar.gz
UXP-202296d02aa99afa90581333ab059c050b9c3ade.tar.lz
UXP-202296d02aa99afa90581333ab059c050b9c3ade.tar.xz
UXP-202296d02aa99afa90581333ab059c050b9c3ade.zip
Pull Basilisk-release forward.
Diffstat (limited to 'js/src/builtin/Object.cpp')
-rw-r--r--js/src/builtin/Object.cpp18
1 files changed, 3 insertions, 15 deletions
diff --git a/js/src/builtin/Object.cpp b/js/src/builtin/Object.cpp
index 389bb57db..56c77f304 100644
--- a/js/src/builtin/Object.cpp
+++ b/js/src/builtin/Object.cpp
@@ -525,18 +525,6 @@ js::obj_toString(JSContext* cx, unsigned argc, Value* vp)
return true;
}
-
-bool
-js::obj_valueOf(JSContext* cx, unsigned argc, Value* vp)
-{
- CallArgs args = CallArgsFromVp(argc, vp);
- RootedObject obj(cx, ToObject(cx, args.thisv()));
- if (!obj)
- return false;
- args.rval().setObject(*obj);
- return true;
-}
-
static bool
obj_setPrototypeOf(JSContext* cx, unsigned argc, Value* vp)
{
@@ -1301,7 +1289,7 @@ static const JSFunctionSpec object_methods[] = {
#endif
JS_FN(js_toString_str, obj_toString, 0,0),
JS_SELF_HOSTED_FN(js_toLocaleString_str, "Object_toLocaleString", 0, 0),
- JS_FN(js_valueOf_str, obj_valueOf, 0,0),
+ JS_SELF_HOSTED_FN(js_valueOf_str, "Object_valueOf", 0,0),
#if JS_HAS_OBJ_WATCHPOINT
JS_FN(js_watch_str, obj_watch, 2,0),
JS_FN(js_unwatch_str, obj_unwatch, 1,0),
@@ -1420,8 +1408,8 @@ FinishObjectClassInit(JSContext* cx, JS::HandleObject ctor, JS::HandleObject pro
* only set the [[Prototype]] if it hasn't already been set.
*/
Rooted<TaggedProto> tagged(cx, TaggedProto(proto));
- if (global->shouldSplicePrototype(cx)) {
- if (!global->splicePrototype(cx, global->getClass(), tagged))
+ if (global->shouldSplicePrototype()) {
+ if (!JSObject::splicePrototype(cx, global, global->getClass(), tagged))
return false;
}
return true;