[Webkit-unassigned] [Bug 67980] [Chromium/Mac] fast/events/constructors/progress-event-constructor.html is failing
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Oct 26 09:48:22 PDT 2011
https://bugs.webkit.org/show_bug.cgi?id=67980
Adam Barth <abarth at webkit.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #112459|review? |review-
Flag| |
--- Comment #3 from Adam Barth <abarth at webkit.org> 2011-10-26 09:48:22 PST ---
(From update of attachment 112459)
View in context: https://bugs.webkit.org/attachment.cgi?id=112459&action=review
> Source/WebCore/bindings/v8/OptionsObject.cpp:238
> + // Calculate d % 2^{64}.
> + // -2^{64} < fmodValue < 2^{64}.
> + double fmodValue = fmod(trunc(d), std::numeric_limits<unsigned long long>::max() + 1.0);
> + if (fmodValue >= 0) {
> + // 0 <= fmodValue < 2^{64}.
> + // 0 <= value < 2^{64}. This cast causes no loss.
> + value = static_cast<unsigned long long>(fmodValue);
> + } else {
> + // -2^{64} < fmodValue < 0.
> + // 0 < fmodValueInUnsignedLongLong < 2^{64}. This cast causes no loss.
> + unsigned long long fmodValueInUnsignedLongLong = static_cast<unsigned long long>(-fmodValue);
> + // -1 < (std::numeric_limits<unsigned long long>::max() - fmodValueInUnsignedLongLong) < 2^{64} - 1.
> + // 0 < value < 2^{64}.
> + value = std::numeric_limits<unsigned long long>::max() - fmodValueInUnsignedLongLong + 1;
> + }
This looks cool, but it should be factored into a more general location so that folks can re-use it. If it's V8-specific logic, it should probably go in V8Utilities. If it's more general than V8, it should go in WTF somewhere.
--
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