WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
129874
Math.{max, min}() must return after first Exception value
https://bugs.webkit.org/show_bug.cgi?id=129874
Summary
Math.{max, min}() must return after first Exception value
Tibor Mészáros
Reported
2014-03-07 02:58:54 PST
If there is more exception, it will not stop at the first, but the return value will be the first exception.
Attachments
Patch v1
(1.76 KB, patch)
2014-03-07 03:00 PST
,
Tibor Mészáros
no flags
Details
Formatted Diff
Diff
Patch
(32.74 KB, patch)
2014-03-17 16:44 PDT
,
Oliver Hunt
buildbot
: commit-queue-
Details
Formatted Diff
Diff
Archive of layout-test-results from webkit-ews-01 for mac-mountainlion
(496.23 KB, application/zip)
2014-03-17 18:53 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from webkit-ews-09 for mac-mountainlion-wk2
(469.18 KB, application/zip)
2014-03-17 19:09 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from webkit-ews-07 for mac-mountainlion
(609.99 KB, application/zip)
2014-03-17 19:33 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from webkit-ews-03 for mac-mountainlion
(609.96 KB, application/zip)
2014-03-17 20:29 PDT
,
Build Bot
no flags
Details
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Tibor Mészáros
Comment 1
2014-03-07 03:00:52 PST
Created
attachment 226105
[details]
Patch v1 If I add an if statement before the first if, we can check that there were any exception. If it was, drop a break, and the result will be this exception.
Oliver Hunt
Comment 2
2014-03-07 10:14:08 PST
It may be worth investigating implementing min/max in JS
Tibor Mészáros
Comment 3
2014-03-07 11:09:41 PST
(In reply to
comment #2
)
> It may be worth investigating implementing min/max in JS
I had tested that the original method will not stop at the first exception, but the return value will be the first. So the patch will fix this problem.
Darin Adler
Comment 4
2014-03-07 17:47:24 PST
Comment on
attachment 226105
[details]
Patch v1 This fix looks just right. But we need to add a test case too, so someone doesn’t break it in the future.
Tibor Mészáros
Comment 5
2014-03-14 09:54:23 PDT
(In reply to
comment #4
)
> (From update of
attachment 226105
[details]
) > This fix looks just right. But we need to add a test case too, so someone doesn’t break it in the future.
Hi! I'm sorry, but there is no way to show sideEffect, because the toNumber will return 0.0, after an exception, so complex objects will return 0.0 after an exception... references are there:
http://trac.webkit.org/browser/trunk/Source/JavaScriptCore/runtime/JSObject.cpp?rev=164904&order=name#L1562
http://trac.webkit.org/browser/trunk/Source/JavaScriptCore/runtime/JSObject.cpp?rev=164904&order=name#L1350
Darin Adler
Comment 6
2014-03-15 17:19:22 PDT
(In reply to
comment #5
)
> I'm sorry, but there is no way to show sideEffect, because the toNumber will return 0.0, after an exception, so complex objects will return 0.0 after an exception...
That’s wrong. The issue is not about a return value. It’s about whether the valueOf code runs at all.
Oliver Hunt
Comment 7
2014-03-17 16:44:25 PDT
Created
attachment 226977
[details]
Patch
Michael Saboff
Comment 8
2014-03-17 16:55:00 PDT
Comment on
attachment 226977
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=226977&action=review
> Source/JavaScriptCore/ChangeLog:9 > + This required fleching out a bit more of our builtins logic
*fleching*?
> Source/JavaScriptCore/builtins/Math.js:30 > + value = +value;
Won't this mean that min(-0, +0) will return +0? I think the spec says it should return -0.
> Source/JavaScriptCore/builtins/Math.js:47 > + value = +value;
Won't this mean that min(-0, -1) will return +0? I think the spec says it should return -0.
Build Bot
Comment 9
2014-03-17 18:53:50 PDT
Comment on
attachment 226977
[details]
Patch
Attachment 226977
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.appspot.com/results/5475724035096576
New failing tests: js/math.html
Build Bot
Comment 10
2014-03-17 18:53:52 PDT
Created
attachment 226998
[details]
Archive of layout-test-results from webkit-ews-01 for mac-mountainlion The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: webkit-ews-01 Port: mac-mountainlion Platform: Mac OS X 10.8.5
Build Bot
Comment 11
2014-03-17 19:09:32 PDT
Comment on
attachment 226977
[details]
Patch
Attachment 226977
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://webkit-queues.appspot.com/results/4663751877853184
New failing tests: js/math.html
Build Bot
Comment 12
2014-03-17 19:09:35 PDT
Created
attachment 227000
[details]
Archive of layout-test-results from webkit-ews-09 for mac-mountainlion-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: webkit-ews-09 Port: mac-mountainlion-wk2 Platform: Mac OS X 10.8.5
Build Bot
Comment 13
2014-03-17 19:33:20 PDT
Comment on
attachment 226977
[details]
Patch
Attachment 226977
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.appspot.com/results/6182673236099072
New failing tests: js/math.html
Build Bot
Comment 14
2014-03-17 19:33:24 PDT
Created
attachment 227002
[details]
Archive of layout-test-results from webkit-ews-07 for mac-mountainlion The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: webkit-ews-07 Port: mac-mountainlion Platform: Mac OS X 10.8.5
Build Bot
Comment 15
2014-03-17 20:29:43 PDT
Comment on
attachment 226977
[details]
Patch
Attachment 226977
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.appspot.com/results/4975311221424128
New failing tests: js/math.html
Build Bot
Comment 16
2014-03-17 20:29:47 PDT
Created
attachment 227004
[details]
Archive of layout-test-results from webkit-ews-03 for mac-mountainlion The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: webkit-ews-03 Port: mac-mountainlion Platform: Mac OS X 10.8.5
Brent Fulgham
Comment 17
2016-08-22 11:29:49 PDT
Oliver: Is this something you plan on completing? Or should we close the bug as NTBF?
Michael Catanzaro
Comment 18
2016-09-17 07:16:36 PDT
Comment on
attachment 226977
[details]
Patch Hi, Apologies that your patch was not reviewed in a timely manner. Since it's now quite old, I am removing it from the review request queue. Please consider rebasing it on trunk and resubmitting. To increase the chances of getting a review, consider using 'Tools/Scripts/webkit-patch upload --suggest-reviewers' to CC reviewers who might be interested in this bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug