Plugin Hang UI: Missing nsRefPtr in PluginModuleParent::GetPluginName

RESOLVED FIXED in mozilla21

Status

()

Core
Plug-ins
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: aklotz, Assigned: aklotz)

Tracking

unspecified
mozilla21
x86_64
Windows 7
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 2 obsolete attachments)

(Assignee)

Description

5 years ago
While running my new unit tests in bug 826851, I found leakage due to a missing nsRefPtr.
(Assignee)

Comment 1

5 years ago
Created attachment 711487 [details] [diff] [review]
Adds missing nsRefPtr to nsPluginHost::GetInst call
Attachment #711487 - Flags: review?(benjamin)
(Assignee)

Comment 2

5 years ago
Created attachment 711488 [details] [diff] [review]
Adds missing nsRefPtr to nsPluginHost::GetInst call  Rev. 2

Rev 2, removes some extra stuff that shouldn't have been in there
Attachment #711487 - Attachment is obsolete: true
Attachment #711487 - Flags: review?(benjamin)
Attachment #711488 - Flags: review?(benjamin)
Comment on attachment 711488 [details] [diff] [review]
Adds missing nsRefPtr to nsPluginHost::GetInst call  Rev. 2

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

::: dom/plugins/ipc/PluginModuleParent.cpp
@@ +533,5 @@
>  bool
>  PluginModuleParent::GetPluginName(nsAString& aPluginName)
>  {
> +    nsRefPtr<nsPluginHost> host = 
> +        already_AddRefed<nsPluginHost>(nsPluginHost::GetInst());

You could use |dont_AddRef(nsPluginHost::GetInst())| here instead.

Comment 4

5 years ago
Comment on attachment 711488 [details] [diff] [review]
Adds missing nsRefPtr to nsPluginHost::GetInst call  Rev. 2

Yeah, use dont_AddRef here. r=me with that
Attachment #711488 - Flags: review?(benjamin) → review+
(Assignee)

Comment 5

5 years ago
Created attachment 712655 [details] [diff] [review]
Adds missing nsRefPtr to nsPluginHost::GetInst call Rev. 3

Carrying forward r+
Try build is https://tbpl.mozilla.org/?tree=Try&rev=a49d1a6c54f6
Attachment #711488 - Attachment is obsolete: true
Attachment #712655 - Flags: review+
(Assignee)

Updated

5 years ago
Keywords: checkin-needed

Comment 7

5 years ago
https://hg.mozilla.org/mozilla-central/rev/244daeec3393
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
You need to log in before you can comment on or make changes to this bug.