Closed Bug 225826 Opened 21 years ago Closed 21 years ago

We request a new nsIObserverService for every window opened

Categories

(Core Graveyard :: Embedding: APIs, defect, P3)

x86
Linux
defect

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: caillon, Assigned: caillon)

Details

Attachments

(1 obsolete file)

nsWindowWatcher::AddWindow() is the culprit. /me has a fix.
Attachment #135595 - Flags: superreview?(jst)
Attachment #135595 - Flags: review?(danm-moz)
Comment on attachment 135595 [details] [diff] [review] Cache the observer service on the window watcher - In nsWindowWatcher.h: +class nsIObserverService; ... + nsCOMPtr<nsIObserverService> mObserverService; Is a forward declaration enough when using nsCOMPtr's now? Don't you need to #include nsIObserverService.h for this to work on all platforms? sr=jst
Attachment #135595 - Flags: superreview?(jst) → superreview+
Johnny, the ability to forward declare was re-introduced this summer (bug 107291) so it should be enough.
Status: NEW → ASSIGNED
Oh, awesome! I didn't see that change go by...
'scool. While you're in there, why not replace the "include nsIWindowCreator.h" line with a forward declaration, too. It compiles. nsWindowCreator.h is included by only two files and them that needs nsIWindowCreator already include it separately. One more worry, though. What about the pseudo-leak caused by two services strong-refing each other? Sometimes we worry about that and sometimes we don't. Maybe you guys know the most current dogma.
Actually this one isn't circular, it's just one service refing another. Still a potential problem, though. I'm dogma curious.
Is this patch still relevant? It has sr but is waiting r from danm?
Priority: -- → P3
waiting for an answer to the question posed in comment 5
Probably should add an observer for xpcom shutdown then. But after thinking about it, this probably doesn't gain us too much, so marking wontfix.
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → WONTFIX
Attachment #135595 - Attachment is obsolete: true
Attachment #135595 - Flags: superreview+
Attachment #135595 - Flags: review?(danm-moz)
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: