Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: ce3c6e45d71d35adf3278d6defeb0e27d2308d63
      
https://github.com/WebKit/WebKit/commit/ce3c6e45d71d35adf3278d6defeb0e27d2308d63
  Author: Tim Chevalier <[email protected]>
  Date:   2025-11-03 (Mon, 03 Nov 2025)

  Changed paths:
    M JSTests/stress/temporal-plaindatetime.js
    M JSTests/test262/expectations.yaml
    M Source/JavaScriptCore/runtime/TemporalObject.cpp
    M Source/JavaScriptCore/runtime/TemporalObject.h
    M Source/JavaScriptCore/runtime/TemporalPlainTime.cpp

  Log Message:
  -----------
  [Temporal] balanceTime() should take Int128 arguments
https://bugs.webkit.org/show_bug.cgi?id=301710

Reviewed by Yusuke Suzuki.

When adding a duration with a microseconds or nanoseconds value that is
close to Number.MAX_SAFE_INTEGER, `TemporalPlainTime::addTime()` was
doing an addition that overflowed, as the Duration and PlainTime fields
are doubles.

This exposed another bug in balanceTime() (when the modulo result is
negative, the next-biggest time unit should be decremented by 1).

This also fixes two test262 tests.
* JSTests/stress/temporal-plaindatetime.js:
* JSTests/test262/expectations.yaml:
* Source/JavaScriptCore/runtime/TemporalObject.cpp:
(JSC::nonNegativeModulo): Deleted.
* Source/JavaScriptCore/runtime/TemporalObject.h:
* Source/JavaScriptCore/runtime/TemporalPlainTime.cpp:
(JSC::balanceTime):
(JSC::TemporalPlainTime::addTime):

Canonical link: https://commits.webkit.org/302509@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to