summaryrefslogtreecommitdiffstats
path: root/js/src/builtin/Object.cpp
diff options
context:
space:
mode:
authorGaming4JC <g4jc@hyperbola.info>2019-06-08 17:19:11 -0400
committerGaming4JC <g4jc@hyperbola.info>2019-07-18 22:38:20 -0400
commitcefee262b7059d035667b148d56ebc7af5120d37 (patch)
treebb2feca588ba2555b2559fdada273934335ae31b /js/src/builtin/Object.cpp
parentd074844a4e758209dcfd8ce12720680edd957b42 (diff)
downloadUXP-cefee262b7059d035667b148d56ebc7af5120d37.tar
UXP-cefee262b7059d035667b148d56ebc7af5120d37.tar.gz
UXP-cefee262b7059d035667b148d56ebc7af5120d37.tar.lz
UXP-cefee262b7059d035667b148d56ebc7af5120d37.tar.xz
UXP-cefee262b7059d035667b148d56ebc7af5120d37.zip
1333143 - Self-host Object.prototype.valueOf.
Diffstat (limited to 'js/src/builtin/Object.cpp')
-rw-r--r--js/src/builtin/Object.cpp14
1 files changed, 1 insertions, 13 deletions
diff --git a/js/src/builtin/Object.cpp b/js/src/builtin/Object.cpp
index 389bb57db..e4bee5457 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),