Unreviewed, rolling out r210680.
authorryanhaddad@apple.com <ryanhaddad@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 13 Jan 2017 01:42:59 +0000 (01:42 +0000)
committerryanhaddad@apple.com <ryanhaddad@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 13 Jan 2017 01:42:59 +0000 (01:42 +0000)
This change caused LayoutTest timeouts and assertion failures.

Reverted changeset:

"Use GenericEventQueue rather than callOnMainThread to
schedule events in AudioScheduledSourceNode."
https://bugs.webkit.org/show_bug.cgi?id=166983
http://trac.webkit.org/changeset/210680

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@210692 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/Modules/webaudio/AudioScheduledSourceNode.cpp
Source/WebCore/Modules/webaudio/AudioScheduledSourceNode.h

index e899ae6..be5bfdf 100644 (file)
@@ -1,3 +1,16 @@
+2017-01-12  Ryan Haddad  <ryanhaddad@apple.com>
+
+        Unreviewed, rolling out r210680.
+
+        This change caused LayoutTest timeouts and assertion failures.
+
+        Reverted changeset:
+
+        "Use GenericEventQueue rather than callOnMainThread to
+        schedule events in AudioScheduledSourceNode."
+        https://bugs.webkit.org/show_bug.cgi?id=166983
+        http://trac.webkit.org/changeset/210680
+
 2017-01-12  Chris Dumez  <cdumez@apple.com>
 
         [iOS] HTML form validation popover sometimes does not go away
index f4c54d0..7566aa2 100644 (file)
@@ -47,7 +47,6 @@ const double AudioScheduledSourceNode::UnknownTime = -1;
 AudioScheduledSourceNode::AudioScheduledSourceNode(AudioContext& context, float sampleRate)
     : AudioNode(context, sampleRate)
     , m_endTime(UnknownTime)
-    , m_eventQueue(*this)
 {
 }
 
@@ -167,8 +166,11 @@ void AudioScheduledSourceNode::finish()
         context().decrementActiveSourceCount();
     }
 
-    if (m_hasEndedListener)
-        m_eventQueue.enqueueEvent(Event::create(eventNames().endedEvent, false, false));
+    if (m_hasEndedListener) {
+        callOnMainThread([this] {
+            dispatchEvent(Event::create(eventNames().endedEvent, false, false));
+        });
+    }
 }
 
 bool AudioScheduledSourceNode::addEventListener(const AtomicString& eventType, Ref<EventListener>&& listener, const AddEventListenerOptions& options)
index 59ab915..f6a1b2c 100644 (file)
@@ -29,7 +29,6 @@
 #pragma once
 
 #include "AudioNode.h"
-#include "GenericEventQueue.h"
 
 namespace WebCore {
 
@@ -84,7 +83,6 @@ protected:
     double m_endTime; // in seconds
 
     bool m_hasEndedListener { false };
-    GenericEventQueue m_eventQueue;
 
     static const double UnknownTime;