From cb21f617c139693b8cb8e8a6c4d9d59fd4f70049 Mon Sep 17 00:00:00 2001 From: "benjamin%smedbergs.us" Date: Tue, 18 Jul 2006 16:49:19 +0000 Subject: [PATCH] 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 --- .../components/places/src/nsAnnotationService.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/toolkit/components/places/src/nsAnnotationService.cpp b/toolkit/components/places/src/nsAnnotationService.cpp index 824819fbb69..5733f58f8a9 100644 --- a/toolkit/components/places/src/nsAnnotationService.cpp +++ b/toolkit/components/places/src/nsAnnotationService.cpp @@ -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);