[Webkit-unassigned] [Bug 157924] REGRESSION (r188642): All pages are blank when printing a webpage in iOS Safari
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri May 20 03:24:49 PDT 2016
https://bugs.webkit.org/show_bug.cgi?id=157924
--- Comment #8 from Andy Estes <aestes at apple.com> ---
(In reply to comment #3)
> I think the right solution here is probably to change the "+" to an add with
> clamping to max on overflow.
>
> One way to do that:
>
> If (absoluteTimeout < timeout)
> absoluteTimeout = Condition::Clock::time_point::max();
Sorry, I spoke too soon. This ends up not working because the operator< for durations converts both operands into a common duration type before making the comparison. In this case the common duration is nanoseconds, which we already know milliseconds::max() will overflow on conversion.
What I ended up doing was to compute the amount of time remaining on the clock, convert that duration to milliseconds, then pick the smaller of that value and the timeout for computing absoluteTimeout. The conversion will reduce the maximum possible timeout by up to 1 millisecond, but that seems harmless.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160520/514045f1/attachment.html>
More information about the webkit-unassigned
mailing list