Commit c6e4c8ed authored by Randell Jesup's avatar Randell Jesup
Browse files

Bug 1207753 - dom/media webm thread-safety annotations r=kinetik

parent cbc20fad
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -413,7 +413,10 @@ void WebMBufferedState::NotifyDataArrived(const unsigned char* aBuffer,
    }
  }

  // thread-safety gets annoyed at pass-by-reference of a locked value
  PUSH_IGNORE_THREAD_SAFETY
  mRangeParsers[idx].Append(aBuffer, aLength, mTimeMapping, mReentrantMonitor);
  POP_THREAD_SAFETY

  // Merge parsers with overlapping regions and clean up the remnants.
  uint32_t i = 0;
+3 −3
Original line number Diff line number Diff line
@@ -298,13 +298,13 @@ class WebMBufferedState final {
  MOZ_COUNTED_DTOR(WebMBufferedState)

  // Synchronizes access to the mTimeMapping array and mLastBlockOffset.
  ReentrantMonitor mReentrantMonitor MOZ_UNANNOTATED;
  ReentrantMonitor mReentrantMonitor;

  // Sorted (by offset) map of data offsets to timecodes.  Populated
  // on the main thread as data is received and parsed by WebMBufferedParsers.
  nsTArray<WebMTimeDataOffset> mTimeMapping;
  nsTArray<WebMTimeDataOffset> mTimeMapping GUARDED_BY(mReentrantMonitor);
  // The last complete block parsed. -1 if not set.
  int64_t mLastBlockOffset;
  int64_t mLastBlockOffset GUARDED_BY(mReentrantMonitor);

  // Sorted (by offset) live parser instances.  Main thread only.
  nsTArray<WebMBufferedParser> mRangeParsers;