Bug 1395868 - Fix the failure of idbcursor-continuePrimaryKey.htm. r=baku
authorBevis Tseng <btseng@mozilla.com>
Fri, 01 Sep 2017 16:45:58 +0800
changeset 428319 59a2c3461e78c3c455c5f32950a4d2ca23402c02
parent 428224 277554180e9faaab82cb27a891f5f8d01ede4d9d
child 428320 90691dd0694f25f0ce5569b5b4a323b502a97671
push id7761
push userjlund@mozilla.com
push dateFri, 15 Sep 2017 00:19:52 +0000
treeherdermozilla-beta@c38455951db4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbaku
bugs1395868
milestone57.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1395868 - Fix the failure of idbcursor-continuePrimaryKey.htm. r=baku
dom/indexedDB/ActorsParent.cpp
testing/web-platform/meta/IndexedDB/idbcursor-continuePrimaryKey.htm.ini
--- a/dom/indexedDB/ActorsParent.cpp
+++ b/dom/indexedDB/ActorsParent.cpp
@@ -28453,19 +28453,21 @@ OpenOp::DoIndexDatabaseWork(DatabaseConn
         openLimit;
       mCursor->mContinueToQuery =
         queryStart +
         NS_LITERAL_CSTRING(" AND sort_column >= :current_key") +
         directionClause +
         openLimit;
       mCursor->mContinuePrimaryKeyQuery =
         queryStart +
-        NS_LITERAL_CSTRING(" AND sort_column >= :current_key "
-                            "AND index_table.object_data_key >= :object_key "
-                          ) +
+        NS_LITERAL_CSTRING(" AND ("
+          "(sort_column == :current_key AND "
+             "index_table.object_data_key >= :object_key) OR "
+          "sort_column > :current_key"
+        ")") +
         directionClause +
         openLimit;
       break;
     }
 
     case IDBCursor::NEXT_UNIQUE: {
       Key upper;
       bool open;
@@ -28505,19 +28507,21 @@ OpenOp::DoIndexDatabaseWork(DatabaseConn
         openLimit;
       mCursor->mContinueToQuery =
         queryStart +
         NS_LITERAL_CSTRING(" AND sort_column <= :current_key") +
         directionClause +
         openLimit;
       mCursor->mContinuePrimaryKeyQuery =
         queryStart +
-        NS_LITERAL_CSTRING(" AND sort_column <= :current_key "
-                            "AND index_table.object_data_key <= :object_key "
-                          ) +
+        NS_LITERAL_CSTRING(" AND ("
+          "(sort_column == :current_key AND "
+             "index_table.object_data_key <= :object_key) OR "
+          "sort_column < :current_key"
+        ")") +
         directionClause +
         openLimit;
       break;
     }
 
     case IDBCursor::PREV_UNIQUE: {
       Key lower;
       bool open;
@@ -28687,19 +28691,21 @@ OpenOp::DoIndexKeyDatabaseWork(DatabaseC
         openLimit;
       mCursor->mContinueToQuery =
         queryStart +
         NS_LITERAL_CSTRING(" AND sort_column >= :current_key ") +
         directionClause +
         openLimit;
       mCursor->mContinuePrimaryKeyQuery =
         queryStart +
-        NS_LITERAL_CSTRING(" AND sort_column >= :current_key "
-                            "AND object_data_key >= :object_key "
-                          ) +
+        NS_LITERAL_CSTRING(" AND ("
+          "(sort_column == :current_key AND "
+             "object_data_key >= :object_key) OR "
+          "sort_column > :current_key"
+        ")") +
         directionClause +
         openLimit;
       break;
     }
 
     case IDBCursor::NEXT_UNIQUE: {
       Key upper;
       bool open;
@@ -28739,19 +28745,21 @@ OpenOp::DoIndexKeyDatabaseWork(DatabaseC
         openLimit;
       mCursor->mContinueToQuery =
         queryStart +
         NS_LITERAL_CSTRING(" AND sort_column <= :current_key ") +
         directionClause +
         openLimit;
       mCursor->mContinuePrimaryKeyQuery =
         queryStart +
-        NS_LITERAL_CSTRING(" AND sort_column <= :current_key "
-                            "AND object_data_key <= :object_key "
-                          ) +
+        NS_LITERAL_CSTRING(" AND ("
+          "(sort_column == :current_key AND "
+             "object_data_key <= :object_key) OR "
+          "sort_column < :current_key"
+        ")") +
         directionClause +
         openLimit;
       break;
     }
 
     case IDBCursor::PREV_UNIQUE: {
       Key lower;
       bool open;
deleted file mode 100644
--- a/testing/web-platform/meta/IndexedDB/idbcursor-continuePrimaryKey.htm.ini
+++ /dev/null
@@ -1,5 +0,0 @@
-[idbcursor-continuePrimaryKey.htm]
-  type: testharness
-  [IndexedDB: IDBCursor method continuePrimaryKey()]
-    expected: FAIL
-