mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 18:37:34 +00:00
LibJS: Update a couple of outdated spec comments
These are editorial changes in the ECMA-262 spec. See: -e080a7f
-c5a9094
-5091520
-1c6564b
-e06c80c
This commit is contained in:
parent
ce659e5eeb
commit
5a26a547db
6 changed files with 12 additions and 10 deletions
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
|
||||
* Copyright (c) 2020-2021, Linus Groh <linusg@serenityos.org>
|
||||
* Copyright (c) 2020-2022, Linus Groh <linusg@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -82,7 +82,7 @@ ThrowCompletionOr<bool> Array::set_length(PropertyDescriptor const& property_des
|
|||
// 12. If oldLenDesc.[[Writable]] is false, return false.
|
||||
// NOTE: Handled by step 16
|
||||
|
||||
// 13. If newLenDesc.[[Writable]] is absent or has the value true, let newWritable be true.
|
||||
// 13. If newLenDesc.[[Writable]] is absent or is true, let newWritable be true.
|
||||
// 14. Else,
|
||||
// a. NOTE: Setting the [[Writable]] attribute to false is deferred in case any elements cannot be deleted.
|
||||
// b. Let newWritable be false.
|
||||
|
|
|
@ -94,8 +94,7 @@ void DatePrototype::initialize(GlobalObject& global_object)
|
|||
define_native_function(vm.names.valueOf, get_time, 0, attr);
|
||||
|
||||
// B.2.4.3 Date.prototype.toGMTString ( ), https://tc39.es/ecma262/#sec-date.prototype.togmtstring
|
||||
// The function object that is the initial value of Date.prototype.toGMTString
|
||||
// is the same function object that is the initial value of Date.prototype.toUTCString.
|
||||
// The initial value of the "toGMTString" property is %Date.prototype.toUTCString%, defined in 21.4.4.43.
|
||||
define_direct_property(vm.names.toGMTString, get_without_side_effects(vm.names.toUTCString), attr);
|
||||
}
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ ThrowCompletionOr<Value> FunctionEnvironment::get_super_base() const
|
|||
// 1. Let home be envRec.[[FunctionObject]].[[HomeObject]].
|
||||
auto home_object = m_function_object->home_object();
|
||||
|
||||
// 2. If home has the value undefined, return undefined.
|
||||
// 2. If home is undefined, return undefined.
|
||||
if (!home_object)
|
||||
return js_undefined();
|
||||
|
||||
|
|
|
@ -582,7 +582,7 @@ ThrowCompletionOr<Reference> VM::resolve_binding(FlyString const& name, Environm
|
|||
// 2. Assert: env is an Environment Record.
|
||||
VERIFY(environment);
|
||||
|
||||
// 3. If the code matching the syntactic production that is being evaluated is contained in strict mode code, let strict be true; else let strict be false.
|
||||
// 3. If the source text matched by the syntactic production that is being evaluated is contained in strict mode code, let strict be true; else let strict be false.
|
||||
bool strict = in_strict_mode();
|
||||
|
||||
// 4. Return ? GetIdentifierReference(env, name, strict).
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue