Closed
Bug 341161
Opened 18 years ago
Closed 17 years ago
nsXPInstallManager doesnt shutdown correctly.
Categories
(Core Graveyard :: Installer: XPInstall Engine, defect)
Core Graveyard
Installer: XPInstall Engine
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla1.8.1beta2
People
(Reporter: mossop, Assigned: mossop)
References
Details
(Keywords: fixed1.8.1, memory-leak)
Attachments
(2 files, 1 obsolete file)
2.86 KB,
patch
|
mossop
:
review+
mossop
:
superreview+
|
Details | Diff | Splinter Review |
3.04 KB,
patch
|
mossop
:
review+
mossop
:
superreview+
darin.moz
:
approval1.8.1+
|
Details | Diff | Splinter Review |
If an nsIXPInstallManager is created and inited through xpcom then it will fail to shutdown correctly and stop observing the xpinstall-progress topic.
Assignee | ||
Comment 1•18 years ago
|
||
When creating an instance of nsIXPInstallManager and calling either of the init methods available through xpcom, mNeedsShutdown is never set to true. This means that when the manager shutsdown it actually skips all of the shutdown in particular it doesn't attempt to stop observing the xpinstall-progress topic and so can start doing strange things when a new extension installation starts. This patch sets mNeedsShutdown to true and also calls shutdown in the places where the initialisation fails.
Assignee: xpi-engine → mossop.bugzilla
Status: NEW → ASSIGNED
Attachment #225192 -
Flags: superreview?(dveditz)
Attachment #225192 -
Flags: review?(dveditz)
Assignee | ||
Comment 2•18 years ago
|
||
Since the manager addrefs itself in the constructor and then doesn't release itself again unless properly shutdown I guess this is going to be a memory leak.
Keywords: mlk
Updated•18 years ago
|
Flags: blocking1.8.1? → blocking1.8.1+
Comment 4•18 years ago
|
||
dveditz, can you please review this ASAP? Pretty major user impact here ...
Target Milestone: --- → mozilla1.8.1beta1
Updated•18 years ago
|
Target Milestone: mozilla1.8.1beta1 → mozilla1.8.1beta2
Comment 5•17 years ago
|
||
Comment on attachment 225192 [details] [diff] [review] Set mNeedsShutdown in init >- return Observe(aListener, XPI_PROGRESS_TOPIC, NS_LITERAL_STRING("open").get()); >+ rv = Observe(aListener, XPI_PROGRESS_TOPIC, NS_LITERAL_STRING("open").get()); >+ if (NS_FAILED(rv)) >+ Shutdown(); >+ return rv; My only worry here is that Observe might return a failure while also calling DownloadNext() -- that might lead to crashes, too. XPInstall is perfectly happy without a dialog to update so calling DownloadNext() even if we can't get a proxy to the dialog is OK -- but now you probably don't want that to return a failure and trigger a shutdown. r/sr=dveditz **IFF** you change nsXPInstallManager::Observe() to not set rv on the rv = pmgr->GetProxyForObject(... dlg ...)
Attachment #225192 -
Flags: superreview?(dveditz)
Attachment #225192 -
Flags: superreview+
Attachment #225192 -
Flags: review?(dveditz)
Attachment #225192 -
Flags: review+
Assignee | ||
Comment 6•17 years ago
|
||
Made the suggested change, carrying over r/sr.
Attachment #225192 -
Attachment is obsolete: true
Attachment #229697 -
Flags: superreview+
Attachment #229697 -
Flags: review+
Assignee | ||
Updated•17 years ago
|
Whiteboard: [checkin needed]
Comment 7•17 years ago
|
||
mozilla/xpinstall/src/nsXPInstallManager.cpp 1.146
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Whiteboard: [checkin needed]
Assignee | ||
Comment 8•17 years ago
|
||
This is exactly the same fix ported to the branch. The differences are caused by the nsIThreadManager landing. Since this does exactly the same as the previous patch I don't believe that there is a need to re-request review.
Attachment #230168 -
Flags: superreview+
Attachment #230168 -
Flags: review+
Attachment #230168 -
Flags: approval1.8.1?
Comment 9•17 years ago
|
||
Comment on attachment 230168 [details] [diff] [review] Branch patch a=darin on behalf of drivers
Attachment #230168 -
Flags: approval1.8.1? → approval1.8.1+
Assignee | ||
Updated•17 years ago
|
Whiteboard: [checkin needed (1.8 branch)]
![]() |
||
Updated•17 years ago
|
Whiteboard: [checkin needed (1.8 branch)]
Updated•8 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•