From e352a4ef27cf5c086275549d51f83d683d4aaa59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Nie=C3=9Fen?= Date: Mon, 15 Jul 2024 22:01:14 +0200 Subject: [PATCH] src: update outdated references to spec sections The exact section has changed in recent versions of ECMA-262, so fix the section number and explicitly mark the edition of the standard to avoid having to update it in the future. PR-URL: https://github.com/nodejs/node/pull/53832 Reviewed-By: James M Snell Reviewed-By: Marco Ippolito --- src/util-inl.h | 2 +- src/util.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util-inl.h b/src/util-inl.h index 1e761d0aa54c09..31ffa4934cf005 100644 --- a/src/util-inl.h +++ b/src/util-inl.h @@ -582,7 +582,7 @@ void ArrayBufferViewContents::ReadValue(v8::Local buf) { } } -// ECMA262 20.1.2.5 +// ECMA-262, 15th edition, 21.1.2.5. Number.isSafeInteger inline bool IsSafeJsInt(v8::Local v) { if (!v->IsNumber()) return false; double v_d = v.As()->Value(); diff --git a/src/util.h b/src/util.h index 3ae876e5484f0e..655197ff1ba604 100644 --- a/src/util.h +++ b/src/util.h @@ -217,7 +217,7 @@ void DumpJavaScriptBacktrace(FILE* fp); #define UNREACHABLE(...) \ ERROR_AND_ABORT("Unreachable code reached" __VA_OPT__(": ") __VA_ARGS__) -// ECMA262 20.1.2.6 Number.MAX_SAFE_INTEGER (2^53-1) +// ECMA-262, 15th edition, 21.1.2.6. Number.MAX_SAFE_INTEGER (2^53-1) constexpr int64_t kMaxSafeJsInteger = 9007199254740991; inline bool IsSafeJsInt(v8::Local v);