From 98f5028619294b6b14cddf5903a0f831d0edef9c Mon Sep 17 00:00:00 2001 From: Neil Dhar Date: Sat, 13 Nov 2021 07:58:23 -0800 Subject: [PATCH] Fix length and enable tests for Object.hasOwn Summary: Length of `Object.hasOwn` should be 2, since it takes two parameters. test262 caught this, so enable those tests as well. Reviewed By: tmikov Differential Revision: D32411696 fbshipit-source-id: 90c9b9aaf196ab9b444223fbb147369eacc803df --- lib/VM/JSLib/Object.cpp | 2 +- utils/testsuite/testsuite_skiplist.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/VM/JSLib/Object.cpp b/lib/VM/JSLib/Object.cpp index 4c3862142f6..e784e65596d 100644 --- a/lib/VM/JSLib/Object.cpp +++ b/lib/VM/JSLib/Object.cpp @@ -166,7 +166,7 @@ Handle createObjectConstructor(Runtime *runtime) { Predefined::getSymbolID(Predefined::hasOwn), ctx, objectHasOwn, - 1); + 2); defineMethod( runtime, cons, diff --git a/utils/testsuite/testsuite_skiplist.py b/utils/testsuite/testsuite_skiplist.py index e921071841e..dfe3ae91a29 100644 --- a/utils/testsuite/testsuite_skiplist.py +++ b/utils/testsuite/testsuite_skiplist.py @@ -1900,7 +1900,6 @@ "json-superset", "let", "new.target", - "Object.hasOwn", "regexp-match-indices", "regexp-named-groups", "regexp-unicode-property-escapes",