mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-02 22:08:40 +09:00
1333143 - Self-host Object.prototype.valueOf.
This commit is contained in:
parent
5d929d8c47
commit
337cdbd0ce
7 changed files with 26 additions and 19 deletions
|
|
@ -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),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue