[Webkit-unassigned] [Bug 26978] valueOf called in wrong order in atan2 and date constructors.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Sep 25 21:47:01 PDT 2010


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


Mark Hahnenberg <mhahnenb at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mhahnenb at gmail.com




--- Comment #2 from Mark Hahnenberg <mhahnenb at gmail.com>  2010-09-25 21:47:01 PST ---
I think these are actually two distinct bugs.

I believe the issue with atan2 is due to the fact that the order of evaluation of the arguments to a function call is unspecified in C++.  I think the compiler is actually reordering the calls to the toNumber() function in mathProtoFuncATan2().  When I ran it in gdb, argument(1) was evaluated before argument(0), which seems to confirm this hypothesis.

As for the Date constructors, the issue was that the arguments were being evaluated to numeric representations twice, once by toNumber() and once by toInt32(),  therefore the valueOf function was getting called twice.

I've created three separate patches, one for each issue and one for the overall changelog.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list