зеркало из https://github.com/mozilla/gecko-dev.git
Bug 569270 - Assertion on child process shutdown in xpcshell. r=dwitte
This commit is contained in:
Родитель
fb5e11f72f
Коммит
78fd071688
|
@ -827,11 +827,16 @@ NS_IMETHODIMP nsPrefBranch::RemoveObserver(const char *aDomain, nsIObserver *aOb
|
|||
|
||||
#ifdef MOZ_IPC
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Content) {
|
||||
nsresult rv;
|
||||
nsresult rv = NS_OK;
|
||||
mozilla::dom::ContentProcessChild *cpc =
|
||||
mozilla::dom::ContentProcessChild::GetSingleton();
|
||||
NS_ASSERTION(cpc, "Content Protocol is NULL!");
|
||||
rv = cpc->RemoveRemotePrefObserver(nsDependentCString(aDomain), mPrefRoot, aObserver);
|
||||
// In case cpc doesn't exist here, we're silently returning (instead of
|
||||
// asserting), because the child process is likely to be null
|
||||
// when this is called during xpcom-shutdown.
|
||||
if (cpc)
|
||||
rv = cpc->RemoveRemotePrefObserver(nsDependentCString(aDomain),
|
||||
mPrefRoot,
|
||||
aObserver);
|
||||
return rv;
|
||||
}
|
||||
#endif
|
||||
|
|
Загрузка…
Ссылка в новой задаче