зеркало из https://github.com/mozilla/pjs.git
Allow new windows to open when we've fallen back to the default theme because of an upgrade by allowing stylesheet loads to fail. b=144027 r=ben sr=dveditz a=asa
This commit is contained in:
Родитель
e93797d3ef
Коммит
93fff4275f
|
@ -6130,9 +6130,12 @@ nsXULDocument::AddPrototypeSheets()
|
|||
rv = GetCSSLoader(*getter_AddRefs(loader));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
rv = loader->LoadAgentSheet(uri, getter_AddRefs(sheet));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
AddStyleSheet(sheet, 0);
|
||||
// XXXldb We need to prevent bogus sheets from being held in the
|
||||
// prototype's list, but until then, don't propagate the failure
|
||||
// from LoadAgentSheet (and thus exit the loop).
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
AddStyleSheet(sheet, 0);
|
||||
}
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
|
|
Загрузка…
Ссылка в новой задаче