Closed Bug 1416643 Opened 2 years ago Closed 2 years ago

Rework bug 712836

Categories

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

58 Branch
enhancement

Tracking

()

RESOLVED FIXED
mozilla59
Tracking Status
firefox58 --- wontfix
firefox59 --- fixed

People

(Reporter: jwwang, Assigned: jwwang)

References

Details

Attachments

(2 files)

We want to run MediaCacheStream::NotifyDataEnded() off the main thread. However, modifying mResourceID/mDidNotifyDataEnded/mNotifyDataEndedStatus in NotifyDataEnded() is getting in our way for they are main thread only members.
Assignee: nobody → jwwang
Blocks: 1369263
Depends on: 712836
Priority: -- → P3
Attachment #8928793 - Flags: review?(bechen)
Attachment #8928794 - Flags: review?(bechen)
Comment on attachment 8928793 [details]
Bug 1416643. P1 - remove checks for mDidNotifyDataEnded/mNotifyDataEndedStatus from IsAvailableForSharing().

https://reviewboard.mozilla.org/r/200064/#review205204
Attachment #8928793 - Flags: review?(bechen) → review+
Comment on attachment 8928794 [details]
Bug 1416643. P2 - always access mDidNotifyDataEnded within the lock.

https://reviewboard.mozilla.org/r/200066/#review205206
Attachment #8928794 - Flags: review?(bechen) → review+
Thanks!

It is worth noting that when mDidNotifyDataEnded/mNotifyDataEndedStatus are modified off the main thread, the result of IsAvailableForSharing() becomes a changing value over time on the main thread. 2 consecutive IsAvailableForSharing() calls on the main thread might return different results.

Even though InitAsClone() is called only after IsAvailableForSharing() returns true, the assertion of MOZ_ASSERT(aOriginal->IsAvailableForSharing()) might still fail for the reason above.

So we need to remove checks for mDidNotifyDataEnded/mNotifyDataEndedStatus from IsAvailableForSharing().
Attachment #8928793 - Flags: review?(gsquelart)
Attachment #8928794 - Flags: review?(gsquelart)
Comment on attachment 8928793 [details]
Bug 1416643. P1 - remove checks for mDidNotifyDataEnded/mNotifyDataEndedStatus from IsAvailableForSharing().

https://reviewboard.mozilla.org/r/200064/#review205210
Attachment #8928793 - Flags: review?(gsquelart) → review+
Comment on attachment 8928794 [details]
Bug 1416643. P2 - always access mDidNotifyDataEnded within the lock.

https://reviewboard.mozilla.org/r/200066/#review205212
Attachment #8928794 - Flags: review?(gsquelart) → review+
Thanks for the reviews!
Pushed by jwwang@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/daaf6edb12f7
P1 - remove checks for mDidNotifyDataEnded/mNotifyDataEndedStatus from IsAvailableForSharing(). r=bechen,gerald
https://hg.mozilla.org/integration/autoland/rev/90cd780b0923
P2 - always access mDidNotifyDataEnded within the lock. r=bechen,gerald
https://hg.mozilla.org/mozilla-central/rev/daaf6edb12f7
https://hg.mozilla.org/mozilla-central/rev/90cd780b0923
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
You need to log in before you can comment on or make changes to this bug.