leaks in lcglue.cpp and nsCSecurityContext.cpp

VERIFIED FIXED

Status

Core Graveyard
Java: OJI
VERIFIED FIXED
17 years ago
8 years ago

People

(Reporter: dbaron, Assigned: edburns)

Tracking

({memory-leak})

Trunk
memory-leak

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [oji_working])

Attachments

(1 attachment)

(Reporter)

Description

17 years ago
In modules/oji/src/lcglue.cpp and nsCSecurityContext.cpp, there are lines of the
form:

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

This is an automatic leak.  It should be replaced with

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

See bug 76114 and bug 76091 for similar problems.
(Reporter)

Updated

17 years ago
Keywords: mlk
(Assignee)

Comment 1

17 years ago
Created attachment 31114 [details] [diff] [review]
cvs diff -u of fix for this bug.
(Assignee)

Comment 2

17 years ago
This builds ok on Win32 and linux with today's trunk.  When the build 
completes, I'll test.
Status: NEW → ASSIGNED
(Assignee)

Updated

17 years ago
Whiteboard: [oji_working]
(Reporter)

Comment 3

17 years ago
r=dbaron, assuming you'll test it appropriately.
(Assignee)

Comment 4

17 years ago
I've tested this on win32 and Linux.  It works.
(Assignee)

Comment 5

17 years ago
ra=edburns for OJI module.

Comment 6

17 years ago
sr=waterson
(Assignee)

Comment 7

17 years ago
Builds on win32, Solaris, and Linux.
(Assignee)

Comment 8

17 years ago
Fix checked in.
(Assignee)

Comment 9

17 years ago
fix checked in.
Status: ASSIGNED → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → FIXED

Comment 10

17 years ago
qa->pmac
QA Contact: shrir → pmac

Comment 11

17 years ago
Verified the patches.
Status: RESOLVED → VERIFIED

Updated

8 years ago
Component: Java: OJI → Java: OJI
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.