Title: [233430] trunk/Source/WebCore
Revision
233430
Author
grao...@webkit.org
Date
2018-07-02 13:46:14 -0700 (Mon, 02 Jul 2018)

Log Message

Crash in WebCore::WebAnimation::timeToNextRequiredTick when running imported/w3c/web-platform-tests/web-animations/interfaces/Animatable/animate-no-browsing-context.html
https://bugs.webkit.org/show_bug.cgi?id=187145

Reviewed by Dean Jackson.

Ensure we have a resolved time value before trying to use it.

* animation/WebAnimation.cpp:
(WebCore::WebAnimation::timeToNextRequiredTick const):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (233429 => 233430)


--- trunk/Source/WebCore/ChangeLog	2018-07-02 20:45:29 UTC (rev 233429)
+++ trunk/Source/WebCore/ChangeLog	2018-07-02 20:46:14 UTC (rev 233430)
@@ -1,5 +1,17 @@
 2018-07-02  Antoine Quint  <grao...@apple.com>
 
+        Crash in WebCore::WebAnimation::timeToNextRequiredTick when running imported/w3c/web-platform-tests/web-animations/interfaces/Animatable/animate-no-browsing-context.html
+        https://bugs.webkit.org/show_bug.cgi?id=187145
+
+        Reviewed by Dean Jackson.
+
+        Ensure we have a resolved time value before trying to use it.
+
+        * animation/WebAnimation.cpp:
+        (WebCore::WebAnimation::timeToNextRequiredTick const):
+
+2018-07-02  Antoine Quint  <grao...@apple.com>
+
         [Web Animations] Crash in KeyframeEffectReadOnly::applyPendingAcceleratedActions()
         https://bugs.webkit.org/show_bug.cgi?id=187139
 

Modified: trunk/Source/WebCore/animation/WebAnimation.cpp (233429 => 233430)


--- trunk/Source/WebCore/animation/WebAnimation.cpp	2018-07-02 20:45:29 UTC (rev 233429)
+++ trunk/Source/WebCore/animation/WebAnimation.cpp	2018-07-02 20:46:14 UTC (rev 233430)
@@ -1008,12 +1008,14 @@
     if (hasPendingPlayTask() || playState() == PlayState::Running)
         return 0_s;
 
-    // If our current time is negative, we need to be scheduled to be resolved at the inverse
-    // of our current time, unless we fill backwards, in which case we want to invalidate as
-    // soon as possible.
-    auto localTime = currentTime().value();
-    if (localTime < 0_s)
-        return -localTime;
+    if (auto animationCurrentTime = currentTime()) {
+        // If our current time is negative, we need to be scheduled to be resolved at the inverse
+        // of our current time, unless we fill backwards, in which case we want to invalidate as
+        // soon as possible.
+        auto localTime = animationCurrentTime.value();
+        if (localTime < 0_s)
+            return -localTime;
+    }
 
     // In any other case, we're idle or already outside our active duration and have no need
     // to schedule an invalidation.
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to