Closed Bug 839236 Opened 11 years ago Closed 11 years ago

Plugin Hang UI: Missing nsRefPtr in PluginModuleParent::GetPluginName

Categories

(Core Graveyard :: Plug-ins, defect)

x86_64
Windows 7
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla21

People

(Reporter: bugzilla, Assigned: bugzilla)

References

Details

Attachments

(1 file, 2 obsolete files)

While running my new unit tests in bug 826851, I found leakage due to a missing nsRefPtr.
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 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+
https://hg.mozilla.org/mozilla-central/rev/244daeec3393
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: