Closed Bug 1550737 Opened 6 years ago Closed 6 years ago

Follow up comments on RDD shutdown async patch

Categories

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

66 Branch
enhancement

Tracking

()

RESOLVED FIXED
mozilla68
Tracking Status
firefox68 --- fixed

People

(Reporter: achronop, Assigned: achronop)

References

Details

Attachments

(2 files)

This implement some comments provided after landing on Bug 1545416.

Instead of deleteing a RefPtr directly copy it in a local variable in order to ensure that the pointer will be alive till the end of the method. In addition to that, on RemoteMediaDataDecpder::Shutdown promise use a reference of the child object instead of the whole self object since this is the only one needed. Finally, one style change.

I am getting some try failures on this. The problem I am observing is that the promise returned from RemoteMediaDataDecoder::Shutdown can be resolved before the promise returned RemoteMediaDataDecoder::Init when the call to RMDD::Shutdown is right after RMDD::Init.

When RemoteMediaDataDecoder::Shutdown is finished it is not necessary to hold a reference of the self any more. Keep the mChild alive, which is the only one needed to destroy the IPDL. In addition to that, deleting the IPDL and destroying the child will be happening at the task queue similar to what was happening before Bug 1545416.

Attachment #9064028 - Attachment description: Bug 1550737 - Make sure pointer is alive till the end of the method. r?jya → Bug 1550737 - Make sure we keed strong reference until the end of the method. r?jya
Attachment #9064028 - Attachment description: Bug 1550737 - Make sure we keed strong reference until the end of the method. r?jya → Bug 1550737 - Make sure we keed strong reference until the end of the method. r?jya.
Pushed by achronopoulos@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d4bbc018fe90 Make sure we keed strong reference until the end of the method. r=jya. https://hg.mozilla.org/integration/autoland/rev/5ba6d20ec80a When shutdown is finished use only a reference of the child. r=jya
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: