[Webkit-unassigned] [Bug 204114] WebDriver: fix handling of session timeouts for values higher than MAX_INT

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Dec 17 02:52:30 PST 2019


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

--- Comment #7 from Carlos Garcia Campos <cgarcia at igalia.com> ---
Comment on attachment 383354
  --> https://bugs.webkit.org/attachment.cgi?id=383354
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=383354&action=review

>>> Source/WebDriver/Session.h:54
>>> +    double pageLoadTimeout() const { return m_pageLoadTimeout; }
>> 
>> Why?
> 
> 

When using Seconds we first get a double value in milliseconds that is converted to seconds. That value is then converted again to milliseconds when used as a timeout in js code. So we get milliseconds and we need milliseconds, there's no need to convert to seconds at all. There are also rounding issue when doing so, for example the tests that check that maximum value 9007199254740991 fail if we convert to and from seconds, see:

v = 9007199254740991.
v / 1000 -> 9007199254740.99
(v / 1000) * 1000 -> 9007199254740990.0
9007199254740991. != 9007199254740990.0

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20191217/c5ca4ed6/attachment.htm>


More information about the webkit-unassigned mailing list