зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1403694: Fix a case where a NULL stylesheet would be added to the nsStyleSheetService if nsLayoutUtils::StyloSupportedInCurrentProcess() returns false. r=xidorn
MozReview-Commit-ID: COaDbr49B7B --HG-- extra : rebase_source : c4cb37f2f57444af41eccfb93d0e73895e4ae7b8
This commit is contained in:
Родитель
934012625c
Коммит
17d09b7ae1
|
@ -251,23 +251,23 @@ nsStyleSheetService::LoadAndRegisterSheetInternal(nsIURI *aSheetURI,
|
|||
nsresult rv;
|
||||
|
||||
RefPtr<StyleSheet> geckoSheet;
|
||||
RefPtr<StyleSheet> servoSheet;
|
||||
|
||||
rv = LoadSheet(aSheetURI, parsingMode, StyleBackendType::Gecko, &geckoSheet);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
MOZ_ASSERT(geckoSheet);
|
||||
mGeckoSheets[aSheetType].AppendElement(geckoSheet);
|
||||
|
||||
#ifdef MOZ_STYLO
|
||||
if (nsLayoutUtils::StyloSupportedInCurrentProcess()) {
|
||||
RefPtr<StyleSheet> servoSheet;
|
||||
|
||||
rv = LoadSheet(aSheetURI, parsingMode, StyleBackendType::Servo, &servoSheet);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
MOZ_ASSERT(servoSheet);
|
||||
mServoSheets[aSheetType].AppendElement(servoSheet);
|
||||
}
|
||||
#endif
|
||||
|
||||
mGeckoSheets[aSheetType].AppendElement(geckoSheet);
|
||||
mServoSheets[aSheetType].AppendElement(servoSheet);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче