[Webkit-unassigned] [Bug 286973] New: [JSC] `Date.prototype.set*` methods should check if `internalNumber` is NaN, before set PNaN

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Feb 3 16:59:43 PST 2025


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

            Bug ID: 286973
           Summary: [JSC] `Date.prototype.set*` methods should check if
                    `internalNumber` is NaN, before set PNaN
           Product: WebKit
           Version: WebKit Local Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: aosukeke at gmail.com

Currently, in JSC the Date#setHours, Date#setMinutes, and similar methodscheck if
    the internalNumber is NaN and then call applyToNumberToOtherwiseIgnoredArguments
    before explicitly setting internalNumber to PNaN.

    However, since applyToNumberToOtherwiseIgnoredArguments can update internalNumber (e.g. when
    valueOf or Symbol.toPrimitive are overridden), we must recheck that internalNumber
    is still NaN immediately before assigning PNaN.

    This change aligns our behavior with the expectations added in test262 (see tc39/test262#4258).

-- 
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/20250204/d8dc45b4/attachment.htm>


More information about the webkit-unassigned mailing list