Bug 318761 r=annie.sullivan Make unknown annotations not assert

Original committer: brettw%gmail.com
Original revision: 1.4
Original date: 2005/12/02 18:33:00
This commit is contained in:
benjamin%smedbergs.us 2006-07-18 16:49:19 +00:00
Родитель b849f3d1f2
Коммит cb21f617c1
1 изменённых файлов: 8 добавлений и 4 удалений

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

@ -262,7 +262,8 @@ nsAnnotationService::GetAnnotationString(nsIURI* aURI,
nsAString& _retval)
{
nsresult rv = StartGetAnnotationFromURI(aURI, aName);
NS_ENSURE_SUCCESS(rv, rv);
if (NS_FAILED(rv))
return rv;
rv = mDBGetAnnotationFromURI->GetString(kAnnoIndex_Content, _retval);
mDBGetAnnotationFromURI->Reset();
return rv;
@ -277,7 +278,8 @@ nsAnnotationService::GetAnnotationInt32(nsIURI* aURI,
PRInt32 *_retval)
{
nsresult rv = StartGetAnnotationFromURI(aURI, aName);
NS_ENSURE_SUCCESS(rv, rv);
if (NS_FAILED(rv))
return rv;
*_retval = mDBGetAnnotationFromURI->AsInt32(kAnnoIndex_Content);
mDBGetAnnotationFromURI->Reset();
return NS_OK;
@ -293,7 +295,8 @@ nsAnnotationService::GetAnnotationBinary(nsIURI* aURI,
nsACString& aMimeType)
{
nsresult rv = StartGetAnnotationFromURI(aURI, aName);
NS_ENSURE_SUCCESS(rv, rv);
if (NS_FAILED(rv))
return rv;
rv = mDBGetAnnotationFromURI->GetBlob(kAnnoIndex_Content, aDataLen, aData);
if (NS_FAILED(rv)) {
mDBGetAnnotationFromURI->Reset();
@ -315,7 +318,8 @@ nsAnnotationService::GetAnnotationInfo(nsIURI* aURI,
PRInt32 *aStorageType)
{
nsresult rv = StartGetAnnotationFromURI(aURI, aName);
NS_ENSURE_SUCCESS(rv, rv);
if (NS_FAILED(rv))
return rv;
mozStorageStatementScoper resetter(mDBGetAnnotationFromURI);
*aFlags = mDBGetAnnotationFromURI->AsInt32(kAnnoIndex_Flags);