From 5e4ca9fbb6e7cc88880bd83db2dc712394b475a8 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 86e6aaaec9c74a..9dd61a98933685 100644 --- a/src/util-inl.h +++ b/src/util-inl.h @@ -501,7 +501,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 1bb352537d6e51..93a79f8761ee65 100644 --- a/src/util.h +++ b/src/util.h @@ -215,7 +215,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);