Bug 1503950 insert new timeline events after existing events at the same time even when of the same type r=padenot
authorKarl Tomlinson <karlt+@karlt.net>
Mon, 05 Nov 2018 12:25:04 +0000
changeset 444480 ca875dd78b3c1d9999fa7f6704f975d0dbbc2d3d
parent 444479 bf705d04c328085c490e5a9f111b9143123b3cc9
child 444481 d0a2f61e2d9916a5888a1798833e0439d9deea5e
push id34996
push userrgurzau@mozilla.com
push dateTue, 06 Nov 2018 09:53:23 +0000
treeherdermozilla-central@e160f0a60e4f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspadenot
bugs1503950
milestone65.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1503950 insert new timeline events after existing events at the same time even when of the same type r=padenot 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;