[webkit-reviews] review granted: [Bug 229843] Math.hypot checks for infinite values prematurely : [Attachment 437397] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Sep 6 11:51:35 PDT 2021
Ross Kirsling <ross.kirsling at sony.com> has granted Yusuke Suzuki
<ysuzuki at apple.com>'s request for review:
Bug 229843: Math.hypot checks for infinite values prematurely
https://bugs.webkit.org/show_bug.cgi?id=229843
Attachment 437397: Patch
https://bugs.webkit.org/attachment.cgi?id=437397&action=review
--- Comment #2 from Ross Kirsling <ross.kirsling at sony.com> ---
Comment on attachment 437397
--> https://bugs.webkit.org/attachment.cgi?id=437397
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=437397&action=review
r=me with comments.
> Source/JavaScriptCore/ChangeLog:8
> + We should throw an error about non finite argument after coercing
all arguments to doubles.
Don't forget the spec link. :)
https://tc39.es/ecma262/#sec-math.hypot
> JSTests/stress/math-hypot-evaluation-ordering.js:18
> +shouldThrow(() => {
> + Math.hypot({valueOf(){ return Infinity }}, {valueOf(){ throw new
Error("arguments[1]") }})
> +}, `Error: arguments[1]`);
I think this test should be upstreamed to test262.
More information about the webkit-reviews
mailing list