nsFontPackageService does not release a listener implementing nsIFontPackageHandler ?

RESOLVED INVALID

Status

()

Core
Embedding: APIs
RESOLVED INVALID
17 years ago
16 years ago

People

(Reporter: Hansoo Kim, Assigned: Roy Yokoyama)

Tracking

({embed, intl})

Trunk
mozilla0.9.2
x86
All
embed, intl
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

17 years ago
A listener to nsFontPackageService does not get released when an embedder
exits out.

Step to reproduce :
1) Implement a class exposing nsIFontPackageHandler interface.
2) When app starts up, hook it up to nsFontPackageService in such a way
   that only ref cnt on the object is from nsFontPackageService.
3) Make sure the listener gets a notification by going into web site which
   needs a font not installed in your system.
   (  Currently only supports Korean, Japanese, and Chinese. )
4) Exit out of app, and test if the destructor of the object is called or not.
(Reporter)

Updated

17 years ago
Keywords: embed, intl

Comment 1

17 years ago
The nsFontPackageService stores the handler in a smart pointer so it should 
always release the handler when it is destroyed. See:

http://lxr.mozilla.org/seamonkey/source/intl/locale/src/nsFontPackageService.h#2
9

So that means:

a) The nsFontPackageService is not being destroyed itself (so it won't release 
the handler), either because someone still holds a reference to it or the 
services are not being destroyed.
b) Your handler has an extra refcount on it.

Would you be able to test for a) by putting a breakpoint on its destructor and 
for b) by checked the refcount on your object before and after setting the 
handler on the font package service?
(Assignee)

Comment 2

17 years ago
Here is the test on Mozilla
a) by putting a breakpoint on its destructor
     I put breakpoints on constructor and destructor of both 
     nsFontPackageService and nsFontPackageHandler and verified
     that the destructors are getting called on respective objects.

b) by checked the refcount on your object before and after setting 
   the handler on the font package service?
     mRefCnt of nsFontPackageHandler was 1.

adam : Please assign this bug to me. I have been reviewing Hansoo's code
and I am familiar with his implementation.

Comment 3

17 years ago
Reassigning
Assignee: adamlock → yokoyama
Status: UNCONFIRMED → NEW
Ever confirmed: true
(Assignee)

Updated

17 years ago
Status: NEW → ASSIGNED
(Assignee)

Updated

16 years ago
Target Milestone: --- → mozilla0.9.2
(Assignee)

Comment 4

16 years ago
hansoo: any progress from my last suggestion on your code?

Comment 5

16 years ago
hansoodev@yahoo.com
I think this is an invalid bug. Please talk to yokoyama in private email about 
your code. 
Status: ASSIGNED → RESOLVED
Last Resolved: 16 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.