Title: [267413] trunk
Revision
267413
Author
[email protected]
Date
2020-09-22 09:29:35 -0700 (Tue, 22 Sep 2020)

Log Message

webaudio/AudioParam/audioparam-setTarget-timeConstant-0.html is crashing
https://bugs.webkit.org/show_bug.cgi?id=216824

Reviewed by Darin Adler.

Source/WebCore:

If the time constant pass to AudioParam.setTargetAtTime() is 0, then insert a SetValue event in
the timeline instead of a SetTarget one, causing us to instantly jump to the target value. This
matches the Blink behavior.

No new tests, unskipped existing test.

* Modules/webaudio/AudioParamTimeline.cpp:
(WebCore::AudioParamTimeline::setTargetAtTime):

LayoutTests:

Unskip test that is passing and no longer crashing.

* TestExpectations:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (267412 => 267413)


--- trunk/LayoutTests/ChangeLog	2020-09-22 16:22:33 UTC (rev 267412)
+++ trunk/LayoutTests/ChangeLog	2020-09-22 16:29:35 UTC (rev 267413)
@@ -1,3 +1,14 @@
+2020-09-22  Chris Dumez  <[email protected]>
+
+        webaudio/AudioParam/audioparam-setTarget-timeConstant-0.html is crashing
+        https://bugs.webkit.org/show_bug.cgi?id=216824
+
+        Reviewed by Darin Adler.
+
+        Unskip test that is passing and no longer crashing.
+
+        * TestExpectations:
+
 2020-09-22  Lauro Moura  <[email protected]>
 
         [GTK] Mark compositing/video/video-update-rendering.html as flaky crash

Modified: trunk/LayoutTests/TestExpectations (267412 => 267413)


--- trunk/LayoutTests/TestExpectations	2020-09-22 16:22:33 UTC (rev 267412)
+++ trunk/LayoutTests/TestExpectations	2020-09-22 16:29:35 UTC (rev 267413)
@@ -334,7 +334,6 @@
 
 # This WebAudio test is crashing in debug since its import from Blink.
 [ Debug ] webaudio/AudioBufferSource/audiobuffersource-playbackrate.html [ Crash ]
-[ Debug ] webaudio/AudioParam/audioparam-setTarget-timeConstant-0.html [ Crash ]
 
 webkit.org/b/176929 imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/ready-states/autoplay-with-slow-text-tracks.html [ Pass Failure ]
 

Modified: trunk/Source/WebCore/ChangeLog (267412 => 267413)


--- trunk/Source/WebCore/ChangeLog	2020-09-22 16:22:33 UTC (rev 267412)
+++ trunk/Source/WebCore/ChangeLog	2020-09-22 16:29:35 UTC (rev 267413)
@@ -1,3 +1,19 @@
+2020-09-22  Chris Dumez  <[email protected]>
+
+        webaudio/AudioParam/audioparam-setTarget-timeConstant-0.html is crashing
+        https://bugs.webkit.org/show_bug.cgi?id=216824
+
+        Reviewed by Darin Adler.
+
+        If the time constant pass to AudioParam.setTargetAtTime() is 0, then insert a SetValue event in
+        the timeline instead of a SetTarget one, causing us to instantly jump to the target value. This
+        matches the Blink behavior.
+
+        No new tests, unskipped existing test.
+
+        * Modules/webaudio/AudioParamTimeline.cpp:
+        (WebCore::AudioParamTimeline::setTargetAtTime):
+
 2020-09-22  Brian Burg  <[email protected]>
 
         [Cocoa] _WKInspectorDelegate should handle showing external resources

Modified: trunk/Source/WebCore/Modules/webaudio/AudioParamTimeline.cpp (267412 => 267413)


--- trunk/Source/WebCore/Modules/webaudio/AudioParamTimeline.cpp	2020-09-22 16:22:33 UTC (rev 267412)
+++ trunk/Source/WebCore/Modules/webaudio/AudioParamTimeline.cpp	2020-09-22 16:29:35 UTC (rev 267413)
@@ -94,6 +94,9 @@
 ExceptionOr<void> AudioParamTimeline::setTargetAtTime(float target, Seconds time, float timeConstant)
 {
     auto locker = holdLock(m_eventsMutex);
+    // If timeConstant is 0, we instantly jump to the target value, so insert a SetValueEvent instead of SetTargetEvent.
+    if (!timeConstant)
+        return insertEvent(ParamEvent::createSetValueEvent(target, time));
     return insertEvent(ParamEvent::createSetTargetEvent(target, time, timeConstant));
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to