Sort out the manual addref done in the mediarecorder code

RESOLVED FIXED in mozilla34

Status

()

defect
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: Ehsan, Assigned: bechen)

Tracking

unspecified
mozilla34
x86
macOS
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

Follow-up to bug 1044598 comment 22.

Ben, are you interested in taking this please?  Thanks!  :-)
Flags: needinfo?(bechen)
Sorry for late response, I'll take it, thanks.
Assignee: nobody → bechen
Flags: needinfo?(bechen)
Posted patch bug-1047022.patch (obsolete) — Splinter Review
In order to remove the manaul addref for Session object, the patch change
|nsTArray<Session*> mSessions| to  |nsTArray<nsRefPtr<Session> > mSessions|.
Make a cycle reference between MediaRecorder and Session. The cycle will be break at DestroyRunnable() by calling BreakCycle(). And since the Session object now is really refcounted, we can destroyed it at any thread, not main thread only.
Attachment #8472134 - Flags: review?(roc)
r=roc
try server: https://tbpl.mozilla.org/?tree=Try&rev=ec246a5e4f28

I will re-trigger the mochitest-3 to ensure the patch passes all tests.
Attachment #8472134 - Attachment is obsolete: true
Attachment #8474339 - Flags: review+
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/53c7fcb7ead9
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
You need to log in before you can comment on or make changes to this bug.