summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/Runtime/ObjectConstructor.cpp
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2021-10-23 02:14:21 +0100
committerAndreas Kling <kling@serenityos.org>2021-10-23 11:38:13 +0200
commit5ff7d7945dcd79e2b5aa1f48eb67e7eb6e0b849b (patch)
tree3e84fa820e95140372392f4a09b16ab8ba5fef4a /Userland/Libraries/LibJS/Runtime/ObjectConstructor.cpp
parent60ee542612e90f2a78e952c04d9ba0743b657b70 (diff)
downloadserenity-5ff7d7945dcd79e2b5aa1f48eb67e7eb6e0b849b.zip
LibJS: Use ECMA-262 spec URL for Object.hasOwn() (now stage 4)
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/ObjectConstructor.cpp')
-rw-r--r--Userland/Libraries/LibJS/Runtime/ObjectConstructor.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/ObjectConstructor.cpp b/Userland/Libraries/LibJS/Runtime/ObjectConstructor.cpp
index 4f48450cec..831bc5d00d 100644
--- a/Userland/Libraries/LibJS/Runtime/ObjectConstructor.cpp
+++ b/Userland/Libraries/LibJS/Runtime/ObjectConstructor.cpp
@@ -137,7 +137,7 @@ JS_DEFINE_OLD_NATIVE_FUNCTION(ObjectConstructor::get_prototype_of)
return TRY_OR_DISCARD(object->internal_get_prototype_of());
}
-// 20.1.2.21 Object.setPrototypeOf ( O, proto ), https://tc39.es/ecma262/#sec-object.setprototypeof
+// 20.1.2.22 Object.setPrototypeOf ( O, proto ), https://tc39.es/ecma262/#sec-object.setprototypeof
JS_DEFINE_OLD_NATIVE_FUNCTION(ObjectConstructor::set_prototype_of)
{
auto proto = vm.argument(1);
@@ -169,7 +169,7 @@ JS_DEFINE_OLD_NATIVE_FUNCTION(ObjectConstructor::set_prototype_of)
return object;
}
-// 20.1.2.14 Object.isExtensible ( O ), https://tc39.es/ecma262/#sec-object.isextensible
+// 20.1.2.15 Object.isExtensible ( O ), https://tc39.es/ecma262/#sec-object.isextensible
JS_DEFINE_OLD_NATIVE_FUNCTION(ObjectConstructor::is_extensible)
{
auto argument = vm.argument(0);
@@ -178,7 +178,7 @@ JS_DEFINE_OLD_NATIVE_FUNCTION(ObjectConstructor::is_extensible)
return Value(TRY_OR_DISCARD(argument.as_object().is_extensible()));
}
-// 20.1.2.15 Object.isFrozen ( O ), https://tc39.es/ecma262/#sec-object.isfrozen
+// 20.1.2.16 Object.isFrozen ( O ), https://tc39.es/ecma262/#sec-object.isfrozen
JS_DEFINE_OLD_NATIVE_FUNCTION(ObjectConstructor::is_frozen)
{
auto argument = vm.argument(0);
@@ -187,7 +187,7 @@ JS_DEFINE_OLD_NATIVE_FUNCTION(ObjectConstructor::is_frozen)
return Value(TRY_OR_DISCARD(argument.as_object().test_integrity_level(Object::IntegrityLevel::Frozen)));
}
-// 20.1.2.16 Object.isSealed ( O ), https://tc39.es/ecma262/#sec-object.issealed
+// 20.1.2.17 Object.isSealed ( O ), https://tc39.es/ecma262/#sec-object.issealed
JS_DEFINE_OLD_NATIVE_FUNCTION(ObjectConstructor::is_sealed)
{
auto argument = vm.argument(0);
@@ -196,7 +196,7 @@ JS_DEFINE_OLD_NATIVE_FUNCTION(ObjectConstructor::is_sealed)
return Value(TRY_OR_DISCARD(argument.as_object().test_integrity_level(Object::IntegrityLevel::Sealed)));
}
-// 20.1.2.18 Object.preventExtensions ( O ), https://tc39.es/ecma262/#sec-object.preventextensions
+// 20.1.2.19 Object.preventExtensions ( O ), https://tc39.es/ecma262/#sec-object.preventextensions
JS_DEFINE_OLD_NATIVE_FUNCTION(ObjectConstructor::prevent_extensions)
{
auto argument = vm.argument(0);
@@ -248,7 +248,7 @@ JS_DEFINE_OLD_NATIVE_FUNCTION(ObjectConstructor::from_entries)
return object;
}
-// 20.1.2.20 Object.seal ( O ), https://tc39.es/ecma262/#sec-object.seal
+// 20.1.2.21 Object.seal ( O ), https://tc39.es/ecma262/#sec-object.seal
JS_DEFINE_OLD_NATIVE_FUNCTION(ObjectConstructor::seal)
{
auto argument = vm.argument(0);
@@ -331,13 +331,13 @@ JS_DEFINE_OLD_NATIVE_FUNCTION(ObjectConstructor::define_properties)
return TRY_OR_DISCARD(object.as_object().define_properties(properties));
}
-// 20.1.2.13 Object.is ( value1, value2 ), https://tc39.es/ecma262/#sec-object.is
+// 20.1.2.14 Object.is ( value1, value2 ), https://tc39.es/ecma262/#sec-object.is
JS_DEFINE_OLD_NATIVE_FUNCTION(ObjectConstructor::is)
{
return Value(same_value(vm.argument(0), vm.argument(1)));
}
-// 20.1.2.17 Object.keys ( O ), https://tc39.es/ecma262/#sec-object.keys
+// 20.1.2.18 Object.keys ( O ), https://tc39.es/ecma262/#sec-object.keys
JS_DEFINE_OLD_NATIVE_FUNCTION(ObjectConstructor::keys)
{
auto* object = TRY_OR_DISCARD(vm.argument(0).to_object(global_object));
@@ -345,7 +345,7 @@ JS_DEFINE_OLD_NATIVE_FUNCTION(ObjectConstructor::keys)
return Array::create_from(global_object, name_list);
}
-// 20.1.2.22 Object.values ( O ), https://tc39.es/ecma262/#sec-object.values
+// 20.1.2.23 Object.values ( O ), https://tc39.es/ecma262/#sec-object.values
JS_DEFINE_OLD_NATIVE_FUNCTION(ObjectConstructor::values)
{
auto* object = TRY_OR_DISCARD(vm.argument(0).to_object(global_object));
@@ -386,7 +386,7 @@ JS_DEFINE_OLD_NATIVE_FUNCTION(ObjectConstructor::create)
return object;
}
-// 1 Object.hasOwn ( O, P ), https://tc39.es/proposal-accessible-object-hasownproperty/#sec-object.hasown
+// 20.1.2.13 Object.hasOwn ( O, P ), https://tc39.es/ecma262/#sec-object.hasown
JS_DEFINE_OLD_NATIVE_FUNCTION(ObjectConstructor::has_own)
{
// 1. Let obj be ? ToObject(O).