Closed Bug 47041 Opened 24 years ago Closed 23 years ago

Unable to unregister an HTTP Notify listener

Categories

(Core :: Networking: HTTP, defect, P3)

x86
Windows NT
defect

Tracking

()

VERIFIED FIXED
mozilla0.9.4

People

(Reporter: toml, Assigned: darin.moz)

References

Details

(Keywords: memory-leak, perf)

Attachments

(2 files)

From Bugzilla Helper:
User-Agent: Mozilla/4.72 [en] (WinNT; U)
BuildID:    

The UnregisterModule function of nsNetModuleMgr.cpp does not unregister an HTTP 
Notify listener properly.  There are two problems related to this function, both 
of which exist within the nsNetModRegEntry.cpp Equals function:

1. The PL_strcmp should be compared to 0 since you want to process the 
unregister if the topics are identical.

2. Once the PL_strcmp succeeds, there is a comparison between aSyncProxy and 
mSyncProxy.  However, mSyncProxy is always 0 and the call to GetSyncProxy prior 
to this comparison creates an aSyncProxy and returns a non-zero address.  So, 
the aSyncProxy and mSyncProxy never succeeds.

Reproducible: Always
Steps to Reproduce:
1. Call the RegisterModule function of nsNetModuleMgr to register an HTTPNotify 
listener.
2. Call the UnregisterModule function of nsNetModuleMgr to unregsiter the 
HTTPNotify listener.  It won't get unregistered.

Actual Results:  The HTTPNotify listener is never unregistered and continues to 
receive notifications.  Since I register/unregister whenever I perform a load 
for a URI I end up with many, many copies of listeners getting called.  This 
causes increasing memory usage and slows the performance since all the 
HTTPNotify listeners have to be invoked.

Expected Results:  The HTTPNotify listener should have been unregistered.
Confirming for evaluation.

Gerv
Status: UNCONFIRMED → NEW
Ever confirmed: true
Tom are you blocked on this for anything critical? If not then we'd have to move 
this to future. 
Assignee: gagan → ruslan
Target Milestone: --- → Future
I'm not blocked in that I can still code and test and everything seems to work 
fine.  However, I don't know what the impact will be if extensive use of the 
browser was performed.  There could be literally hundreds of listeners 
registered that have to get called before the data could be passed on to the 
parser/layout engine.  This really needs to be fixed, but since the P3P support 
that I'm working on will most certainly not be part of the first Netscape 
product, it can wait.

Tom
Status: NEW → ASSIGNED
pulling in ruslan's necko bugs ->darin
Assignee: ruslan → gagan
Status: ASSIGNED → NEW
Target Milestone: Future → M19
http bugs to "Networking::HTTP"
Assignee: gagan → darin
Component: Networking → Networking: HTTP
Blocks: 62399
Target Milestone: --- → Future
Target Milestone: Future → mozilla1.0
Keywords: mlk, perf
Blocks: 96683
No longer blocks: 96683
not sure how this patch got lost... will try for 0.9.4
Status: NEW → ASSIGNED
Target Milestone: mozilla1.0 → mozilla0.9.4
r=bbaetz
sr= me.
Whiteboard: ready-to-land
fixed-on-trunk
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Whiteboard: ready-to-land → fixed-on-trunk
verified:

Win NT4 2001-09-24-05-0.9.4
Status: RESOLVED → VERIFIED
Whiteboard: fixed-on-trunk
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: