If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

leaks in nsJSInstallTriggerGlobal.cpp

RESOLVED WORKSFORME

Status

Core Graveyard
Installer: XPInstall Engine
RESOLVED WORKSFORME
17 years ago
2 years ago

People

(Reporter: dbaron, Assigned: Syd Logan)

Tracking

({mlk})

Trunk
Future
x86
Linux

Firefox Tracking Flags

(Not tracked)

Details

In nsJSInstallTriggerGlobal.cpp there are 3 occurrences of the line:

nsCOMPtr<nsIScriptGlobalObject> globalObject = scriptContext->GetGlobalObject();

which is an automatic leak and should probably be replaced by

nsCOMPtr<nsIScriptGlobalObject>
globalObject(dont_AddRef(scriptContext->GetGlobalObject()));

See bug 76091 for a similar problem.
Keywords: mlk
Hmm, looks like a common problem. If this is the case then aren't all the 
"nsIScriptGlobalObject *global = aContext->GetGlobalObject()" places leaks 
also? More leaks than not shown by

http://lxr.mozilla.org/seamonkey/search?string=-%3EGetGlobalObject
On closer inspection many of those spots do a manual release, but there are 
still several other nsCOMPtr<> uses.
The only other ones that look like leaks were the ones in nsCrypto.cpp (which is
now obsolete, I think) and in oji (lcglue.cpp and nsCSecurityContext.cpp).  I
filed bug 76144 on the OJI ones, and I'll hope psm-glue will just go away.

Updated

16 years ago
Blocks: 92580

Updated

16 years ago
No longer blocks: 92580
(Assignee)

Updated

16 years ago
Target Milestone: --- → M1
(Assignee)

Updated

16 years ago
Target Milestone: M1 → Future
QA Contact: jimmykenlee → xpi-engine
Remove the code is one way to fix the bug.
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → WORKSFORME
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.