Title: [232241] trunk/Source/WebCore
Revision
232241
Author
[email protected]
Date
2018-05-28 03:15:45 -0700 (Mon, 28 May 2018)

Log Message

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

Patch by Carlos Garcia Campos <[email protected]> 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.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (232240 => 232241)


--- trunk/Source/WebCore/ChangeLog	2018-05-28 08:18:35 UTC (rev 232240)
+++ trunk/Source/WebCore/ChangeLog	2018-05-28 10:15:45 UTC (rev 232241)
@@ -1,3 +1,18 @@
+2018-05-28  Carlos Garcia Campos  <[email protected]>
+
+        [Web Animations] Test webanimations/css-animations.html is crashing
+        https://bugs.webkit.org/show_bug.cgi?id=186031
+
+        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.
+
 2018-05-28  Thibault Saunier  <[email protected]>
 
         [GStreamer] Handle changes in the "drm-preferred-decryption-system-id" NEED_CONTEXT message.

Modified: trunk/Source/WebCore/animation/DeclarativeAnimation.cpp (232240 => 232241)


--- trunk/Source/WebCore/animation/DeclarativeAnimation.cpp	2018-05-28 08:18:35 UTC (rev 232240)
+++ trunk/Source/WebCore/animation/DeclarativeAnimation.cpp	2018-05-28 10:15:45 UTC (rev 232241)
@@ -123,7 +123,7 @@
     auto* animationEffect = effect();
 
     auto isPending = pending();
-    auto iteration = animationEffect ? animationEffect->currentIteration().value() : 0;
+    auto iteration = animationEffect ? animationEffect->currentIteration().value_or(0) : 0;
     auto currentPhase = animationEffect ? animationEffect->phase() : phaseWithoutEffect();
 
     bool wasActive = m_previousPhase == AnimationEffectReadOnly::Phase::Active;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to