Method to map a legacy ECMAScript Date instance into a Temporal.Instant instance corresponding to the same instant in exact time.
<rdar://problem/84752707>
Created attachment 445015 [details] Patch
Comment on attachment 445015 [details] Patch r=me
Committed r286149 (244533@main): <https://commits.webkit.org/244533@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 445015 [details].
Hey Aditi, clang is warning about an off-by-one error here: DatePrototype.cpp:934:93: warning: implicit conversion from 'long' to 'double' changes value from 9223372036854775807 to 9223372036854775808 [-Wimplicit-const-int-float-conversion] ASSERT(epochMilliseconds >= std::numeric_limits<int64_t>::min() && epochMilliseconds <= std::numeric_limits<int64_t>::max()); ~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/mgadelha/tools/WebKit/WebKitBuild/Debug/WTF/Headers/wtf/Assertions.h:363:11: note: expanded from macro 'ASSERT' if (!(assertion)) { \ ^~~~~~~~~ 1 warning generated.
(In reply to Mikhail R. Gadelha from comment #5) > Hey Aditi, clang is warning about an off-by-one error here: > > DatePrototype.cpp:934:93: warning: implicit conversion from 'long' to > 'double' changes value from 9223372036854775807 to 9223372036854775808 > [-Wimplicit-const-int-float-conversion] > ASSERT(epochMilliseconds >= std::numeric_limits<int64_t>::min() && > epochMilliseconds <= std::numeric_limits<int64_t>::max()); > > ~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > /home/mgadelha/tools/WebKit/WebKitBuild/Debug/WTF/Headers/wtf/Assertions.h: > 363:11: note: expanded from macro 'ASSERT' > if (!(assertion)) { \ > ^~~~~~~~~ > 1 warning generated. Um, I'll look into this.