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:
dbaron%dbaron.org 2003-02-05 02:07:51 +00:00
Родитель e93797d3ef
Коммит 93fff4275f
1 изменённых файлов: 6 добавлений и 3 удалений

Просмотреть файл

@ -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;