Closed Bug 1573102 Opened 5 years ago Closed 5 years ago

Remove MediaStreamGraph strong-refs

Categories

(Core :: Audio/Video: MediaStreamGraph, task, P2)

task

Tracking

()

RESOLVED FIXED
mozilla70
Tracking Status
firefox70 --- fixed

People

(Reporter: pehrsons, Assigned: pehrsons)

References

Details

Attachments

(4 files)

MediaStreamGraphImpl is ref-counted because it has to be, but its lifetime is supposed to be controlled by the MediaStreams it contains.

Yet we have seen an increasing number of RefPtr<MediaStreamGraphImpl>, because a graph can be hard to get hold of.

This leads to problems, typically streams being added to a graph while it's in the process of shutting down - problems that are more visible after bug 1493613 as graphs now have a more limited lifetime.

This bug aims to remove most, if not all, RefPtr<MediaStreamGraphImpl>, so the graph can be referenced as intended.

Blocks: 1573799

Removing all strong-refs was not really viable. The ones in GraphDriver, and MediaStreamGraphImpl::DeviceChanged, are staying.

To accomodate this, MediaStreamTrackListener::NotifyEnded/Removed get an
additional aGraph argument. NotifyEnabledStateChanged is getting it too, for
completion.

Depends on D43666

Blocks: 1577495
Pushed by pehrsons@gmail.com: https://hg.mozilla.org/integration/autoland/rev/f61dd73cac3a Remove mGraph from HTMLMediaElement::MediaStreamRenderer. r=karlt https://hg.mozilla.org/integration/autoland/rev/85ef72ebde43 Remove mGraph from HTMLMediaElement::OutputMediaStream and OutputStreamManager. r=karlt https://hg.mozilla.org/integration/autoland/rev/c9807cc45067 Remove mGraph from MediaStreamTrack::MSGListener. r=karlt https://hg.mozilla.org/integration/autoland/rev/08faaf9d4ef7 Remove MediaStreamGraphImpl strong-refs from MediaEngineWebRTCAudio. r=karlt
Regressions: 1577734
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: