Commit e6d1e7b
Fix double-evaluation of Date constructor arguments
The date_msecFromArgs function was calling toNumber() and then toInteger()
on the same argument, which caused the argument's toString/valueOf to be
called twice. Fixed by using the already-computed number value when
converting to integer.
Fixes 2 test262 tests:
- built-ins/Date/UTC/coercion-order.js
- built-ins/Date/coercion-order.js1 parent 8ed9aa9 commit e6d1e7b
2 files changed
Lines changed: 2 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
925 | 925 | | |
926 | 926 | | |
927 | 927 | | |
928 | | - | |
| 928 | + | |
929 | 929 | | |
930 | 930 | | |
931 | 931 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
775 | 775 | | |
776 | 776 | | |
777 | 777 | | |
778 | | - | |
| 778 | + | |
779 | 779 | | |
780 | 780 | | |
781 | 781 | | |
| |||
846 | 846 | | |
847 | 847 | | |
848 | 848 | | |
849 | | - | |
850 | 849 | | |
851 | 850 | | |
852 | | - | |
853 | 851 | | |
854 | 852 | | |
855 | 853 | | |
| |||
0 commit comments