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

This commit is contained in:
brettw%gmail.com 2006-06-19 16:23:56 +00:00
parent 2491a8d94c
commit fb7d7366ea

View File

@ -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);
}