From c477cae2a9502c777e566b0fc773748bf7e40aef Mon Sep 17 00:00:00 2001 From: "benjamin%smedbergs.us" Date: Tue, 18 Jul 2006 15:14:32 +0000 Subject: [PATCH] Bug 326432, r=annie.sullivan Bookmarks batches are transactions, livemarks performance bug fixes. Original committer: brettw%gmail.com Original revision: 1.10 Original date: 2006/02/08 21:07:59 git-svn-id: svn://10.0.0.236/trunk@202462 18797224-902f-48f8-a5cc-f745e15eee43 --- .../places/src/nsLivemarkService.cpp | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/mozilla/toolkit/components/places/src/nsLivemarkService.cpp b/mozilla/toolkit/components/places/src/nsLivemarkService.cpp index 4b817e084ae..b1d7298189f 100644 --- a/mozilla/toolkit/components/places/src/nsLivemarkService.cpp +++ b/mozilla/toolkit/components/places/src/nsLivemarkService.cpp @@ -483,7 +483,9 @@ nsLivemarkService::DeleteLivemarkChildren(PRInt64 aLivemarkFolderId) NS_ENSURE_SUCCESS(rv, rv); PRUint32 cc; + root->SetContainerOpen(PR_TRUE); rv = root->GetChildCount(&cc); + NS_ENSURE_SUCCESS(rv, rv); for (PRUint32 i = 0; i < cc; i++) { nsCOMPtr node; rv = root->GetChild(i, getter_AddRefs(node)); @@ -504,22 +506,6 @@ nsLivemarkService::DeleteLivemarkChildren(PRInt64 aLivemarkFolderId) return rv; } -nsresult -nsLivemarkService::BeginUpdateBatch() -{ - nsNavBookmarks *bookmarks = nsNavBookmarks::GetBookmarksService(); - NS_ENSURE_TRUE(bookmarks, NS_ERROR_OUT_OF_MEMORY); - return bookmarks->BeginUpdateBatch(); -} - -nsresult -nsLivemarkService::EndUpdateBatch() -{ - nsNavBookmarks *bookmarks = nsNavBookmarks::GetBookmarksService(); - NS_ENSURE_TRUE(bookmarks, NS_ERROR_OUT_OF_MEMORY); - return bookmarks->EndUpdateBatch(); -} - nsresult nsLivemarkService::InsertLivemarkChild(PRInt64 aLivemarkFolderId, nsIURI *aURI,