Changeset 232241 in webkit


Ignore:
Timestamp:
May 28, 2018 3:15:45 AM (6 years ago)
Author:
commit-queue@webkit.org
Message:

[Web Animations] Test webanimations/css-animations.html is crashing
https://bugs.webkit.org/show_bug.cgi?id=186031

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2018-05-28
Reviewed by Antoine Quint.

This is another case of std::optional value being used while it's nullopt, I guess this started to fail when we
stopped using the WTF implementation of std::optional. The problem is that we try to get the current iteration
of a declarative animation when the active time is unresolved.

  • animation/DeclarativeAnimation.cpp:

(WebCore::DeclarativeAnimation::invalidateDOMEvents): Use value_or(0) instead of value() to get the current
iteration of the effect.

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r232240 r232241  
     12018-05-28  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        [Web Animations] Test webanimations/css-animations.html is crashing
     4        https://bugs.webkit.org/show_bug.cgi?id=186031
     5
     6        Reviewed by Antoine Quint.
     7
     8        This is another case of std::optional value being used while it's nullopt, I guess this started to fail when we
     9        stopped using the WTF implementation of std::optional. The problem is that we try to get the current iteration
     10        of a declarative animation when the active time is unresolved.
     11
     12        * animation/DeclarativeAnimation.cpp:
     13        (WebCore::DeclarativeAnimation::invalidateDOMEvents): Use value_or(0) instead of value() to get the current
     14        iteration of the effect.
     15
    1162018-05-28  Thibault Saunier  <tsaunier@igalia.com>
    217
  • trunk/Source/WebCore/animation/DeclarativeAnimation.cpp

    r232178 r232241  
    124124
    125125    auto isPending = pending();
    126     auto iteration = animationEffect ? animationEffect->currentIteration().value() : 0;
     126    auto iteration = animationEffect ? animationEffect->currentIteration().value_or(0) : 0;
    127127    auto currentPhase = animationEffect ? animationEffect->phase() : phaseWithoutEffect();
    128128
Note: See TracChangeset for help on using the changeset viewer.