[Webkit-unassigned] [Bug 152045] We should stop using std::chrono because std::chrono::duration casts are prone to overflows
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Nov 1 12:58:26 PDT 2016
https://bugs.webkit.org/show_bug.cgi?id=152045
Filip Pizlo <fpizlo at apple.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|webkit-unassigned at lists.web |fpizlo at apple.com
|kit.org |
--- Comment #2 from Filip Pizlo <fpizlo at apple.com> ---
Created attachment 293572
--> https://bugs.webkit.org/attachment.cgi?id=293572&action=review
possibly solution
This std::chrono nonsense has got to stop. I've had to write so much boilerplate defend-against-overflow code because of std::chrono. I don't want to do this anymore.
This patch creates wrappers for doubles so that we can use doubles for time. The types are easy and have operator overloading for algebra:
Seconds
WallTime
MonotonicTime
TimeWithDynamicClockType
I'm going to see how easy it is to teach existing std::chrono clients to use this instead.
--
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/20161101/c1b692ca/attachment.html>
More information about the webkit-unassigned
mailing list