[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
Thu Oct 27 17:38:10 PDT 2011
https://bugs.webkit.org/show_bug.cgi?id=67980
Kentaro Hara <haraken at chromium.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |haraken at chromium.org
--- Comment #5 from Kentaro Hara <haraken at chromium.org> 2011-10-27 17:38:10 PST ---
(In reply to comment #3)
> (From update of attachment 112459 [details])
> 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.
Done. Moved it to wtf/MathExtras.h.
--
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