From 468d30fd907b51e23ae15977b1dcc83827dbdd96 Mon Sep 17 00:00:00 2001 From: Ben Turner Date: Tue, 15 Jun 2010 13:21:20 -0700 Subject: [PATCH] Make NEXT_NO_DUPLICATE and PREV_NO_DUPLICATE behave the same as NEXT and PREV for object store cursors --- dom/indexedDB/IDBObjectStoreRequest.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/dom/indexedDB/IDBObjectStoreRequest.cpp b/dom/indexedDB/IDBObjectStoreRequest.cpp index 21b3fd37ad3a..8e768ffaa65f 100644 --- a/dom/indexedDB/IDBObjectStoreRequest.cpp +++ b/dom/indexedDB/IDBObjectStoreRequest.cpp @@ -971,12 +971,6 @@ IDBObjectStoreRequest::OpenCursor(nsIIDBKeyRange* aKeyRange, aDirection = nsIIDBCursor::NEXT; } - if (aDirection == nsIIDBCursor::NEXT_NO_DUPLICATE || - aDirection == nsIIDBCursor::PREV_NO_DUPLICATE) { - NS_NOTYETIMPLEMENTED("Implement me!"); - return NS_ERROR_NOT_IMPLEMENTED; - } - if (aPreload) { NS_NOTYETIMPLEMENTED("Implement me!"); return NS_ERROR_NOT_IMPLEMENTED; @@ -1641,10 +1635,12 @@ OpenCursorHelper::DoDatabaseWork(mozIStorageConnection* aConnection) switch (mDirection) { case nsIIDBCursor::NEXT: + case nsIIDBCursor::NEXT_NO_DUPLICATE: query.AppendLiteral(" DESC"); break; case nsIIDBCursor::PREV: + case nsIIDBCursor::PREV_NO_DUPLICATE: query.AppendLiteral(" ASC"); break;