Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 998eb1b4b14e4d3b113b5bf80a2a5e58ae98f300
https://github.com/WebKit/WebKit/commit/998eb1b4b14e4d3b113b5bf80a2a5e58ae98f300
Author: Sosuke Suzuki <[email protected]>
Date: 2025-02-10 (Mon, 10 Feb 2025)
Changed paths:
A JSTests/stress/date-prototype-set-methods-toNumber-no-args.js
A JSTests/stress/date-prototype-set-methods-toNumber.js
M JSTests/test262/expectations.yaml
M Source/JavaScriptCore/runtime/DatePrototype.cpp
Log Message:
-----------
[JSC] `Date.prototype.set*` methods should check if `internalNumber` is NaN,
before set PNaN
https://bugs.webkit.org/show_bug.cgi?id=286973
Reviewed by Yusuke Suzuki.
Currently, in JSC the Date#setHours, Date#setMinutes, and similar methods check
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).
* JSTests/test262/expectations.yaml:
* Source/JavaScriptCore/runtime/DatePrototype.cpp:
(JSC::setNewValueFromTimeArgs):
Canonical link: https://commits.webkit.org/290201@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes