Bug 336990 r=bryner Deleting a livemark causes bookmarks to disappear - make annotation service more tolerant of errors

Original committer: brettw%gmail.com
Original revision: 1.15
Original date: 2006/06/19 16:23:56
This commit is contained in:
benjamin%smedbergs.us 2006-07-18 16:53:47 +00:00
Родитель 45673f235e
Коммит f2e9c5172c
1 изменённых файлов: 4 добавлений и 1 удалений

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

@ -557,9 +557,12 @@ nsAnnotationService::GetPagesWithAnnotationCOMArray(
rv = statement->GetUTF8String(0, uristring);
NS_ENSURE_SUCCESS(rv, rv);
// convert to a URI, in case of some invalid URI, just ignore this row
// so we can mostly continue.
nsCOMPtr<nsIURI> uri;
rv = NS_NewURI(getter_AddRefs(uri), uristring);
NS_ENSURE_SUCCESS(rv, rv);
if (NS_FAILED(rv))
continue;
PRBool added = aResults->AppendObject(uri);
NS_ENSURE_TRUE(added, NS_ERROR_OUT_OF_MEMORY);
}