Bug 1297300 - Add missing checks to GetSpec() calls in rdf/, startupcache/ and xpfe/. r=froydnj.

This commit is contained in:
Nicholas Nethercote
2016-08-31 09:08:42 +10:00
parent d2598a3a5e
commit 36f59eb69c
4 changed files with 19 additions and 10 deletions

View File

@@ -604,14 +604,15 @@ RDFXMLDataSourceImpl::GetURI(char* *aURI)
if (!mURL) {
return NS_OK;
}
nsAutoCString spec;
mURL->GetSpec(spec);
nsresult rv = mURL->GetSpec(spec);
NS_ENSURE_SUCCESS(rv, rv);
*aURI = ToNewCString(spec);
if (!*aURI) {
return NS_ERROR_OUT_OF_MEMORY;
}
return NS_OK;
}