Closed Bug 577398 Opened 15 years ago Closed 14 years ago

ContentProcessParent doesn't remove itself as an observer

Categories

(Core :: IPC, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 621386

People

(Reporter: jdm, Unassigned)

Details

Attachments

(1 file)

79 if (NS_SUCCEEDED(obs->AddObserver(parent, "xpcom-shutdown", 80 PR_FALSE))) { ... 82 nsCOMPtr<nsIPrefBranch2> prefs 83 (do_GetService(NS_PREFSERVICE_CONTRACTID)); 84 if (prefs) { 85 prefs->AddObserver("", parent, PR_FALSE); 86 } 87 } 88 obs->AddObserver( 89 parent, NS_IPC_IOSERVICE_SET_OFFLINE_TOPIC, PR_FALSE); 102 void 103 ContentProcessParent::ActorDestroy(ActorDestroyReason why) ... 110 obs->RemoveObserver(static_cast<nsIObserver*>(this), "xpcom-shutdown"); Dunno how bad it is, but in the event of a crashed content process we'd end up with the pref observers keeping the actual parent object around until app shutdown. We should probably fix this up.
Actually, the pref observer is cleared on xpcom-shutdown. However, I'm fairly certain that this won't happen if the content process dies prematurely for any reason.
This is handled by bug 621386.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: