Bug 878325 - Propagate exceptions out of CreateTemplateBuilder and LoadDataSources. r=bz

This commit is contained in:
Bobby Holley 2013-06-03 11:27:41 -07:00
parent 0e971c2ed9
commit 8dd33a69a6
2 changed files with 6 additions and 3 deletions

View File

@ -3871,8 +3871,10 @@ XULDocument::CreateTemplateBuilder(nsIContent* aElement)
if (! builder)
return NS_ERROR_FAILURE;
builder->Init(aElement);
builder->CreateContents(aElement, false);
nsresult rv = builder->Init(aElement);
NS_ENSURE_SUCCESS(rv, rv);
rv = builder->CreateContents(aElement, false);
NS_ENSURE_SUCCESS(rv, rv);
}
return NS_OK;

View File

@ -1243,7 +1243,8 @@ nsXULTemplateBuilder::LoadDataSources(nsIDocument* aDocument,
if (!mRoot->IsXUL()) {
// Hmm. This must be an HTML element. Try to set it as a
// JS property "by hand".
InitHTMLTemplateRoot();
rv = InitHTMLTemplateRoot();
NS_ENSURE_SUCCESS(rv, rv);
}
return NS_OK;