Closed Bug 1094436 Opened 10 years ago Closed 10 years ago

SpeechRecognition::GetUserMediaSuccessCallback::OnSuccess leaks the argument stream

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla36

People

(Reporter: bzbarsky, Assigned: aosmond)

References

Details

Attachments

(1 file)

Like so:

  DOMLocalMediaStream *localStream = nullptr;
  nsresult rv = CallQueryInterface(aStream, &localStream);

no localStream is holding a ref if the QI succeeded, and the ref is never released.

Please nominate this for blocking the relevant gecko releases.
This code isn't enabled by default, so shouldn't block anything.
rjesup: Should be functionally identical to the patch in bug 994912 but but I figured out how to avoid the cast digging into our mailing list history :).
Attachment #8518154 - Flags: review?(rjesup)
try: https://treeherder.mozilla.org/ui/#/jobs?repo=try&revision=e581cbe0d719
Comment on attachment 8518154 [details] [diff] [review]
bug1094436.patch, v1

Review of attachment 8518154 [details] [diff] [review]:
-----------------------------------------------------------------

r+

Andre: does this work for you?

In any case, this is far more correct, so let's get it in
Attachment #8518154 - Flags: review?(rjesup) → review+
(In reply to Randell Jesup [:jesup] from comment #4)
> Comment on attachment 8518154 [details] [diff] [review]
> bug1094436.patch, v1
> 
> Review of attachment 8518154 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> r+
> 
> Andre: does this work for you?
> 
> In any case, this is far more correct, so let's get it in

Yes Randell, this works
re-try: https://treeherder.mozilla.org/ui/#/jobs?repo=try&revision=93cae3c9a278
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/133c7c11ec7f
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: