From 42fa4a6a4e753a13178c1f1603877bfa772da048 Mon Sep 17 00:00:00 2001 From: Daniel Andersson Date: Wed, 10 Mar 2021 15:30:17 -0800 Subject: [PATCH] Fix incorrect comment about strictEquals Summary: The documentation of jsi::Value::strictEquals was confusing it with SameValue (which differs in treatment of signed zeroes and NaN). Fix it by referring to the correct part of the spec. Changelog: [Internal][Fixed] - Fix incorrect comment Reviewed By: avp Differential Revision: D26430216 fbshipit-source-id: 0ea4208fbdda40c87f8028231ddefb2323b6eb96 --- ReactCommon/jsi/jsi/jsi.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ReactCommon/jsi/jsi/jsi.h b/ReactCommon/jsi/jsi/jsi.h index f6c17e5bb67..67149a80b10 100644 --- a/ReactCommon/jsi/jsi/jsi.h +++ b/ReactCommon/jsi/jsi/jsi.h @@ -995,8 +995,8 @@ class JSI_EXPORT Value { return runtime.createValueFromJsonUtf8(json, length); } - /// \return according to the SameValue algorithm see more here: - // https://www.ecma-international.org/ecma-262/5.1/#sec-11.9.4 + /// \return according to the Strict Equality Comparison algorithm, see: + /// https://262.ecma-international.org/11.0/#sec-strict-equality-comparison static bool strictEquals(Runtime& runtime, const Value& a, const Value& b); Value& operator=(Value&& other) {