bug 1257718 move comment to within the code path it describes r?padenot draft
authorKarl Tomlinson <karlt+@karlt.net>
Fri, 17 Jun 2016 03:29:40 +1200
changeset 380501 424d4733c67892a738ac696362faab75485066cd
parent 380354 51377a64158941f89ed73f388ae437cfa494c030
child 380502 920df23dda6244eb2579ea67dc4d4315991ce4ba
push id21234
push userktomlinson@mozilla.com
push dateWed, 22 Jun 2016 05:11:59 +0000
reviewerspadenot
bugs1257718
milestone50.0a1
bug 1257718 move comment to within the code path it describes r?padenot The comment was not necessarily true where it was previously positioned. MozReview-Commit-ID: FMYkGkmuvVS
dom/media/webaudio/AudioEventTimeline.h
--- a/dom/media/webaudio/AudioEventTimeline.h
+++ b/dom/media/webaudio/AudioEventTimeline.h
@@ -454,18 +454,18 @@ public:
 
         previous = next;
         next = &mEvents[lastEventId];
         if (aTime < mEvents[lastEventId].template Time<TimeType>()) {
           bailOut = true;
         }
       }
 
-      // The time was found in the list of events.
       if (!bailOut && lastEventId < mEvents.Length()) {
+        // The time matches one of the events exactly.
         MOZ_ASSERT(TimesEqual(aTime, mEvents[lastEventId].template Time<TimeType>()));
 
         // SetTarget nodes can be handled no matter what their next node is (if they have one)
         if (mEvents[lastEventId].mType == AudioTimelineEvent::SetTarget) {
           // Follow the curve, without regard to the next event, starting at
           // the last value of the last event.
           aBuffer[bufferIndex] = ExponentialApproach(mEvents[lastEventId].template Time<TimeType>(),
                                                   mLastComputedValue, mEvents[lastEventId].mValue,