Skip to content

Commit 5e4ca9f

Browse files
tniessenaduh95
authored andcommitted
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: #53832 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Marco Ippolito <[email protected]>
1 parent 0a01abb commit 5e4ca9f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/util-inl.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ void ArrayBufferViewContents<T, S>::ReadValue(v8::Local<v8::Value> buf) {
501501
}
502502
}
503503

504-
// ECMA262 20.1.2.5
504+
// ECMA-262, 15th edition, 21.1.2.5. Number.isSafeInteger
505505
inline bool IsSafeJsInt(v8::Local<v8::Value> v) {
506506
if (!v->IsNumber()) return false;
507507
double v_d = v.As<v8::Number>()->Value();

src/util.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ void DumpJavaScriptBacktrace(FILE* fp);
215215
#define UNREACHABLE(...) \
216216
ERROR_AND_ABORT("Unreachable code reached" __VA_OPT__(": ") __VA_ARGS__)
217217

218-
// ECMA262 20.1.2.6 Number.MAX_SAFE_INTEGER (2^53-1)
218+
// ECMA-262, 15th edition, 21.1.2.6. Number.MAX_SAFE_INTEGER (2^53-1)
219219
constexpr int64_t kMaxSafeJsInteger = 9007199254740991;
220220

221221
inline bool IsSafeJsInt(v8::Local<v8::Value> v);

0 commit comments

Comments
 (0)