зеркало из https://github.com/mozilla/pjs.git
Backing out bug 404370, which caused sortFolderByName to fail (in test_placesTxn).
This commit is contained in:
Родитель
b71351a775
Коммит
c260813837
|
@ -932,14 +932,10 @@ nsNavBookmarks::InsertBookmark(PRInt64 aFolder, nsIURI *aItem, PRInt32 aIndex,
|
|||
nsresult rv = History()->GetUrlIdFor(aItem, &childID, PR_TRUE);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
PRInt32 index;
|
||||
if (aIndex == nsINavBookmarksService::DEFAULT_INDEX) {
|
||||
index = FolderCount(aFolder);
|
||||
} else {
|
||||
index = aIndex;
|
||||
rv = AdjustIndices(aFolder, index, PR_INT32_MAX, 1);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
}
|
||||
PRInt32 index = (aIndex == -1) ? FolderCount(aFolder) : aIndex;
|
||||
|
||||
rv = AdjustIndices(aFolder, index, PR_INT32_MAX, 1);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
mozStorageStatementScoper scope(mDBInsertBookmark);
|
||||
rv = mDBInsertBookmark->BindInt64Parameter(0, childID);
|
||||
|
@ -1110,15 +1106,10 @@ nsNavBookmarks::CreateContainerWithID(PRInt64 aItemId, PRInt64 aParent,
|
|||
mozIStorageConnection *dbConn = DBConn();
|
||||
mozStorageTransaction transaction(dbConn, PR_FALSE);
|
||||
|
||||
PRInt32 index;
|
||||
nsresult rv;
|
||||
if (*aIndex == nsINavBookmarksService::DEFAULT_INDEX) {
|
||||
index = FolderCount(aParent);
|
||||
} else {
|
||||
index = *aIndex;
|
||||
rv = AdjustIndices(aParent, index, PR_INT32_MAX, 1);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
}
|
||||
PRInt32 index = (*aIndex == -1) ? FolderCount(aParent) : *aIndex;
|
||||
|
||||
nsresult rv = AdjustIndices(aParent, index, PR_INT32_MAX, 1);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsCOMPtr<mozIStorageStatement> statement;
|
||||
if (aItemId == -1) {
|
||||
|
@ -1185,15 +1176,10 @@ nsNavBookmarks::InsertSeparator(PRInt64 aParent, PRInt32 aIndex,
|
|||
mozIStorageConnection *dbConn = DBConn();
|
||||
mozStorageTransaction transaction(dbConn, PR_FALSE);
|
||||
|
||||
PRInt32 index;
|
||||
nsresult rv;
|
||||
if (aIndex == nsINavBookmarksService::DEFAULT_INDEX) {
|
||||
index = FolderCount(aParent);
|
||||
} else {
|
||||
index = aIndex;
|
||||
rv = AdjustIndices(aParent, index, PR_INT32_MAX, 1);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
}
|
||||
PRInt32 index = (aIndex == -1) ? FolderCount(aParent) : aIndex;
|
||||
|
||||
nsresult rv = AdjustIndices(aParent, index, PR_INT32_MAX, 1);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsCOMPtr<mozIStorageStatement> statement;
|
||||
rv = dbConn->CreateStatement(NS_LITERAL_CSTRING("INSERT INTO moz_bookmarks "
|
||||
|
|
Загрузка…
Ссылка в новой задаче