Closed Bug 1395855 Opened 7 years ago Closed 7 years ago

Data race in accessing mOffset in ChannelMediaResource::CopySegmentToCache()

Categories

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

enhancement

Tracking

()

RESOLVED FIXED
mozilla57
Tracking Status
firefox57 --- fixed

People

(Reporter: jwwang, Assigned: jwwang)

References

Details

Attachments

(2 files)

mOffset is a main thread only member but ChannelMediaResource::CopySegmentToCache() will run off the main thread when OMT data delivery is enabled.
Since most accesses to mOffset happen on the main thread, we will dispatch a task to update mOffset on the main thread in ChannelMediaResource::CopySegmentToCache().
It turns out that we can just remove the member to avoid the data race.
Attachment #8906518 - Flags: review?(cpearce)
Attachment #8906519 - Flags: review?(cpearce)
Comment on attachment 8906518 [details]
Bug 1395855. P1 - remove ChannelMediaResource::mOffset so we have less data race to worry about.

https://reviewboard.mozilla.org/r/178272/#review183536
Attachment #8906518 - Flags: review?(cpearce) → review+
Comment on attachment 8906519 [details]
Bug 1395855. P2 - store the offset of range request.

https://reviewboard.mozilla.org/r/178274/#review183538
Attachment #8906519 - Flags: review?(cpearce) → review+
Thanks!
Pushed by jwwang@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/803f854237c1
P1 - remove ChannelMediaResource::mOffset so we have less data race to worry about. r=cpearce
https://hg.mozilla.org/integration/autoland/rev/951c770131ae
P2 - store the offset of range request. r=cpearce
Blocks: 1428688
No longer blocks: 1428688
You need to log in before you can comment on or make changes to this bug.