mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-27 12:50:09 +00:00
Bug 1209124 - Bail out of nsStyleSet::GatherRuleProcessors and PresShell::Observe if we're called during/after shutdown. r=dbaron
This commit is contained in:
parent
132b75b223
commit
8a56a13543
@ -9391,6 +9391,11 @@ PresShell::Observe(nsISupports* aSubject,
|
||||
const char* aTopic,
|
||||
const char16_t* aData)
|
||||
{
|
||||
if (mIsDestroying) {
|
||||
NS_WARNING("our observers should have been unregistered by now");
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
#ifdef MOZ_XUL
|
||||
if (!nsCRT::strcmp(aTopic, "chrome-flush-skin-caches")) {
|
||||
nsIFrame *rootFrame = mFrameConstructor->GetRootFrame();
|
||||
|
@ -389,6 +389,8 @@ SortStyleSheetsByScope(nsTArray<CSSStyleSheet*>& aSheets)
|
||||
nsresult
|
||||
nsStyleSet::GatherRuleProcessors(sheetType aType)
|
||||
{
|
||||
NS_ENSURE_FALSE(mInShutdown, NS_ERROR_FAILURE);
|
||||
|
||||
// We might be in GatherRuleProcessors because we are dropping a sheet,
|
||||
// resulting in an nsCSSSelector being destroyed. Tell the
|
||||
// RestyleManager for each document we're used in so that they can
|
||||
|
Loading…
x
Reference in New Issue
Block a user