Bug 1503950 insert new timeline events after existing events at the same time even when of the same type r=padenot a=jcristau
authorKarl Tomlinson <karlt+@karlt.net>
Mon, 05 Nov 2018 12:25:04 +0000
changeset 501163 42b57103a046eea029cf9f8b6d80f694ce84c469
parent 501162 a106808198a6b0eac935d7bf9cecc3fb9d5a975a
child 501164 a691b474af0cac5d467179f06a9f07c37a3eba44
push id1864
push userffxbld-merge
push dateMon, 03 Dec 2018 15:51:40 +0000
treeherdermozilla-release@f040763d99ad [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspadenot, jcristau
bugs1503950
milestone64.0
Bug 1503950 insert new timeline events after existing events at the same time even when of the same type r=padenot a=jcristau Depends on D10861 Differential Revision: https://phabricator.services.mozilla.com/D10862
dom/media/webaudio/AudioEventTimeline.h
--- a/dom/media/webaudio/AudioEventTimeline.h
+++ b/dom/media/webaudio/AudioEventTimeline.h
@@ -209,17 +209,17 @@ public:
   void InsertEvent(const AudioTimelineEvent& aEvent)
   {
     for (unsigned i = 0; i < mEvents.Length(); ++i) {
       if (aEvent.Time<TimeType>() == mEvents[i].Time<TimeType>()) {
         // If two events happen at the same time, have them in chronological
         // order of insertion.
         do {
           ++i;
-        } while (i < mEvents.Length() && aEvent.mType != mEvents[i].mType &&
+        } while (i < mEvents.Length() &&
                  aEvent.Time<TimeType>() == mEvents[i].Time<TimeType>());
         mEvents.InsertElementAt(i, aEvent);
         return;
       }
       // Otherwise, place the event right after the latest existing event
       if (aEvent.Time<TimeType>() < mEvents[i].Time<TimeType>()) {
         mEvents.InsertElementAt(i, aEvent);
         return;