[Webkit-unassigned] [Bug 229826] [JSC] Implement Temporal.Instant

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Oct 15 17:42:42 PDT 2021


https://bugs.webkit.org/show_bug.cgi?id=229826

--- Comment #24 from Yusuke Suzuki <ysuzuki at apple.com> ---
Comment on attachment 441022
  --> https://bugs.webkit.org/attachment.cgi?id=441022
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=441022&action=review

Commented about HeapBigInt.

> Source/JavaScriptCore/runtime/TemporalInstant.cpp:85
> +    JSBigInt* bigint = asHeapBigInt(epochNanoseconds);

This is not correct. In BIGINT32 environment, epochMicroseconds can be BigInt32. So we should check it first before casting it to HeapBigInt via asHeapBigInt.

> Source/JavaScriptCore/runtime/TemporalInstant.cpp:210
> +    JSBigInt* bigint = asHeapBigInt(epochMicroseconds);
> +#if USE(BIGINT32)
> +    bool bigIntTooLong = bigint->length() > 2;
> +#else
> +    bool bigIntTooLong = bigint->length() > 1;
> +#endif
> +    ISO8601::ExactTime exactTime = ISO8601::ExactTime::fromEpochMicroseconds(JSBigInt::toBigUInt64(bigint));

This is not correct. In BIGINT32 environment, epochMicroseconds can be BigInt32. So we should check it first before casting it to HeapBigInt via asHeapBigInt.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20211016/3198020a/attachment.htm>


More information about the webkit-unassigned mailing list