Closed Bug 1412205 Opened 2 years ago Closed 2 years ago

MediaCacheStream::Read() should update mStreamOffset before releasing the monitor

Categories

(Core :: Audio/Video: Playback, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla58
Tracking Status
firefox58 --- fixed

People

(Reporter: jwwang, Assigned: jwwang)

References

Details

Attachments

(1 file)

MediaCache::Update() depends on mStreamOffset to make decision whether to read streams or not. It is import to update mStreamOffset before releasing the monitor so Update() won't make wrong decisions based on the stale value.
Assignee: nobody → jwwang
Blocks: 1369263
Priority: -- → P3
Attachment #8924108 - Flags: review?(gsquelart)
Comment on attachment 8924108 [details]
Bug 1412205 - MediaCacheStream::Read() should update mStreamOffset before releasing the monitor.

https://reviewboard.mozilla.org/r/195336/#review200404

::: dom/media/MediaCache.cpp:2505
(Diff revision 1)
>          count = bytes;
>          break;
>        }
>  
> +      if (mStreamOffset != streamOffset) {
> +        // mStreamOffset is changed while we drop the lock. We need to run

The first sentence confused me. Do you mean "Update mStreamOffset before we drop the lock"?
Attachment #8924108 - Flags: review?(gsquelart) → review+
Thanks! The comment is fixed.
Pushed by jwwang@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/010c85dae2c7
MediaCacheStream::Read() should update mStreamOffset before releasing the monitor. r=gerald
https://hg.mozilla.org/mozilla-central/rev/010c85dae2c7
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
You need to log in before you can comment on or make changes to this bug.