summaryrefslogtreecommitdiff
path: root/Userland/Libraries
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2022-05-03 21:25:02 +0200
committerLinus Groh <mail@linusgroh.de>2022-05-03 22:49:31 +0200
commit257375f54ca01b85b1e2a1f9c2b1ce6f9337b3db (patch)
treea122bfae6fda53914b342eb44a1525716713912a /Userland/Libraries
parent17fb40bc42f76cf4c6aacde2b5236711ae2b2ae6 (diff)
downloadserenity-257375f54ca01b85b1e2a1f9c2b1ce6f9337b3db.zip
LibJS: Update comments for Annex B changes to IsLooselyEqual
This is an editorial change in the ECMA-262 spec. See: https://github.com/tc39/ecma262/commit/da3d674
Diffstat (limited to 'Userland/Libraries')
-rw-r--r--Userland/Libraries/LibJS/Runtime/Value.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/Value.cpp b/Userland/Libraries/LibJS/Runtime/Value.cpp
index f02fa9009f..c0918acabd 100644
--- a/Userland/Libraries/LibJS/Runtime/Value.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Value.cpp
@@ -1419,11 +1419,12 @@ ThrowCompletionOr<bool> is_loosely_equal(GlobalObject& global_object, Value lhs,
// 4. NOTE: This step is replaced in section B.3.6.2.
// B.3.6.2 Changes to IsLooselyEqual, https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
- // 1. If Type(x) is Object and x has an [[IsHTMLDDA]] internal slot and y is either null or undefined, return true.
+ // 4. Perform the following steps:
+ // a. If Type(x) is Object and x has an [[IsHTMLDDA]] internal slot and y is either null or undefined, return true.
if (lhs.is_object() && lhs.as_object().is_htmldda() && rhs.is_nullish())
return true;
- // 2. If x is either null or undefined and Type(y) is Object and y has an [[IsHTMLDDA]] internal slot, return true.
+ // b. If x is either null or undefined and Type(y) is Object and y has an [[IsHTMLDDA]] internal slot, return true.
if (lhs.is_nullish() && rhs.is_object() && rhs.as_object().is_htmldda())
return true;