Backed out 3 changesets (bug 920179, bug 920633, bug 920800) for Windows |make package| crashes on a CLOSED TREE.
authorRyan VanderMeulen <ryanvm@gmail.com>
Thu, 26 Sep 2013 14:22:43 -0400
changeset 162656 19b202186812a4ae7536f909388c650767cac075
parent 162655 bb0041643a0f01230e6bd82c4b41de32e4829f99
child 162657 b8d8404a47213cce683dd968936c165c290ffd2b
push id3066
push userakeybl@mozilla.com
push dateMon, 09 Dec 2013 19:58:46 +0000
treeherdermozilla-beta@a31a0dce83aa [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs920179, 920633, 920800
milestone27.0a1
backs outbb0041643a0f01230e6bd82c4b41de32e4829f99
24818d9b7470c276242ba1fd5c9f0a3d5230512a
d49b0f47b05a757419828838f6aadd6ff0cdbe4d
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
Backed out 3 changesets (bug 920179, bug 920633, bug 920800) for Windows |make package| crashes on a CLOSED TREE. Backed out changeset bb0041643a0f (bug 920800) Backed out changeset 24818d9b7470 (bug 920633) Backed out changeset d49b0f47b05a (bug 920179)
dom/indexedDB/IDBCursor.cpp
dom/indexedDB/IDBCursor.h
dom/indexedDB/IDBIndex.cpp
dom/indexedDB/IDBObjectStore.cpp
dom/indexedDB/IDBObjectStore.h
dom/indexedDB/IndexedDatabaseManager.cpp
dom/indexedDB/IndexedDatabaseManager.h
dom/indexedDB/ipc/IndexedDBChild.cpp
dom/indexedDB/ipc/IndexedDBParams.ipdlh
dom/indexedDB/ipc/IndexedDBParent.cpp
dom/indexedDB/ipc/IndexedDBParent.h
dom/indexedDB/ipc/PIndexedDBIndex.ipdl
dom/indexedDB/ipc/PIndexedDBObjectStore.ipdl
dom/indexedDB/ipc/unit/xpcshell.ini
dom/indexedDB/test/Makefile.in
dom/indexedDB/test/test_objectStore_getAllKeys.html
dom/indexedDB/test/test_objectStore_openKeyCursor.html
dom/indexedDB/test/unit/Makefile.in
dom/indexedDB/test/unit/test_objectStore_getAllKeys.js
dom/indexedDB/test/unit/test_objectStore_openKeyCursor.js
dom/indexedDB/test/unit/xpcshell.ini
dom/webidl/IDBObjectStore.webidl
js/xpconnect/src/XPCRuntimeService.cpp
js/xpconnect/src/nsXPConnect.cpp
--- a/dom/indexedDB/IDBCursor.cpp
+++ b/dom/indexedDB/IDBCursor.cpp
@@ -31,17 +31,18 @@
 
 USING_INDEXEDDB_NAMESPACE
 using namespace mozilla::dom::indexedDB::ipc;
 using mozilla::dom::Optional;
 using mozilla::dom::OwningIDBObjectStoreOrIDBIndex;
 using mozilla::ErrorResult;
 
 static_assert(sizeof(size_t) >= sizeof(IDBCursor::Direction),
-              "Relying on conversion between size_t and IDBCursor::Direction");
+              "Relying on conversion between size_t and "
+              "IDBCursor::Direction");
 
 namespace {
 
 class CursorHelper : public AsyncConnectionHelper
 {
 public:
   CursorHelper(IDBCursor* aCursor)
   : AsyncConnectionHelper(aCursor->Transaction(), aCursor->Request()),
@@ -56,19 +57,16 @@ public:
 
   virtual nsresult
   PackArgumentsForParentProcess(CursorRequestParams& aParams) = 0;
 
   virtual nsresult
   UnpackResponseFromParentProcess(const ResponseValue& aResponseValue) = 0;
 
 protected:
-  virtual ~CursorHelper()
-  { }
-
   nsRefPtr<IDBCursor> mCursor;
 
 private:
   IndexedDBCursorRequestChild* mActor;
 };
 
 } // anonymous namespace
 
@@ -76,46 +74,43 @@ BEGIN_INDEXEDDB_NAMESPACE
 
 class ContinueHelper : public CursorHelper
 {
 public:
   ContinueHelper(IDBCursor* aCursor,
                  int32_t aCount)
   : CursorHelper(aCursor), mCount(aCount)
   {
-    MOZ_ASSERT(NS_IsMainThread());
-    MOZ_ASSERT(aCursor);
-    MOZ_ASSERT(aCount > 0);
+    NS_ASSERTION(aCount > 0, "Must have a count!");
+  }
+
+  ~ContinueHelper()
+  {
+    IDBObjectStore::ClearCloneReadInfo(mCloneReadInfo);
   }
 
   virtual nsresult DoDatabaseWork(mozIStorageConnection* aConnection)
                                   MOZ_OVERRIDE;
 
   virtual nsresult GetSuccessResult(JSContext* aCx,
-                                    JS::MutableHandle<JS::Value> aVal)
-                                    MOZ_OVERRIDE;
+                                    JS::MutableHandle<JS::Value> aVal) MOZ_OVERRIDE;
 
   virtual void ReleaseMainThreadObjects() MOZ_OVERRIDE;
 
   virtual nsresult
   PackArgumentsForParentProcess(CursorRequestParams& aParams) MOZ_OVERRIDE;
 
   virtual ChildProcessSendResult
   SendResponseToChildProcess(nsresult aResultCode) MOZ_OVERRIDE;
 
   virtual nsresult
   UnpackResponseFromParentProcess(const ResponseValue& aResponseValue)
                                   MOZ_OVERRIDE;
 
 protected:
-  virtual ~ContinueHelper()
-  {
-    IDBObjectStore::ClearCloneReadInfo(mCloneReadInfo);
-  }
-
   virtual nsresult
   BindArgumentsToStatement(mozIStorageStatement* aStatement) = 0;
 
   virtual nsresult
   GatherResultsFromStatement(mozIStorageStatement* aStatement) = 0;
 
   void UpdateCursorState()
   {
@@ -124,20 +119,20 @@ protected:
     mCursor->mCachedValue = JSVAL_VOID;
     mCursor->mHaveCachedKey = false;
     mCursor->mHaveCachedPrimaryKey = false;
     mCursor->mHaveCachedValue = false;
     mCursor->mContinueCalled = false;
 
     if (mKey.IsUnset()) {
       mCursor->mHaveValue = false;
-    } else {
-      MOZ_ASSERT(mCursor->mType == IDBCursor::OBJECTSTORE ||
-                 mCursor->mType == IDBCursor::OBJECTSTOREKEY ||
-                 !mObjectKey.IsUnset());
+    }
+    else {
+      NS_ASSERTION(mCursor->mType == IDBCursor::OBJECTSTORE ||
+                   !mObjectKey.IsUnset(), "Bad key!");
 
       // Set new values.
       mCursor->mKey = mKey;
       mCursor->mObjectKey = mObjectKey;
       mCursor->mContinueToKey.Unset();
 
       mCursor->mCloneReadInfo.Swap(mCloneReadInfo);
       mCloneReadInfo.mCloneBuffer.clear();
@@ -153,70 +148,43 @@ protected:
 class ContinueObjectStoreHelper : public ContinueHelper
 {
 public:
   ContinueObjectStoreHelper(IDBCursor* aCursor,
                             uint32_t aCount)
   : ContinueHelper(aCursor, aCount)
   { }
 
-protected:
-  virtual ~ContinueObjectStoreHelper()
-  { }
-
 private:
   nsresult BindArgumentsToStatement(mozIStorageStatement* aStatement);
   nsresult GatherResultsFromStatement(mozIStorageStatement* aStatement);
 };
 
-class ContinueObjectStoreKeyHelper : public ContinueObjectStoreHelper
-{
-public:
-  ContinueObjectStoreKeyHelper(IDBCursor* aCursor,
-                               uint32_t aCount)
-  : ContinueObjectStoreHelper(aCursor, aCount)
-  { }
-
-private:
-  virtual ~ContinueObjectStoreKeyHelper()
-  { }
-
-  virtual nsresult
-  GatherResultsFromStatement(mozIStorageStatement* aStatement) MOZ_OVERRIDE;
-};
-
 class ContinueIndexHelper : public ContinueHelper
 {
 public:
   ContinueIndexHelper(IDBCursor* aCursor,
                       uint32_t aCount)
   : ContinueHelper(aCursor, aCount)
   { }
 
-protected:
-  virtual ~ContinueIndexHelper()
-  { }
-
 private:
   nsresult BindArgumentsToStatement(mozIStorageStatement* aStatement);
   nsresult GatherResultsFromStatement(mozIStorageStatement* aStatement);
 };
 
 class ContinueIndexObjectHelper : public ContinueIndexHelper
 {
 public:
   ContinueIndexObjectHelper(IDBCursor* aCursor,
                             uint32_t aCount)
   : ContinueIndexHelper(aCursor, aCount)
   { }
 
 private:
-  virtual ~ContinueIndexObjectHelper()
-  { }
-
   nsresult GatherResultsFromStatement(mozIStorageStatement* aStatement);
 };
 
 END_INDEXEDDB_NAMESPACE
 
 // static
 already_AddRefed<IDBCursor>
 IDBCursor::Create(IDBRequest* aRequest,
@@ -244,42 +212,16 @@ IDBCursor::Create(IDBRequest* aRequest,
 
   return cursor.forget();
 }
 
 // static
 already_AddRefed<IDBCursor>
 IDBCursor::Create(IDBRequest* aRequest,
                   IDBTransaction* aTransaction,
-                  IDBObjectStore* aObjectStore,
-                  Direction aDirection,
-                  const Key& aRangeKey,
-                  const nsACString& aContinueQuery,
-                  const nsACString& aContinueToQuery,
-                  const Key& aKey)
-{
-  MOZ_ASSERT(aObjectStore);
-  MOZ_ASSERT(!aKey.IsUnset());
-
-  nsRefPtr<IDBCursor> cursor =
-    IDBCursor::CreateCommon(aRequest, aTransaction, aObjectStore, aDirection,
-                            aRangeKey, aContinueQuery, aContinueToQuery);
-  NS_ASSERTION(cursor, "This shouldn't fail!");
-
-  cursor->mObjectStore = aObjectStore;
-  cursor->mType = OBJECTSTOREKEY;
-  cursor->mKey = aKey;
-
-  return cursor.forget();
-}
-
-// static
-already_AddRefed<IDBCursor>
-IDBCursor::Create(IDBRequest* aRequest,
-                  IDBTransaction* aTransaction,
                   IDBIndex* aIndex,
                   Direction aDirection,
                   const Key& aRangeKey,
                   const nsACString& aContinueQuery,
                   const nsACString& aContinueToQuery,
                   const Key& aKey,
                   const Key& aObjectKey)
 {
@@ -346,17 +288,17 @@ IDBCursor::ConvertDirection(mozilla::dom
 
     case mozilla::dom::IDBCursorDirection::Prev:
       return PREV;
 
     case mozilla::dom::IDBCursorDirection::Prevunique:
       return PREV_UNIQUE;
 
     default:
-      MOZ_ASSUME_UNREACHABLE("Unknown direction!");
+      MOZ_CRASH("Unknown direction!");
   }
 }
 
 // static
 already_AddRefed<IDBCursor>
 IDBCursor::CreateCommon(IDBRequest* aRequest,
                         IDBTransaction* aTransaction,
                         IDBObjectStore* aObjectStore,
@@ -449,55 +391,54 @@ IDBCursor::DropJSObjects()
   mRooted = false;
   mHaveValue = false;
   mozilla::DropJSObjects(this);
 }
 
 void
 IDBCursor::ContinueInternal(const Key& aKey, int32_t aCount, ErrorResult& aRv)
 {
-  MOZ_ASSERT(NS_IsMainThread());
-  MOZ_ASSERT(aCount > 0);
+  NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
+  NS_ASSERTION(aCount > 0, "Must have a count!");
 
   if (!mTransaction->IsOpen()) {
     aRv.Throw(NS_ERROR_DOM_INDEXEDDB_TRANSACTION_INACTIVE_ERR);
     return;
   }
 
   if (!mHaveValue || mContinueCalled) {
     aRv.Throw(NS_ERROR_DOM_INDEXEDDB_NOT_ALLOWED_ERR);
     return;
   }
 
   mContinueToKey = aKey;
 
-  MOZ_ASSERT(mRequest->ReadyState() == IDBRequestReadyState::Done);
+#ifdef DEBUG
+  NS_ASSERTION(mRequest->ReadyState() == IDBRequestReadyState::Done,
+               "Should be DONE!");
+#endif
 
   mRequest->Reset();
 
   nsRefPtr<ContinueHelper> helper;
   switch (mType) {
     case OBJECTSTORE:
       helper = new ContinueObjectStoreHelper(this, aCount);
       break;
 
-    case OBJECTSTOREKEY:
-      helper = new ContinueObjectStoreKeyHelper(this, aCount);
-      break;
-
     case INDEXKEY:
       helper = new ContinueIndexHelper(this, aCount);
       break;
 
     case INDEXOBJECT:
       helper = new ContinueIndexObjectHelper(this, aCount);
       break;
 
     default:
-      MOZ_ASSUME_UNREACHABLE("Unknown cursor type!");
+      NS_NOTREACHED("Unknown cursor type!");
   }
 
   nsresult rv = helper->DispatchToTransactionPool();
   if (NS_FAILED(rv)) {
     NS_WARNING("Failed to dispatch!");
     aRv.Throw(NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR);
     return;
   }
@@ -543,83 +484,66 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(
 NS_INTERFACE_MAP_END
 
 NS_IMPL_CYCLE_COLLECTING_ADDREF(IDBCursor)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(IDBCursor)
 
 JSObject*
 IDBCursor::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aScope)
 {
-  MOZ_ASSERT(NS_IsMainThread());
-
-  switch (mType) {
-    case OBJECTSTORE:
-    case INDEXOBJECT:
-      return IDBCursorWithValueBinding::Wrap(aCx, aScope, this);
-
-    case OBJECTSTOREKEY:
-    case INDEXKEY:
-      return IDBCursorBinding::Wrap(aCx, aScope, this);
-
-    default:
-      MOZ_ASSUME_UNREACHABLE("Bad type!");
-  }
+  return mType != INDEXKEY
+          ? IDBCursorWithValueBinding::Wrap(aCx, aScope, this)
+          : IDBCursorBinding::Wrap(aCx, aScope, this);
 }
 
 mozilla::dom::IDBCursorDirection
 IDBCursor::GetDirection() const
 {
-  MOZ_ASSERT(NS_IsMainThread());
+  NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
 
   switch (mDirection) {
     case NEXT:
       return mozilla::dom::IDBCursorDirection::Next;
 
     case NEXT_UNIQUE:
       return mozilla::dom::IDBCursorDirection::Nextunique;
 
     case PREV:
       return mozilla::dom::IDBCursorDirection::Prev;
 
     case PREV_UNIQUE:
       return mozilla::dom::IDBCursorDirection::Prevunique;
 
+    case DIRECTION_INVALID:
     default:
-      MOZ_ASSUME_UNREACHABLE("Bad direction!");
+      MOZ_CRASH("Unknown direction!");
+      return mozilla::dom::IDBCursorDirection::Next;
   }
 }
 
+
 void
 IDBCursor::GetSource(OwningIDBObjectStoreOrIDBIndex& aSource) const
 {
-  MOZ_ASSERT(NS_IsMainThread());
-
-  switch (mType) {
-    case OBJECTSTORE:
-    case OBJECTSTOREKEY:
-      MOZ_ASSERT(mObjectStore);
-      aSource.SetAsIDBObjectStore() = mObjectStore;
-      break;
+  NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
 
-    case INDEXKEY:
-    case INDEXOBJECT:
-      MOZ_ASSERT(mIndex);
-      aSource.SetAsIDBIndex() = mIndex;
-      break;
-
-    default:
-      MOZ_ASSUME_UNREACHABLE("Bad type!");
+  if (mType == OBJECTSTORE) {
+    aSource.SetAsIDBObjectStore() = mObjectStore;
+  }
+  else {
+    aSource.SetAsIDBIndex() = mIndex;
   }
 }
 
 JS::Value
 IDBCursor::GetKey(JSContext* aCx, ErrorResult& aRv)
 {
-  MOZ_ASSERT(NS_IsMainThread());
-  MOZ_ASSERT(!mKey.IsUnset() || !mHaveValue);
+  NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
+
+  NS_ASSERTION(!mKey.IsUnset() || !mHaveValue, "Bad key!");
 
   if (!mHaveValue) {
     return JSVAL_VOID;
   }
 
   if (!mHaveCachedKey) {
     if (!mRooted) {
       mozilla::HoldJSObjects(this);
@@ -633,46 +557,49 @@ IDBCursor::GetKey(JSContext* aCx, ErrorR
   }
 
   return mCachedKey;
 }
 
 JS::Value
 IDBCursor::GetPrimaryKey(JSContext* aCx, ErrorResult& aRv)
 {
-  MOZ_ASSERT(NS_IsMainThread());
+  NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
 
   if (!mHaveValue) {
     return JSVAL_VOID;
   }
 
   if (!mHaveCachedPrimaryKey) {
     if (!mRooted) {
       mozilla::HoldJSObjects(this);
       mRooted = true;
     }
 
-    const Key& key =
-      (mType == OBJECTSTORE || mType == OBJECTSTOREKEY) ? mKey : mObjectKey;
-    MOZ_ASSERT(!key.IsUnset());
+    JSAutoRequest ar(aCx);
+
+    NS_ASSERTION(mType == OBJECTSTORE ? !mKey.IsUnset() :
+                                        !mObjectKey.IsUnset(), "Bad key!");
+
+    const Key& key = mType == OBJECTSTORE ? mKey : mObjectKey;
 
     aRv = key.ToJSVal(aCx, mCachedPrimaryKey);
     ENSURE_SUCCESS(aRv, JSVAL_VOID);
 
     mHaveCachedPrimaryKey = true;
   }
 
   return mCachedPrimaryKey;
 }
 
 JS::Value
 IDBCursor::GetValue(JSContext* aCx, ErrorResult& aRv)
 {
-  MOZ_ASSERT(NS_IsMainThread());
-  MOZ_ASSERT(mType == OBJECTSTORE || mType == INDEXOBJECT);
+  NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
+  NS_ASSERTION(mType != INDEXKEY, "GetValue shouldn't exist on index keys");
 
   if (!mHaveValue) {
     return JSVAL_VOID;
   }
 
   if (!mHaveCachedValue) {
     if (!mRooted) {
       mozilla::HoldJSObjects(this);
@@ -694,17 +621,17 @@ IDBCursor::GetValue(JSContext* aCx, Erro
   return mCachedValue;
 }
 
 void
 IDBCursor::Continue(JSContext* aCx,
                     const Optional<JS::Handle<JS::Value> >& aKey,
                     ErrorResult &aRv)
 {
-  MOZ_ASSERT(NS_IsMainThread());
+  NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
 
   Key key;
   if (aKey.WasPassed()) {
     aRv = key.SetFromJSVal(aCx, aKey.Value());
     ENSURE_SUCCESS_VOID(aRv);
   }
 
   if (!key.IsUnset()) {
@@ -721,27 +648,27 @@ IDBCursor::Continue(JSContext* aCx,
       case IDBCursor::PREV_UNIQUE:
         if (key >= mKey) {
           aRv.Throw(NS_ERROR_DOM_INDEXEDDB_DATA_ERR);
           return;
         }
         break;
 
       default:
-        MOZ_ASSUME_UNREACHABLE("Unknown direction type!");
+        NS_NOTREACHED("Unknown direction type!");
     }
   }
 
   ContinueInternal(key, 1, aRv);
   if (aRv.Failed()) {
     return;
   }
 
 #ifdef IDB_PROFILER_USE_MARKS
-  if (mType == OBJECTSTORE || mType == OBJECTSTOREKEY) {
+  if (mType == OBJECTSTORE) {
     IDB_PROFILER_MARK("IndexedDB Request %llu: "
                       "database(%s).transaction(%s).objectStore(%s).cursor(%s)."
                       "continue(%s)",
                       "IDBRequest[%llu] MT IDBCursor.continue()",
                       Request()->GetSerialNumber(),
                       IDB_PROFILER_STRING(Transaction()->Database()),
                       IDB_PROFILER_STRING(Transaction()),
                       IDB_PROFILER_STRING(mObjectStore),
@@ -763,39 +690,40 @@ IDBCursor::Continue(JSContext* aCx,
   }
 #endif
 }
 
 already_AddRefed<IDBRequest>
 IDBCursor::Update(JSContext* aCx, JS::Handle<JS::Value> aValue,
                   ErrorResult& aRv)
 {
-  MOZ_ASSERT(NS_IsMainThread());
+  NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
 
   if (!mTransaction->IsOpen()) {
     aRv.Throw(NS_ERROR_DOM_INDEXEDDB_TRANSACTION_INACTIVE_ERR);
     return nullptr;
   }
 
   if (!mTransaction->IsWriteAllowed()) {
     aRv.Throw(NS_ERROR_DOM_INDEXEDDB_READ_ONLY_ERR);
     return nullptr;
   }
 
-  if (!mHaveValue || mType == OBJECTSTOREKEY || mType == INDEXKEY) {
+  if (!mHaveValue || mType == INDEXKEY) {
     aRv.Throw(NS_ERROR_DOM_INDEXEDDB_NOT_ALLOWED_ERR);
     return nullptr;
   }
 
-  MOZ_ASSERT(mObjectStore);
-  MOZ_ASSERT(!mKey.IsUnset());
-  MOZ_ASSERT(mType == OBJECTSTORE || mType == INDEXOBJECT);
-  MOZ_ASSERT_IF(mType == INDEXOBJECT, !mObjectKey.IsUnset());
+  NS_ASSERTION(mObjectStore, "This cannot be null!");
+  NS_ASSERTION(!mKey.IsUnset() , "Bad key!");
+  NS_ASSERTION(mType != INDEXOBJECT || !mObjectKey.IsUnset(), "Bad key!");
 
-  const Key& objectKey = (mType == OBJECTSTORE) ? mKey : mObjectKey;
+  JSAutoRequest ar(aCx);
+
+  Key& objectKey = (mType == OBJECTSTORE) ? mKey : mObjectKey;
 
   nsRefPtr<IDBRequest> request;
   if (mObjectStore->HasValidKeyPath()) {
     // Make sure the object given has the correct keyPath value set on it.
     const KeyPath& keyPath = mObjectStore->GetKeyPath();
     Key key;
 
     aRv = keyPath.ExtractKey(aCx, aValue, key);
@@ -863,45 +791,46 @@ IDBCursor::Update(JSContext* aCx, JS::Ha
 #endif
 
   return request.forget();
 }
 
 already_AddRefed<IDBRequest>
 IDBCursor::Delete(JSContext* aCx, ErrorResult& aRv)
 {
-  MOZ_ASSERT(NS_IsMainThread());
+  NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
 
   if (!mTransaction->IsOpen()) {
     aRv.Throw(NS_ERROR_DOM_INDEXEDDB_TRANSACTION_INACTIVE_ERR);
     return nullptr;
   }
 
   if (!mTransaction->IsWriteAllowed()) {
     aRv.Throw(NS_ERROR_DOM_INDEXEDDB_READ_ONLY_ERR);
     return nullptr;
   }
 
-  if (!mHaveValue || mType == OBJECTSTOREKEY || mType == INDEXKEY) {
+  if (!mHaveValue || mType == INDEXKEY) {
     aRv.Throw(NS_ERROR_DOM_INDEXEDDB_NOT_ALLOWED_ERR);
     return nullptr;
   }
 
-  MOZ_ASSERT(mObjectStore);
-  MOZ_ASSERT(mType == OBJECTSTORE || mType == INDEXOBJECT);
-  MOZ_ASSERT(!mKey.IsUnset());
+  NS_ASSERTION(mObjectStore, "This cannot be null!");
+  NS_ASSERTION(!mKey.IsUnset() , "Bad key!");
 
-  const Key& objectKey = (mType == OBJECTSTORE) ? mKey : mObjectKey;
+  Key& objectKey = (mType == OBJECTSTORE) ? mKey : mObjectKey;
 
   JS::Rooted<JS::Value> key(aCx);
   aRv = objectKey.ToJSVal(aCx, &key);
   ENSURE_SUCCESS(aRv, nullptr);
 
   nsRefPtr<IDBRequest> request = mObjectStore->Delete(aCx, key, aRv);
-  ENSURE_SUCCESS(aRv, nullptr);
+  if (aRv.Failed()) {
+    return nullptr;
+  }
 
 #ifdef IDB_PROFILER_USE_MARKS
   {
     uint64_t requestSerial = request->GetSerialNumber();
     if (mType == OBJECTSTORE) {
       IDB_PROFILER_MARK("IndexedDB Request %llu: "
                         "database(%s).transaction(%s).objectStore(%s)."
                         "cursor(%s).delete(%s)",
@@ -932,30 +861,30 @@ IDBCursor::Delete(JSContext* aCx, ErrorR
 #endif
 
   return request.forget();
 }
 
 void
 IDBCursor::Advance(uint32_t aCount, ErrorResult &aRv)
 {
-  MOZ_ASSERT(NS_IsMainThread());
+  NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
 
   if (aCount < 1) {
     aRv.ThrowTypeError(MSG_INVALID_ADVANCE_COUNT);
     return;
   }
 
   Key key;
   ContinueInternal(key, int32_t(aCount), aRv);
   ENSURE_SUCCESS_VOID(aRv);
 
 #ifdef IDB_PROFILER_USE_MARKS
   {
-    if (mType == OBJECTSTORE || mType == OBJECTSTOREKEY) {
+    if (mType == OBJECTSTORE) {
       IDB_PROFILER_MARK("IndexedDB Request %llu: "
                         "database(%s).transaction(%s).objectStore(%s)."
                         "cursor(%s).advance(%ld)",
                         "IDBRequest[%llu] MT IDBCursor.advance()",
                         Request()->GetSerialNumber(),
                         IDB_PROFILER_STRING(Transaction()->Database()),
                         IDB_PROFILER_STRING(Transaction()),
                         IDB_PROFILER_STRING(mObjectStore),
@@ -1201,19 +1130,16 @@ ContinueHelper::UnpackResponseFromParent
                                        mCloneReadInfo.mFiles);
   return NS_OK;
 }
 
 nsresult
 ContinueObjectStoreHelper::BindArgumentsToStatement(
                                                mozIStorageStatement* aStatement)
 {
-  MOZ_ASSERT(!NS_IsMainThread());
-  MOZ_ASSERT(aStatement);
-
   // Bind object store id.
   nsresult rv = aStatement->BindInt64ByName(NS_LITERAL_CSTRING("id"),
                                             mCursor->mObjectStore->Id());
   NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR);
 
   NS_NAMED_LITERAL_CSTRING(currentKeyName, "current_key");
   NS_NAMED_LITERAL_CSTRING(rangeKeyName, "range_key");
 
@@ -1235,39 +1161,22 @@ ContinueObjectStoreHelper::BindArguments
 
   return NS_OK;
 }
 
 nsresult
 ContinueObjectStoreHelper::GatherResultsFromStatement(
                                                mozIStorageStatement* aStatement)
 {
-  MOZ_ASSERT(!NS_IsMainThread());
-  MOZ_ASSERT(aStatement);
-
   // Figure out what kind of key we have next.
   nsresult rv = mKey.SetFromStatement(aStatement, 0);
   NS_ENSURE_SUCCESS(rv, rv);
 
   rv = IDBObjectStore::GetStructuredCloneReadInfoFromStatement(aStatement, 1, 2,
-                                                               mDatabase,
-                                                               mCloneReadInfo);
-  NS_ENSURE_SUCCESS(rv, rv);
-
-  return NS_OK;
-}
-
-nsresult
-ContinueObjectStoreKeyHelper::GatherResultsFromStatement(
-                                               mozIStorageStatement* aStatement)
-{
-  MOZ_ASSERT(!NS_IsMainThread());
-  MOZ_ASSERT(aStatement);
-
-  nsresult rv = mKey.SetFromStatement(aStatement, 0);
+    mDatabase, mCloneReadInfo);
   NS_ENSURE_SUCCESS(rv, rv);
 
   return NS_OK;
 }
 
 nsresult
 ContinueIndexHelper::BindArgumentsToStatement(mozIStorageStatement* aStatement)
 {
--- a/dom/indexedDB/IDBCursor.h
+++ b/dom/indexedDB/IDBCursor.h
@@ -50,17 +50,16 @@ class IDBCursor MOZ_FINAL : public nsISu
 
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(IDBCursor)
 
   enum Type
   {
     OBJECTSTORE = 0,
-    OBJECTSTOREKEY,
     INDEXKEY,
     INDEXOBJECT
   };
 
   enum Direction
   {
     NEXT = 0,
     NEXT_UNIQUE,
@@ -79,28 +78,16 @@ public:
          IDBObjectStore* aObjectStore,
          Direction aDirection,
          const Key& aRangeKey,
          const nsACString& aContinueQuery,
          const nsACString& aContinueToQuery,
          const Key& aKey,
          StructuredCloneReadInfo& aCloneReadInfo);
 
-  // For OBJECTSTOREKEY cursors.
-  static
-  already_AddRefed<IDBCursor>
-  Create(IDBRequest* aRequest,
-         IDBTransaction* aTransaction,
-         IDBObjectStore* aObjectStore,
-         Direction aDirection,
-         const Key& aRangeKey,
-         const nsACString& aContinueQuery,
-         const nsACString& aContinueToQuery,
-         const Key& aKey);
-
   // For INDEXKEY cursors.
   static
   already_AddRefed<IDBCursor>
   Create(IDBRequest* aRequest,
          IDBTransaction* aTransaction,
          IDBIndex* aIndex,
          Direction aDirection,
          const Key& aRangeKey,
--- a/dom/indexedDB/IDBIndex.cpp
+++ b/dom/indexedDB/IDBIndex.cpp
@@ -5,17 +5,16 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "base/basictypes.h"
 
 #include "IDBIndex.h"
 
 #include "nsIIDBKeyRange.h"
 
-#include <algorithm>
 #include "mozilla/dom/ContentChild.h"
 #include "mozilla/dom/ContentParent.h"
 #include "mozilla/dom/ipc/Blob.h"
 #include "mozilla/storage.h"
 #include "nsEventDispatcher.h"
 #include "nsThreadUtils.h"
 #include "xpcpublic.h"
 
@@ -559,17 +558,16 @@ already_AddRefed<IDBRequest>
 IDBIndex::GetAllKeysInternal(IDBKeyRange* aKeyRange, uint32_t aLimit,
                              ErrorResult& aRv)
 {
   NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
 
   IDBTransaction* transaction = mObjectStore->Transaction();
   if (!transaction->IsOpen()) {
     aRv.Throw(NS_ERROR_DOM_INDEXEDDB_TRANSACTION_INACTIVE_ERR);
-    return nullptr;
   }
 
   nsRefPtr<IDBRequest> request = GenerateRequest(this);
   if (!request) {
     NS_WARNING("Failed to generate request!");
     aRv.Throw(NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR);
     return nullptr;
   }
@@ -1364,21 +1362,20 @@ GetHelper::UnpackResponseFromParentProce
   IDBObjectStore::ConvertActorsToBlobs(getResponse.blobsChild(),
                                        mCloneReadInfo.mFiles);
   return NS_OK;
 }
 
 nsresult
 GetAllKeysHelper::DoDatabaseWork(mozIStorageConnection* /* aConnection */)
 {
-  MOZ_ASSERT(!NS_IsMainThread());
-  MOZ_ASSERT(IndexedDatabaseManager::IsMainProcess());
-
-  PROFILER_LABEL("IndexedDB",
-                 "GetAllKeysHelper::DoDatabaseWork [IDBIndex.cpp]");
+  NS_ASSERTION(!NS_IsMainThread(), "Wrong thread!");
+  NS_ASSERTION(IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
+
+  PROFILER_LABEL("IndexedDB", "GetAllKeysHelper::DoDatabaseWork");
 
   nsCString tableName;
   if (mIndex->IsUnique()) {
     tableName.AssignLiteral("unique_index_data");
   }
   else {
     tableName.AssignLiteral("index_data");
   }
@@ -1408,17 +1405,17 @@ GetAllKeysHelper::DoDatabaseWork(mozISto
                                       mIndex->Id());
   NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR);
 
   if (mKeyRange) {
     rv = mKeyRange->BindToStatement(stmt);
     NS_ENSURE_SUCCESS(rv, rv);
   }
 
-  mKeys.SetCapacity(std::min<uint32_t>(50, mLimit));
+  mKeys.SetCapacity(50);
 
   bool hasResult;
   while(NS_SUCCEEDED((rv = stmt->ExecuteStep(&hasResult))) && hasResult) {
     if (mKeys.Capacity() == mKeys.Length()) {
       mKeys.SetCapacity(mKeys.Capacity() * 2);
     }
 
     Key* key = mKeys.AppendElement();
@@ -1431,22 +1428,17 @@ GetAllKeysHelper::DoDatabaseWork(mozISto
 
   return NS_OK;
 }
 
 nsresult
 GetAllKeysHelper::GetSuccessResult(JSContext* aCx,
                                    JS::MutableHandle<JS::Value> aVal)
 {
-  MOZ_ASSERT(NS_IsMainThread());
-  MOZ_ASSERT(mKeys.Length() <= mLimit);
-
-  PROFILER_MAIN_THREAD_LABEL("IndexedDB",
-                             "GetAllKeysHelper::GetSuccessResult "
-                             "[IDBIndex.cpp]");
+  NS_ASSERTION(mKeys.Length() <= mLimit, "Too many results!");
 
   nsTArray<Key> keys;
   mKeys.SwapElements(keys);
 
   JS::Rooted<JSObject*> array(aCx, JS_NewArrayObject(aCx, 0, NULL));
   if (!array) {
     NS_WARNING("Failed to make array!");
     return NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR;
@@ -1478,22 +1470,21 @@ GetAllKeysHelper::GetSuccessResult(JSCon
 
   aVal.setObject(*array);
   return NS_OK;
 }
 
 nsresult
 GetAllKeysHelper::PackArgumentsForParentProcess(IndexRequestParams& aParams)
 {
-  MOZ_ASSERT(NS_IsMainThread());
-  MOZ_ASSERT(!IndexedDatabaseManager::IsMainProcess());
+  NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
+  NS_ASSERTION(!IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
 
   PROFILER_MAIN_THREAD_LABEL("IndexedDB",
-                             "GetAllKeysHelper::PackArgumentsForParentProcess "
-                             "[IDBIndex.cpp]");
+                             "GetAllKeysHelper::PackArgumentsForParentProcess");
 
   GetAllKeysParams params;
 
   if (mKeyRange) {
     KeyRange keyRange;
     mKeyRange->ToSerializedKeyRange(keyRange);
     params.optionalKeyRange() = keyRange;
   }
@@ -1505,22 +1496,21 @@ GetAllKeysHelper::PackArgumentsForParent
 
   aParams = params;
   return NS_OK;
 }
 
 AsyncConnectionHelper::ChildProcessSendResult
 GetAllKeysHelper::SendResponseToChildProcess(nsresult aResultCode)
 {
-  MOZ_ASSERT(NS_IsMainThread());
-  MOZ_ASSERT(IndexedDatabaseManager::IsMainProcess());
+  NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
+  NS_ASSERTION(IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
 
   PROFILER_MAIN_THREAD_LABEL("IndexedDB",
-                             "GetAllKeysHelper::SendResponseToChildProcess "
-                             "[IDBIndex.cpp]");
+                             "GetAllKeysHelper::SendResponseToChildProcess");
 
   IndexedDBRequestParentBase* actor = mRequest->GetActorParent();
   NS_ASSERTION(actor, "How did we get this far without an actor?");
 
   ResponseValue response;
   if (NS_FAILED(aResultCode)) {
     response = aResultCode;
   }
@@ -1536,19 +1526,18 @@ GetAllKeysHelper::SendResponseToChildPro
 
   return Success_Sent;
 }
 
 nsresult
 GetAllKeysHelper::UnpackResponseFromParentProcess(
                                             const ResponseValue& aResponseValue)
 {
-  MOZ_ASSERT(NS_IsMainThread());
-  MOZ_ASSERT(!IndexedDatabaseManager::IsMainProcess());
-  MOZ_ASSERT(aResponseValue.type() == ResponseValue::TGetAllKeysResponse);
+  NS_ASSERTION(aResponseValue.type() == ResponseValue::TGetAllKeysResponse,
+               "Bad response type!");
 
   mKeys.AppendElements(aResponseValue.get_GetAllKeysResponse().keys());
   return NS_OK;
 }
 
 nsresult
 GetAllHelper::DoDatabaseWork(mozIStorageConnection* /* aConnection */)
 {
@@ -1986,17 +1975,17 @@ OpenKeyCursorHelper::ReleaseMainThreadOb
 nsresult
 OpenKeyCursorHelper::PackArgumentsForParentProcess(IndexRequestParams& aParams)
 {
   NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
   NS_ASSERTION(!IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
 
   PROFILER_MAIN_THREAD_LABEL("IndexedDB",
                              "OpenKeyCursorHelper::"
-                             "PackArgumentsForParentProcess [IDBIndex.cpp]");
+                             "PackArgumentsForParentProcess");
 
   OpenKeyCursorParams params;
 
   if (mKeyRange) {
     KeyRange keyRange;
     mKeyRange->ToSerializedKeyRange(keyRange);
     params.optionalKeyRange() = keyRange;
   }
--- a/dom/indexedDB/IDBObjectStore.cpp
+++ b/dom/indexedDB/IDBObjectStore.cpp
@@ -6,17 +6,16 @@
 
 #include "base/basictypes.h"
 
 #include "IDBObjectStore.h"
 
 #include "mozilla/dom/ipc/nsIRemoteBlob.h"
 #include "nsIOutputStream.h"
 
-#include <algorithm>
 #include "jsfriendapi.h"
 #include "mozilla/dom/ContentChild.h"
 #include "mozilla/dom/ContentParent.h"
 #include "mozilla/dom/FileHandleBinding.h"
 #include "mozilla/dom/StructuredCloneTags.h"
 #include "mozilla/dom/ipc/Blob.h"
 #include "mozilla/dom/quota/FileStreams.h"
 #include "mozilla/storage.h"
@@ -340,67 +339,16 @@ private:
   nsCString mContinueToQuery;
   Key mRangeKey;
 
   // Only used in the parent process.
   nsRefPtr<IDBCursor> mCursor;
   SerializedStructuredCloneReadInfo mSerializedCloneReadInfo;
 };
 
-class OpenKeyCursorHelper MOZ_FINAL : public ObjectStoreHelper
-{
-public:
-  OpenKeyCursorHelper(IDBTransaction* aTransaction,
-                      IDBRequest* aRequest,
-                      IDBObjectStore* aObjectStore,
-                      IDBKeyRange* aKeyRange,
-                      IDBCursor::Direction aDirection)
-  : ObjectStoreHelper(aTransaction, aRequest, aObjectStore),
-    mKeyRange(aKeyRange), mDirection(aDirection)
-  { }
-
-  virtual nsresult
-  DoDatabaseWork(mozIStorageConnection* aConnection) MOZ_OVERRIDE;
-
-  virtual nsresult
-  GetSuccessResult(JSContext* aCx, JS::MutableHandleValue aVal) MOZ_OVERRIDE;
-
-  virtual void
-  ReleaseMainThreadObjects() MOZ_OVERRIDE;
-
-  virtual nsresult
-  PackArgumentsForParentProcess(ObjectStoreRequestParams& aParams) MOZ_OVERRIDE;
-
-  virtual ChildProcessSendResult
-  SendResponseToChildProcess(nsresult aResultCode) MOZ_OVERRIDE;
-
-  virtual nsresult
-  UnpackResponseFromParentProcess(const ResponseValue& aResponseValue)
-                                  MOZ_OVERRIDE;
-
-private:
-  ~OpenKeyCursorHelper()
-  { }
-
-  nsresult EnsureCursor();
-
-  // In-params.
-  nsRefPtr<IDBKeyRange> mKeyRange;
-  const IDBCursor::Direction mDirection;
-
-  // Out-params.
-  Key mKey;
-  nsCString mContinueQuery;
-  nsCString mContinueToQuery;
-  Key mRangeKey;
-
-  // Only used in the parent process.
-  nsRefPtr<IDBCursor> mCursor;
-};
-
 class CreateIndexHelper : public NoRequestObjectStoreHelper
 {
 public:
   CreateIndexHelper(IDBTransaction* aTransaction, IDBIndex* aIndex)
   : NoRequestObjectStoreHelper(aTransaction, aIndex->ObjectStore()),
     mIndex(aIndex)
   {
     if (sTLSIndex == BAD_TLS_INDEX) {
@@ -488,56 +436,16 @@ protected:
   nsRefPtr<IDBKeyRange> mKeyRange;
   const uint32_t mLimit;
 
 private:
   // Out-params.
   nsTArray<StructuredCloneReadInfo> mCloneReadInfos;
 };
 
-class GetAllKeysHelper MOZ_FINAL : public ObjectStoreHelper
-{
-public:
-  GetAllKeysHelper(IDBTransaction* aTransaction,
-                   IDBRequest* aRequest,
-                   IDBObjectStore* aObjectStore,
-                   IDBKeyRange* aKeyRange,
-                   const uint32_t aLimit)
-  : ObjectStoreHelper(aTransaction, aRequest, aObjectStore),
-    mKeyRange(aKeyRange), mLimit(aLimit)
-  { }
-
-  virtual nsresult
-  DoDatabaseWork(mozIStorageConnection* aConnection) MOZ_OVERRIDE;
-
-  virtual nsresult
-  GetSuccessResult(JSContext* aCx, JS::MutableHandleValue aVal) MOZ_OVERRIDE;
-
-  virtual void
-  ReleaseMainThreadObjects() MOZ_OVERRIDE;
-
-  virtual nsresult
-  PackArgumentsForParentProcess(ObjectStoreRequestParams& aParams) MOZ_OVERRIDE;
-
-  virtual ChildProcessSendResult
-  SendResponseToChildProcess(nsresult aResultCode) MOZ_OVERRIDE;
-
-  virtual nsresult
-  UnpackResponseFromParentProcess(const ResponseValue& aResponseValue)
-                                  MOZ_OVERRIDE;
-
-private:
-  ~GetAllKeysHelper()
-  { }
-
-  nsRefPtr<IDBKeyRange> mKeyRange;
-  const uint32_t mLimit;
-  nsTArray<Key> mKeys;
-};
-
 class CountHelper : public ObjectStoreHelper
 {
 public:
   CountHelper(IDBTransaction* aTransaction,
               IDBRequest* aRequest,
               IDBObjectStore* aObjectStore,
               IDBKeyRange* aKeyRange)
   : ObjectStoreHelper(aTransaction, aRequest, aObjectStore),
@@ -2169,57 +2077,16 @@ IDBObjectStore::GetAllInternal(IDBKeyRan
                     IDB_PROFILER_STRING(Transaction()),
                     IDB_PROFILER_STRING(this), IDB_PROFILER_STRING(aKeyRange),
                     aLimit);
 
   return request.forget();
 }
 
 already_AddRefed<IDBRequest>
-IDBObjectStore::GetAllKeysInternal(IDBKeyRange* aKeyRange, uint32_t aLimit,
-                                   ErrorResult& aRv)
-{
-  MOZ_ASSERT(NS_IsMainThread());
-
-  if (!mTransaction->IsOpen()) {
-    aRv.Throw(NS_ERROR_DOM_INDEXEDDB_TRANSACTION_INACTIVE_ERR);
-    return nullptr;
-  }
-
-  nsRefPtr<IDBRequest> request = GenerateRequest(this);
-  if (!request) {
-    NS_WARNING("Failed to generate request!");
-    aRv.Throw(NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR);
-    return nullptr;
-  }
-
-  nsRefPtr<GetAllKeysHelper> helper =
-    new GetAllKeysHelper(mTransaction, request, this, aKeyRange, aLimit);
-
-  nsresult rv = helper->DispatchToTransactionPool();
-  if (NS_FAILED(rv)) {
-    NS_WARNING("Failed to dispatch!");
-    aRv.Throw(NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR);
-    return nullptr;
-  }
-
-  IDB_PROFILER_MARK("IndexedDB Request %llu: "
-                    "database(%s).transaction(%s).objectStore(%s)."
-                    "getAllKeys(%s, %lu)",
-                    "IDBRequest[%llu] MT IDBObjectStore.getAllKeys()",
-                    request->GetSerialNumber(),
-                    IDB_PROFILER_STRING(Transaction()->Database()),
-                    IDB_PROFILER_STRING(Transaction()),
-                    IDB_PROFILER_STRING(this), IDB_PROFILER_STRING(aKeyRange),
-                    aLimit);
-
-  return request.forget();
-}
-
-already_AddRefed<IDBRequest>
 IDBObjectStore::DeleteInternal(IDBKeyRange* aKeyRange,
                                ErrorResult& aRv)
 {
   NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
   NS_ASSERTION(aKeyRange, "Null key range!");
 
   if (!mTransaction->IsOpen()) {
     aRv.Throw(NS_ERROR_DOM_INDEXEDDB_TRANSACTION_INACTIVE_ERR);
@@ -2414,79 +2281,16 @@ IDBObjectStore::OpenCursorFromChildProce
   NS_ENSURE_TRUE(cursor, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR);
 
   NS_ASSERTION(!cloneInfo.mCloneBuffer.data(), "Should have swapped!");
 
   cursor.forget(_retval);
   return NS_OK;
 }
 
-nsresult
-IDBObjectStore::OpenCursorFromChildProcess(IDBRequest* aRequest,
-                                           size_t aDirection,
-                                           const Key& aKey,
-                                           IDBCursor** _retval)
-{
-  MOZ_ASSERT(NS_IsMainThread());
-  MOZ_ASSERT(aRequest);
-
-  auto direction = static_cast<IDBCursor::Direction>(aDirection);
-
-  nsRefPtr<IDBCursor> cursor =
-    IDBCursor::Create(aRequest, mTransaction, this, direction, Key(),
-                      EmptyCString(), EmptyCString(), aKey);
-  NS_ENSURE_TRUE(cursor, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR);
-
-  cursor.forget(_retval);
-  return NS_OK;
-}
-
-already_AddRefed<IDBRequest>
-IDBObjectStore::OpenKeyCursorInternal(IDBKeyRange* aKeyRange, size_t aDirection,
-                                      ErrorResult& aRv)
-{
-  MOZ_ASSERT(NS_IsMainThread());
-
-  if (!mTransaction->IsOpen()) {
-    aRv.Throw(NS_ERROR_DOM_INDEXEDDB_TRANSACTION_INACTIVE_ERR);
-    return nullptr;
-  }
-
-  nsRefPtr<IDBRequest> request = GenerateRequest(this);
-  if (!request) {
-    NS_WARNING("Failed to generate request!");
-    aRv.Throw(NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR);
-    return nullptr;
-  }
-
-  auto direction = static_cast<IDBCursor::Direction>(aDirection);
-
-  nsRefPtr<OpenKeyCursorHelper> helper =
-    new OpenKeyCursorHelper(mTransaction, request, this, aKeyRange, direction);
-
-  nsresult rv = helper->DispatchToTransactionPool();
-  if (NS_FAILED(rv)) {
-    NS_WARNING("Failed to dispatch!");
-    aRv.Throw(NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR);
-    return nullptr;
-  }
-
-  IDB_PROFILER_MARK("IndexedDB Request %llu: "
-                    "database(%s).transaction(%s).objectStore(%s)."
-                    "openKeyCursor(%s, %s)",
-                    "IDBRequest[%llu] MT IDBObjectStore.openKeyCursor()",
-                    request->GetSerialNumber(),
-                    IDB_PROFILER_STRING(Transaction()->Database()),
-                    IDB_PROFILER_STRING(Transaction()),
-                    IDB_PROFILER_STRING(this), IDB_PROFILER_STRING(aKeyRange),
-                    IDB_PROFILER_STRING(direction));
-
-  return request.forget();
-}
-
 void
 IDBObjectStore::SetInfo(ObjectStoreInfo* aInfo)
 {
   NS_ASSERTION(NS_IsMainThread(), "Wrong thread");
   NS_ASSERTION(aInfo != mInfo, "This is nonsense");
 
   mInfo = aInfo;
 }
@@ -2958,65 +2762,16 @@ IDBObjectStore::Count(JSContext* aCx,
   if (aKey.WasPassed()) {
     aRv = IDBKeyRange::FromJSVal(aCx, aKey.Value(), getter_AddRefs(keyRange));
     ENSURE_SUCCESS(aRv, nullptr);
   }
 
   return CountInternal(keyRange, aRv);
 }
 
-already_AddRefed<IDBRequest>
-IDBObjectStore::GetAllKeys(JSContext* aCx,
-                           const Optional<JS::HandleValue>& aKey,
-                           const Optional<uint32_t>& aLimit, ErrorResult& aRv)
-{
-  MOZ_ASSERT(NS_IsMainThread());
-
-  if (!mTransaction->IsOpen()) {
-    aRv.Throw(NS_ERROR_DOM_INDEXEDDB_TRANSACTION_INACTIVE_ERR);
-    return nullptr;
-  }
-
-  nsRefPtr<IDBKeyRange> keyRange;
-  if (aKey.WasPassed()) {
-    aRv = IDBKeyRange::FromJSVal(aCx, aKey.Value(), getter_AddRefs(keyRange));
-    ENSURE_SUCCESS(aRv, nullptr);
-  }
-
-  uint32_t limit = UINT32_MAX;
-  if (aLimit.WasPassed() && aLimit.Value() != 0) {
-    limit = aLimit.Value();
-  }
-
-  return GetAllKeysInternal(keyRange, limit, aRv);
-}
-
-already_AddRefed<IDBRequest>
-IDBObjectStore::OpenKeyCursor(JSContext* aCx,
-                              const Optional<JS::HandleValue>& aRange,
-                              IDBCursorDirection aDirection,  ErrorResult& aRv)
-{
-  MOZ_ASSERT(NS_IsMainThread());
-
-  if (!mTransaction->IsOpen()) {
-    aRv.Throw(NS_ERROR_DOM_INDEXEDDB_TRANSACTION_INACTIVE_ERR);
-    return nullptr;
-  }
-
-  nsRefPtr<IDBKeyRange> keyRange;
-  if (aRange.WasPassed()) {
-    aRv = IDBKeyRange::FromJSVal(aCx, aRange.Value(), getter_AddRefs(keyRange));
-    ENSURE_SUCCESS(aRv, nullptr);
-  }
-
-  IDBCursor::Direction direction = IDBCursor::ConvertDirection(aDirection);
-
-  return OpenKeyCursorInternal(keyRange, static_cast<size_t>(direction), aRv);
-}
-
 inline nsresult
 CopyData(nsIInputStream* aInputStream, nsIOutputStream* aOutputStream)
 {
   NS_ASSERTION(!NS_IsMainThread(), "Wrong thread!");
   NS_ASSERTION(IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
 
   PROFILER_LABEL("IndexedDB", "CopyData");
 
@@ -4044,17 +3799,17 @@ OpenCursorHelper::SendResponseToChildPro
       NS_ASSERTION(mSerializedCloneReadInfo.data &&
                    mSerializedCloneReadInfo.dataLength,
                    "Shouldn't be possible!");
 
       ObjectStoreCursorConstructorParams params;
       params.requestParent() = requestActor;
       params.direction() = mDirection;
       params.key() = mKey;
-      params.optionalCloneInfo() = mSerializedCloneReadInfo;
+      params.cloneInfo() = mSerializedCloneReadInfo;
       params.blobsParent().SwapElements(blobsParent);
 
       if (!objectStoreActor->OpenCursor(mCursor, params, openCursorResponse)) {
         return Error;
       }
     }
 
     response = openCursorResponse;
@@ -4101,321 +3856,16 @@ OpenCursorHelper::UnpackResponseFromPare
       NS_NOTREACHED("Unknown response union type!");
       return NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR;
   }
 
   return NS_OK;
 }
 
 nsresult
-OpenKeyCursorHelper::DoDatabaseWork(mozIStorageConnection* /* aConnection */)
-{
-  MOZ_ASSERT(!NS_IsMainThread());
-  MOZ_ASSERT(IndexedDatabaseManager::IsMainProcess());
-
-  PROFILER_LABEL("IndexedDB",
-                 "OpenKeyCursorHelper::DoDatabaseWork [IDBObjectStore.cpp]");
-
-  NS_NAMED_LITERAL_CSTRING(keyValue, "key_value");
-  NS_NAMED_LITERAL_CSTRING(id, "id");
-  NS_NAMED_LITERAL_CSTRING(openLimit, " LIMIT ");
-
-  // Don't actually allocate space for this string yet.
-  const nsCSubstringTuple queryStart =
-    NS_LITERAL_CSTRING("SELECT ") + keyValue +
-    NS_LITERAL_CSTRING(" FROM object_data WHERE object_store_id = :") + id;
-
-  nsAutoCString keyRangeClause;
-  if (mKeyRange) {
-    mKeyRange->GetBindingClause(keyValue, keyRangeClause);
-  }
-
-  nsAutoCString directionClause = NS_LITERAL_CSTRING(" ORDER BY ") + keyValue;
-  switch (mDirection) {
-    case IDBCursor::NEXT:
-    case IDBCursor::NEXT_UNIQUE:
-      directionClause.AppendLiteral(" ASC");
-      break;
-
-    case IDBCursor::PREV:
-    case IDBCursor::PREV_UNIQUE:
-      directionClause.AppendLiteral(" DESC");
-      break;
-
-    default:
-      MOZ_ASSUME_UNREACHABLE("Unknown direction type!");
-  }
-
-  nsCString firstQuery = queryStart + keyRangeClause + directionClause +
-                         openLimit + NS_LITERAL_CSTRING("1");
-
-  nsCOMPtr<mozIStorageStatement> stmt =
-    mTransaction->GetCachedStatement(firstQuery);
-  NS_ENSURE_TRUE(stmt, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR);
-
-  mozStorageStatementScoper scoper(stmt);
-
-  nsresult rv = stmt->BindInt64ByName(id, mObjectStore->Id());
-  NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR);
-
-  if (mKeyRange) {
-    rv = mKeyRange->BindToStatement(stmt);
-    NS_ENSURE_SUCCESS(rv, rv);
-  }
-
-  bool hasResult;
-  rv = stmt->ExecuteStep(&hasResult);
-  NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR);
-
-  if (!hasResult) {
-    mKey.Unset();
-    return NS_OK;
-  }
-
-  rv = mKey.SetFromStatement(stmt, 0);
-  NS_ENSURE_SUCCESS(rv, rv);
-
-  // Now we need to make the query to get the next match.
-  keyRangeClause.Truncate();
-  nsAutoCString continueToKeyRangeClause;
-
-  NS_NAMED_LITERAL_CSTRING(currentKey, "current_key");
-  NS_NAMED_LITERAL_CSTRING(rangeKey, "range_key");
-
-  switch (mDirection) {
-    case IDBCursor::NEXT:
-    case IDBCursor::NEXT_UNIQUE:
-      AppendConditionClause(keyValue, currentKey, false, false,
-                            keyRangeClause);
-      AppendConditionClause(keyValue, currentKey, false, true,
-                            continueToKeyRangeClause);
-      if (mKeyRange && !mKeyRange->Upper().IsUnset()) {
-        AppendConditionClause(keyValue, rangeKey, true,
-                              !mKeyRange->IsUpperOpen(), keyRangeClause);
-        AppendConditionClause(keyValue, rangeKey, true,
-                              !mKeyRange->IsUpperOpen(),
-                              continueToKeyRangeClause);
-        mRangeKey = mKeyRange->Upper();
-      }
-      break;
-
-    case IDBCursor::PREV:
-    case IDBCursor::PREV_UNIQUE:
-      AppendConditionClause(keyValue, currentKey, true, false, keyRangeClause);
-      AppendConditionClause(keyValue, currentKey, true, true,
-                           continueToKeyRangeClause);
-      if (mKeyRange && !mKeyRange->Lower().IsUnset()) {
-        AppendConditionClause(keyValue, rangeKey, false,
-                              !mKeyRange->IsLowerOpen(), keyRangeClause);
-        AppendConditionClause(keyValue, rangeKey, false,
-                              !mKeyRange->IsLowerOpen(),
-                              continueToKeyRangeClause);
-        mRangeKey = mKeyRange->Lower();
-      }
-      break;
-
-    default:
-      MOZ_ASSUME_UNREACHABLE("Unknown direction type!");
-  }
-
-  mContinueQuery = queryStart + keyRangeClause + directionClause + openLimit;
-  mContinueToQuery = queryStart + continueToKeyRangeClause + directionClause +
-                     openLimit;
-
-  return NS_OK;
-}
-
-nsresult
-OpenKeyCursorHelper::EnsureCursor()
-{
-  MOZ_ASSERT(NS_IsMainThread());
-
-  PROFILER_MAIN_THREAD_LABEL("IndexedDB",
-                             "OpenKeyCursorHelper::EnsureCursor "
-                             "[IDBObjectStore.cpp]");
-
-  if (mCursor || mKey.IsUnset()) {
-    return NS_OK;
-  }
-
-  mCursor = IDBCursor::Create(mRequest, mTransaction, mObjectStore, mDirection,
-                              mRangeKey, mContinueQuery, mContinueToQuery,
-                              mKey);
-  NS_ENSURE_TRUE(mCursor, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR);
-
-  return NS_OK;
-}
-
-nsresult
-OpenKeyCursorHelper::GetSuccessResult(JSContext* aCx,
-                                      JS::MutableHandleValue aVal)
-{
-  MOZ_ASSERT(NS_IsMainThread());
-
-  PROFILER_MAIN_THREAD_LABEL("IndexedDB",
-                             "OpenKeyCursorHelper::GetSuccessResult "
-                             "[IDBObjectStore.cpp]");
-
-  nsresult rv = EnsureCursor();
-  NS_ENSURE_SUCCESS(rv, rv);
-
-  if (mCursor) {
-    rv = WrapNative(aCx, mCursor, aVal);
-    NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR);
-  }
-  else {
-    aVal.setUndefined();
-  }
-
-  return NS_OK;
-}
-
-void
-OpenKeyCursorHelper::ReleaseMainThreadObjects()
-{
-  MOZ_ASSERT(NS_IsMainThread());
-
-  mKeyRange = nullptr;
-  mCursor = nullptr;
-
-  ObjectStoreHelper::ReleaseMainThreadObjects();
-}
-
-nsresult
-OpenKeyCursorHelper::PackArgumentsForParentProcess(
-                                              ObjectStoreRequestParams& aParams)
-{
-  MOZ_ASSERT(NS_IsMainThread());
-  MOZ_ASSERT(!IndexedDatabaseManager::IsMainProcess());
-
-  PROFILER_MAIN_THREAD_LABEL("IndexedDB",
-                             "OpenKeyCursorHelper::"
-                             "PackArgumentsForParentProcess "
-                             "[IDBObjectStore.cpp]");
-
-  OpenKeyCursorParams params;
-
-  if (mKeyRange) {
-    KeyRange keyRange;
-    mKeyRange->ToSerializedKeyRange(keyRange);
-    params.optionalKeyRange() = keyRange;
-  }
-  else {
-    params.optionalKeyRange() = mozilla::void_t();
-  }
-
-  params.direction() = mDirection;
-
-  aParams = params;
-  return NS_OK;
-}
-
-AsyncConnectionHelper::ChildProcessSendResult
-OpenKeyCursorHelper::SendResponseToChildProcess(nsresult aResultCode)
-{
-  MOZ_ASSERT(NS_IsMainThread());
-  MOZ_ASSERT(IndexedDatabaseManager::IsMainProcess());
-  MOZ_ASSERT(!mCursor);
-
-  PROFILER_MAIN_THREAD_LABEL("IndexedDB",
-                             "OpenKeyCursorHelper::SendResponseToChildProcess "
-                             "[IDBObjectStore.cpp]");
-
-  IndexedDBRequestParentBase* actor = mRequest->GetActorParent();
-  MOZ_ASSERT(actor);
-
-  if (NS_SUCCEEDED(aResultCode)) {
-    nsresult rv = EnsureCursor();
-    if (NS_FAILED(rv)) {
-      NS_WARNING("EnsureCursor failed!");
-      aResultCode = rv;
-    }
-  }
-
-  ResponseValue response;
-  if (NS_FAILED(aResultCode)) {
-    response = aResultCode;
-  } else {
-    OpenCursorResponse openCursorResponse;
-
-    if (!mCursor) {
-      openCursorResponse = mozilla::void_t();
-    }
-    else {
-      IndexedDBObjectStoreParent* objectStoreActor =
-        mObjectStore->GetActorParent();
-      MOZ_ASSERT(objectStoreActor);
-
-      IndexedDBRequestParentBase* requestActor = mRequest->GetActorParent();
-      MOZ_ASSERT(requestActor);
-
-      ObjectStoreCursorConstructorParams params;
-      params.requestParent() = requestActor;
-      params.direction() = mDirection;
-      params.key() = mKey;
-      params.optionalCloneInfo() = mozilla::void_t();
-
-      if (!objectStoreActor->OpenCursor(mCursor, params, openCursorResponse)) {
-        return Error;
-      }
-    }
-
-    response = openCursorResponse;
-  }
-
-  if (!actor->SendResponse(response)) {
-    return Error;
-  }
-
-  return Success_Sent;
-}
-
-nsresult
-OpenKeyCursorHelper::UnpackResponseFromParentProcess(
-                                            const ResponseValue& aResponseValue)
-{
-  MOZ_ASSERT(NS_IsMainThread());
-  MOZ_ASSERT(!IndexedDatabaseManager::IsMainProcess());
-  MOZ_ASSERT(aResponseValue.type() == ResponseValue::TOpenCursorResponse);
-  MOZ_ASSERT(aResponseValue.get_OpenCursorResponse().type() ==
-               OpenCursorResponse::Tvoid_t ||
-             aResponseValue.get_OpenCursorResponse().type() ==
-               OpenCursorResponse::TPIndexedDBCursorChild);
-  MOZ_ASSERT(!mCursor);
-
-  PROFILER_MAIN_THREAD_LABEL("IndexedDB",
-                             "OpenKeyCursorHelper::"
-                             "UnpackResponseFromParentProcess "
-                             "[IDBObjectStore.cpp]");
-
-  const OpenCursorResponse& response =
-    aResponseValue.get_OpenCursorResponse();
-
-  switch (response.type()) {
-    case OpenCursorResponse::Tvoid_t:
-      break;
-
-    case OpenCursorResponse::TPIndexedDBCursorChild: {
-      IndexedDBCursorChild* actor =
-        static_cast<IndexedDBCursorChild*>(
-          response.get_PIndexedDBCursorChild());
-
-      mCursor = actor->ForgetStrongCursor();
-      NS_ASSERTION(mCursor, "This should never be null!");
-
-    } break;
-
-    default:
-      MOZ_CRASH("Unknown response union type!");
-  }
-
-  return NS_OK;
-}
-
-nsresult
 CreateIndexHelper::DoDatabaseWork(mozIStorageConnection* aConnection)
 {
   NS_ASSERTION(!NS_IsMainThread(), "Wrong thread!");
   NS_ASSERTION(IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
 
   PROFILER_LABEL("IndexedDB", "CreateIndexHelper::DoDatabaseWork");
 
   if (IndexedDatabaseManager::InLowDiskSpaceMode()) {
@@ -4843,205 +4293,16 @@ GetAllHelper::UnpackResponseFromParentPr
 
     IDBObjectStore::ConvertActorsToBlobs(blobs, destInfo->mFiles);
   }
 
   return NS_OK;
 }
 
 nsresult
-GetAllKeysHelper::DoDatabaseWork(mozIStorageConnection* /* aConnection */)
-{
-  MOZ_ASSERT(!NS_IsMainThread());
-  MOZ_ASSERT(IndexedDatabaseManager::IsMainProcess());
-
-  PROFILER_LABEL("IndexedDB",
-                 "GetAllKeysHelper::DoDatabaseWork [IDObjectStore.cpp]");
-
-  NS_NAMED_LITERAL_CSTRING(keyValue, "key_value");
-
-  nsAutoCString keyRangeClause;
-  if (mKeyRange) {
-    mKeyRange->GetBindingClause(keyValue, keyRangeClause);
-  }
-
-  nsAutoCString limitClause;
-  if (mLimit != UINT32_MAX) {
-    limitClause = NS_LITERAL_CSTRING(" LIMIT ");
-    limitClause.AppendInt(mLimit);
-  }
-
-  NS_NAMED_LITERAL_CSTRING(osid, "osid");
-
-  nsCString query = NS_LITERAL_CSTRING("SELECT ") + keyValue +
-                    NS_LITERAL_CSTRING(" FROM object_data WHERE "
-                                       "object_store_id = :") +
-                    osid + keyRangeClause +
-                    NS_LITERAL_CSTRING(" ORDER BY key_value ASC") +
-                    limitClause;
-
-  nsCOMPtr<mozIStorageStatement> stmt = mTransaction->GetCachedStatement(query);
-  NS_ENSURE_TRUE(stmt, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR);
-
-  mozStorageStatementScoper scoper(stmt);
-
-  nsresult rv = stmt->BindInt64ByName(osid, mObjectStore->Id());
-  NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR);
-
-  if (mKeyRange) {
-    rv = mKeyRange->BindToStatement(stmt);
-    NS_ENSURE_SUCCESS(rv, rv);
-  }
-
-  mKeys.SetCapacity(std::min<uint32_t>(50, mLimit));
-
-  bool hasResult;
-  while(NS_SUCCEEDED((rv = stmt->ExecuteStep(&hasResult))) && hasResult) {
-    if (mKeys.Capacity() == mKeys.Length()) {
-      mKeys.SetCapacity(mKeys.Capacity() * 2);
-    }
-
-    Key* key = mKeys.AppendElement();
-    NS_ASSERTION(key, "This shouldn't fail!");
-
-    rv = key->SetFromStatement(stmt, 0);
-    NS_ENSURE_SUCCESS(rv, rv);
-  }
-  NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR);
-
-  return NS_OK;
-}
-
-nsresult
-GetAllKeysHelper::GetSuccessResult(JSContext* aCx, JS::MutableHandleValue aVal)
-{
-  MOZ_ASSERT(NS_IsMainThread());
-  MOZ_ASSERT(mKeys.Length() <= mLimit);
-
-  PROFILER_MAIN_THREAD_LABEL("IndexedDB",
-                             "GetAllKeysHelper::GetSuccessResult "
-                             "[IDBObjectStore.cpp]");
-
-  nsTArray<Key> keys;
-  mKeys.SwapElements(keys);
-
-  JS::RootedObject array(aCx, JS_NewArrayObject(aCx, 0, NULL));
-  if (!array) {
-    NS_WARNING("Failed to make array!");
-    return NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR;
-  }
-
-  if (!keys.IsEmpty()) {
-    if (!JS_SetArrayLength(aCx, array, keys.Length())) {
-      NS_WARNING("Failed to set array length!");
-      return NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR;
-    }
-
-    for (uint32_t index = 0, count = keys.Length(); index < count; index++) {
-      const Key& key = keys[index];
-      MOZ_ASSERT(!key.IsUnset());
-
-      JS::RootedValue value(aCx);
-      nsresult rv = key.ToJSVal(aCx, &value);
-      if (NS_FAILED(rv)) {
-        NS_WARNING("Failed to get jsval for key!");
-        return rv;
-      }
-
-      if (!JS_SetElement(aCx, array, index, &value)) {
-        NS_WARNING("Failed to set array element!");
-        return NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR;
-      }
-    }
-  }
-
-  aVal.setObject(*array);
-  return NS_OK;
-}
-
-void
-GetAllKeysHelper::ReleaseMainThreadObjects()
-{
-  MOZ_ASSERT(NS_IsMainThread());
-
-  mKeyRange = nullptr;
-
-  ObjectStoreHelper::ReleaseMainThreadObjects();
-}
-
-nsresult
-GetAllKeysHelper::PackArgumentsForParentProcess(
-                                              ObjectStoreRequestParams& aParams)
-{
-  MOZ_ASSERT(NS_IsMainThread());
-  MOZ_ASSERT(!IndexedDatabaseManager::IsMainProcess());
-
-  PROFILER_MAIN_THREAD_LABEL("IndexedDB",
-                             "GetAllKeysHelper::PackArgumentsForParentProcess "
-                             "[IDBObjectStore.cpp]");
-
-  GetAllKeysParams params;
-
-  if (mKeyRange) {
-    KeyRange keyRange;
-    mKeyRange->ToSerializedKeyRange(keyRange);
-    params.optionalKeyRange() = keyRange;
-  } else {
-    params.optionalKeyRange() = mozilla::void_t();
-  }
-
-  params.limit() = mLimit;
-
-  aParams = params;
-  return NS_OK;
-}
-
-AsyncConnectionHelper::ChildProcessSendResult
-GetAllKeysHelper::SendResponseToChildProcess(nsresult aResultCode)
-{
-  MOZ_ASSERT(NS_IsMainThread());
-  MOZ_ASSERT(IndexedDatabaseManager::IsMainProcess());
-
-  PROFILER_MAIN_THREAD_LABEL("IndexedDB",
-                             "GetAllKeysHelper::SendResponseToChildProcess "
-                             "[IDBObjectStore.cpp]");
-
-  IndexedDBRequestParentBase* actor = mRequest->GetActorParent();
-  MOZ_ASSERT(actor);
-
-  ResponseValue response;
-  if (NS_FAILED(aResultCode)) {
-    response = aResultCode;
-  }
-  else {
-    GetAllKeysResponse getAllKeysResponse;
-    getAllKeysResponse.keys().AppendElements(mKeys);
-    response = getAllKeysResponse;
-  }
-
-  if (!actor->SendResponse(response)) {
-    return Error;
-  }
-
-  return Success_Sent;
-}
-
-nsresult
-GetAllKeysHelper::UnpackResponseFromParentProcess(
-                                            const ResponseValue& aResponseValue)
-{
-  MOZ_ASSERT(NS_IsMainThread());
-  MOZ_ASSERT(!IndexedDatabaseManager::IsMainProcess());
-  MOZ_ASSERT(aResponseValue.type() == ResponseValue::TGetAllKeysResponse);
-
-  mKeys.AppendElements(aResponseValue.get_GetAllKeysResponse().keys());
-  return NS_OK;
-}
-
-nsresult
 CountHelper::DoDatabaseWork(mozIStorageConnection* aConnection)
 {
   NS_ASSERTION(!NS_IsMainThread(), "Wrong thread!");
   NS_ASSERTION(IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
 
   PROFILER_LABEL("IndexedDB",
                  "CountHelper::DoDatabaseWork [IDBObjectStore.cpp]");
 
--- a/dom/indexedDB/IDBObjectStore.h
+++ b/dom/indexedDB/IDBObjectStore.h
@@ -4,17 +4,16 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_dom_indexeddb_idbobjectstore_h__
 #define mozilla_dom_indexeddb_idbobjectstore_h__
 
 #include "mozilla/dom/indexedDB/IndexedDatabase.h"
 
-#include "js/TypeDecls.h"
 #include "mozilla/dom/IDBCursorBinding.h"
 #include "mozilla/dom/IDBIndexBinding.h"
 #include "mozilla/dom/IDBObjectStoreBinding.h"
 #include "nsCycleCollectionParticipant.h"
 #include "MainThreadUtils.h"
 
 #include "mozilla/dom/indexedDB/IDBRequest.h"
 #include "mozilla/dom/indexedDB/IDBTransaction.h"
@@ -217,53 +216,36 @@ public:
               ErrorResult& aRv);
 
   already_AddRefed<IDBRequest>
   GetAllInternal(IDBKeyRange* aKeyRange,
                  uint32_t aLimit,
                  ErrorResult& aRv);
 
   already_AddRefed<IDBRequest>
-  GetAllKeysInternal(IDBKeyRange* aKeyRange,
-                     uint32_t aLimit,
-                     ErrorResult& aRv);
-
-  already_AddRefed<IDBRequest>
   DeleteInternal(IDBKeyRange* aKeyRange,
                  ErrorResult& aRv);
 
   already_AddRefed<IDBRequest>
   CountInternal(IDBKeyRange* aKeyRange,
                 ErrorResult& aRv);
 
   already_AddRefed<IDBRequest>
   OpenCursorInternal(IDBKeyRange* aKeyRange,
                      size_t aDirection,
                      ErrorResult& aRv);
 
-  already_AddRefed<IDBRequest>
-  OpenKeyCursorInternal(IDBKeyRange* aKeyRange,
-                        size_t aDirection,
-                        ErrorResult& aRv);
-
-  nsresult
-  OpenCursorFromChildProcess(
+  nsresult OpenCursorFromChildProcess(
                             IDBRequest* aRequest,
                             size_t aDirection,
                             const Key& aKey,
                             const SerializedStructuredCloneReadInfo& aCloneInfo,
                             nsTArray<StructuredCloneFile>& aBlobs,
                             IDBCursor** _retval);
 
-  nsresult
-  OpenCursorFromChildProcess(IDBRequest* aRequest,
-                             size_t aDirection,
-                             const Key& aKey,
-                             IDBCursor** _retval);
-
   void
   SetInfo(ObjectStoreInfo* aInfo);
 
   static const JSClass sDummyPropJSClass;
 
   // nsWrapperCache
   virtual JSObject*
   WrapObject(JSContext* aCx, JS::Handle<JSObject*> aScope) MOZ_OVERRIDE;
@@ -332,40 +314,32 @@ public:
              IDBCursorDirection aDirection, ErrorResult& aRv);
 
   already_AddRefed<IDBIndex>
   CreateIndex(JSContext* aCx, const nsAString& aName, const nsAString& aKeyPath,
               const IDBIndexParameters& aOptionalParameters, ErrorResult& aRv);
 
   already_AddRefed<IDBIndex>
   CreateIndex(JSContext* aCx, const nsAString& aName,
-              const Sequence<nsString>& aKeyPath,
+              const Sequence<nsString >& aKeyPath,
               const IDBIndexParameters& aOptionalParameters, ErrorResult& aRv);
 
   already_AddRefed<IDBIndex>
   Index(const nsAString& aName, ErrorResult &aRv);
 
   void
   DeleteIndex(const nsAString& aIndexName, ErrorResult& aRv);
 
   already_AddRefed<IDBRequest>
   Count(JSContext* aCx, const Optional<JS::Handle<JS::Value> >& aKey,
         ErrorResult& aRv);
 
   already_AddRefed<IDBRequest>
   GetAll(JSContext* aCx, const Optional<JS::Handle<JS::Value> >& aKey,
-         const Optional<uint32_t>& aLimit, ErrorResult& aRv);
-
-  already_AddRefed<IDBRequest>
-  GetAllKeys(JSContext* aCx, const Optional<JS::HandleValue>& aKey,
-             const Optional<uint32_t>& aLimit, ErrorResult& aRv);
-
-  already_AddRefed<IDBRequest>
-  OpenKeyCursor(JSContext* aCx, const Optional<JS::HandleValue>& aRange,
-                IDBCursorDirection aDirection, ErrorResult& aRv);
+         const Optional<uint32_t >& aLimit, ErrorResult& aRv);
 
 protected:
   IDBObjectStore();
   ~IDBObjectStore();
 
   nsresult GetAddInfo(JSContext* aCx,
                       JS::Handle<JS::Value> aValue,
                       JS::Handle<JS::Value> aKeyVal,
--- a/dom/indexedDB/IndexedDatabaseManager.cpp
+++ b/dom/indexedDB/IndexedDatabaseManager.cpp
@@ -8,47 +8,34 @@
 
 #include "nsIConsoleService.h"
 #include "nsIDiskSpaceWatcher.h"
 #include "nsIFile.h"
 #include "nsIFileStorage.h"
 #include "nsIObserverService.h"
 #include "nsIScriptError.h"
 
-#include "jsapi.h"
 #include "mozilla/ClearOnShutdown.h"
 #include "mozilla/CondVar.h"
 #include "mozilla/ContentEvents.h"
 #include "mozilla/dom/quota/OriginOrPatternString.h"
 #include "mozilla/dom/quota/QuotaManager.h"
 #include "mozilla/dom/quota/Utilities.h"
 #include "mozilla/dom/TabContext.h"
 #include "mozilla/Services.h"
 #include "mozilla/storage.h"
-#include "mozilla/Util.h"
 #include "nsContentUtils.h"
 #include "nsEventDispatcher.h"
 #include "nsThreadUtils.h"
 
 #include "IDBEvents.h"
 #include "IDBFactory.h"
 #include "IDBKeyRange.h"
 #include "IDBRequest.h"
 
-// Bindings for ResolveConstructors
-#include "mozilla/dom/IDBCursorBinding.h"
-#include "mozilla/dom/IDBDatabaseBinding.h"
-#include "mozilla/dom/IDBFactoryBinding.h"
-#include "mozilla/dom/IDBIndexBinding.h"
-#include "mozilla/dom/IDBObjectStoreBinding.h"
-#include "mozilla/dom/IDBOpenDBRequestBinding.h"
-#include "mozilla/dom/IDBRequestBinding.h"
-#include "mozilla/dom/IDBTransactionBinding.h"
-#include "mozilla/dom/IDBVersionChangeEventBinding.h"
-
 // The two possible values for the data argument when receiving the disk space
 // observer notification.
 #define LOW_DISK_SPACE_DATA_FULL "full"
 #define LOW_DISK_SPACE_DATA_FREE "free"
 
 USING_INDEXEDDB_NAMESPACE
 using namespace mozilla::dom;
 USING_QUOTA_NAMESPACE
@@ -102,43 +89,16 @@ END_INDEXEDDB_NAMESPACE
 
 namespace {
 
 mozilla::StaticRefPtr<IndexedDatabaseManager> gInstance;
 
 mozilla::Atomic<int32_t> gInitialized(0);
 mozilla::Atomic<int32_t> gClosed(0);
 
-// See ResolveConstructors below.
-struct ConstructorInfo {
-  const char* name;
-  JS::Handle<JSObject*> (*resolve)(JSContext*, JS::Handle<JSObject*>, bool);
-  mutable jsid id;
-};
-
-const ConstructorInfo gConstructorInfo[] = {
-
-#define BINDING_ENTRY(_name) \
-  { #_name, _name##Binding::GetConstructorObject, JSID_VOID },
-
-  BINDING_ENTRY(IDBFactory)
-  BINDING_ENTRY(IDBDatabase)
-  BINDING_ENTRY(IDBTransaction)
-  BINDING_ENTRY(IDBObjectStore)
-  BINDING_ENTRY(IDBIndex)
-  BINDING_ENTRY(IDBCursor)
-  BINDING_ENTRY(IDBRequest)
-  BINDING_ENTRY(IDBOpenDBRequest)
-  BINDING_ENTRY(IDBVersionChangeEvent)
-
-#undef BINDING_ENTRY
-};
-
-const uint32_t gConstructorCount = mozilla::ArrayLength(gConstructorInfo);
-
 class AsyncDeleteFileRunnable MOZ_FINAL : public nsIRunnable
 {
 public:
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIRUNNABLE
 
   AsyncDeleteFileRunnable(FileManager* aFileManager, int64_t aFileId);
 
@@ -919,53 +879,8 @@ GetFileReferencesHelper::Run()
   mozilla::MutexAutoLock lock(mMutex);
   NS_ASSERTION(mWaiting, "Huh?!");
 
   mWaiting = false;
   mCondVar.Notify();
 
   return NS_OK;
 }
-
-BEGIN_INDEXEDDB_NAMESPACE
-
-bool
-ResolveConstructors(JSContext* aCx, JS::HandleObject aObj, JS::HandleId aId,
-                    JS::MutableHandleObject aObjp)
-{
-  MOZ_ASSERT(NS_IsMainThread());
-
-  // The first time this function is called we need to intern all the strings we
-  // care about.
-  if (JSID_IS_VOID(gConstructorInfo[0].id)) {
-    for (uint32_t i = 0; i < gConstructorCount; i++) {
-      JS::RootedString str(aCx, JS_InternString(aCx, gConstructorInfo[i].name));
-      if (!str) {
-        NS_WARNING("Failed to intern string!");
-        while (i) {
-          gConstructorInfo[--i].id = JSID_VOID;
-        }
-        return false;
-      }
-      gConstructorInfo[i].id = INTERNED_STRING_TO_JSID(aCx, str);
-    }
-  }
-
-  // Now resolve.
-  for (uint32_t i = 0; i < gConstructorCount; i++) {
-    if (gConstructorInfo[i].id == aId) {
-      JS::RootedObject constructor(aCx,
-        gConstructorInfo[i].resolve(aCx, aObj, true));
-      if (!constructor) {
-        return false;
-      }
-
-      aObjp.set(aObj);
-      return true;
-    }
-  }
-
-  // Not resolved.
-  aObjp.set(nullptr);
-  return true;
-}
-
-END_INDEXEDDB_NAMESPACE
--- a/dom/indexedDB/IndexedDatabaseManager.h
+++ b/dom/indexedDB/IndexedDatabaseManager.h
@@ -7,17 +7,16 @@
 #ifndef mozilla_dom_indexeddb_indexeddatabasemanager_h__
 #define mozilla_dom_indexeddb_indexeddatabasemanager_h__
 
 #include "mozilla/dom/indexedDB/IndexedDatabase.h"
 
 #include "nsIIndexedDatabaseManager.h"
 #include "nsIObserver.h"
 
-#include "js/TypeDecls.h"
 #include "mozilla/Atomics.h"
 #include "mozilla/dom/quota/PersistenceType.h"
 #include "mozilla/Mutex.h"
 #include "nsClassHashtable.h"
 #include "nsHashKeys.h"
 
 #define INDEXEDDB_MANAGER_CONTRACTID "@mozilla.org/dom/indexeddb/manager;1"
 
@@ -162,15 +161,11 @@ private:
   // It's s also used to atomically update FileInfo.mRefCnt, FileInfo.mDBRefCnt
   // and FileInfo.mSliceRefCnt
   mozilla::Mutex mFileMutex;
 
   static bool sIsMainProcess;
   static mozilla::Atomic<int32_t> sLowDiskSpaceMode;
 };
 
-bool
-ResolveConstructors(JSContext* aCx, JS::HandleObject aObj, JS::HandleId aId,
-                    JS::MutableHandleObject aObjp);
-
 END_INDEXEDDB_NAMESPACE
 
 #endif /* mozilla_dom_indexeddb_indexeddatabasemanager_h__ */
--- a/dom/indexedDB/ipc/IndexedDBChild.cpp
+++ b/dom/indexedDB/ipc/IndexedDBChild.cpp
@@ -737,50 +737,27 @@ IndexedDBObjectStoreChild::RecvPIndexedD
     static_cast<IndexedDBObjectStoreRequestChild*>(aParams.requestChild());
   NS_ASSERTION(requestActor, "Must have an actor here!");
 
   nsRefPtr<IDBRequest> request = requestActor->GetRequest();
   NS_ASSERTION(request, "Must have a request here!");
 
   size_t direction = static_cast<size_t>(aParams.direction());
 
-  nsRefPtr<IDBCursor> cursor;
-  nsresult rv;
-
-  typedef ipc::OptionalStructuredCloneReadInfo CursorUnionType;
-
-  switch (aParams.optionalCloneInfo().type()) {
-    case CursorUnionType::TSerializedStructuredCloneReadInfo: {
-      nsTArray<StructuredCloneFile> blobs;
-      IDBObjectStore::ConvertActorsToBlobs(aParams.blobsChild(), blobs);
-
-      const SerializedStructuredCloneReadInfo& cloneInfo =
-        aParams.optionalCloneInfo().get_SerializedStructuredCloneReadInfo();
+  nsTArray<StructuredCloneFile> blobs;
+  IDBObjectStore::ConvertActorsToBlobs(aParams.blobsChild(), blobs);
 
-      rv = mObjectStore->OpenCursorFromChildProcess(request, direction,
-                                                    aParams.key(), cloneInfo,
-                                                    blobs,
-                                                    getter_AddRefs(cursor));
-      NS_ENSURE_SUCCESS(rv, false);
-
-      MOZ_ASSERT(blobs.IsEmpty(), "Should have swapped blob elements!");
-    } break;
+  nsRefPtr<IDBCursor> cursor;
+  nsresult rv =
+    mObjectStore->OpenCursorFromChildProcess(request, direction, aParams.key(),
+                                             aParams.cloneInfo(), blobs,
+                                             getter_AddRefs(cursor));
+  NS_ENSURE_SUCCESS(rv, false);
 
-    case CursorUnionType::Tvoid_t:
-      MOZ_ASSERT(aParams.blobsChild().IsEmpty());
-
-      rv = mObjectStore->OpenCursorFromChildProcess(request, direction,
-                                                    aParams.key(),
-                                                    getter_AddRefs(cursor));
-      NS_ENSURE_SUCCESS(rv, false);
-      break;
-
-    default:
-      MOZ_CRASH("Unknown union type!");
-  }
+  MOZ_ASSERT(blobs.IsEmpty(), "Should have swapped blob elements!");
 
   actor->SetCursor(cursor);
   return true;
 }
 
 PIndexedDBRequestChild*
 IndexedDBObjectStoreChild::AllocPIndexedDBRequestChild(
                                         const ObjectStoreRequestParams& aParams)
@@ -1087,37 +1064,33 @@ IndexedDBObjectStoreRequestChild::Recv__
     case ResponseValue::Tnsresult:
       break;
     case ResponseValue::TGetResponse:
       MOZ_ASSERT(mRequestType == ParamsUnionType::TGetParams);
       break;
     case ResponseValue::TGetAllResponse:
       MOZ_ASSERT(mRequestType == ParamsUnionType::TGetAllParams);
       break;
-    case ResponseValue::TGetAllKeysResponse:
-      MOZ_ASSERT(mRequestType == ParamsUnionType::TGetAllKeysParams);
-      break;
     case ResponseValue::TAddResponse:
       MOZ_ASSERT(mRequestType == ParamsUnionType::TAddParams);
       break;
     case ResponseValue::TPutResponse:
       MOZ_ASSERT(mRequestType == ParamsUnionType::TPutParams);
       break;
     case ResponseValue::TDeleteResponse:
       MOZ_ASSERT(mRequestType == ParamsUnionType::TDeleteParams);
       break;
     case ResponseValue::TClearResponse:
       MOZ_ASSERT(mRequestType == ParamsUnionType::TClearParams);
       break;
     case ResponseValue::TCountResponse:
       MOZ_ASSERT(mRequestType == ParamsUnionType::TCountParams);
       break;
     case ResponseValue::TOpenCursorResponse:
-      MOZ_ASSERT(mRequestType == ParamsUnionType::TOpenCursorParams ||
-                 mRequestType == ParamsUnionType::TOpenKeyCursorParams);
+      MOZ_ASSERT(mRequestType == ParamsUnionType::TOpenCursorParams);
       break;
 
     default:
       MOZ_CRASH("Received invalid response parameters!");
   }
 
   nsresult rv = mHelper->OnParentProcessRequestComplete(aResponse);
   NS_ENSURE_SUCCESS(rv, false);
--- a/dom/indexedDB/ipc/IndexedDBParams.ipdlh
+++ b/dom/indexedDB/ipc/IndexedDBParams.ipdlh
@@ -1,17 +1,16 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 include "mozilla/dom/indexedDB/SerializationHelpers.h";
 
 using mozilla::dom::indexedDB::Key;
 using mozilla::dom::indexedDB::IDBCursor::Direction;
-using mozilla::dom::indexedDB::SerializedStructuredCloneReadInfo;
 
 using mozilla::void_t;
 
 namespace mozilla {
 namespace dom {
 namespace indexedDB {
 namespace ipc {
 
@@ -36,41 +35,23 @@ struct GetParams
 };
 
 struct GetAllParams
 {
   OptionalKeyRange optionalKeyRange;
   uint32_t limit;
 };
 
-struct GetAllKeysParams
-{
-  OptionalKeyRange optionalKeyRange;
-  uint32_t limit;
-};
-
 struct CountParams
 {
   OptionalKeyRange optionalKeyRange;
 };
 
 struct OpenCursorParams
 {
   OptionalKeyRange optionalKeyRange;
   Direction direction;
 };
 
-struct OpenKeyCursorParams
-{
-  OptionalKeyRange optionalKeyRange;
-  Direction direction;
-};
-
-union OptionalStructuredCloneReadInfo
-{
-  SerializedStructuredCloneReadInfo;
-  void_t;
-};
-
 } // namespace ipc
 } // namespace indexedDB
 } // namespace dom
 } // namespace mozilla
--- a/dom/indexedDB/ipc/IndexedDBParent.cpp
+++ b/dom/indexedDB/ipc/IndexedDBParent.cpp
@@ -1092,19 +1092,16 @@ IndexedDBObjectStoreParent::RecvPIndexed
 
   switch (aParams.type()) {
     case ObjectStoreRequestParams::TGetParams:
       return actor->Get(aParams.get_GetParams());
 
     case ObjectStoreRequestParams::TGetAllParams:
       return actor->GetAll(aParams.get_GetAllParams());
 
-    case ObjectStoreRequestParams::TGetAllKeysParams:
-      return actor->GetAllKeys(aParams.get_GetAllKeysParams());
-
     case ObjectStoreRequestParams::TAddParams:
       return actor->Add(aParams.get_AddParams());
 
     case ObjectStoreRequestParams::TPutParams:
       return actor->Put(aParams.get_PutParams());
 
     case ObjectStoreRequestParams::TDeleteParams:
       return actor->Delete(aParams.get_DeleteParams());
@@ -1113,19 +1110,16 @@ IndexedDBObjectStoreParent::RecvPIndexed
       return actor->Clear(aParams.get_ClearParams());
 
     case ObjectStoreRequestParams::TCountParams:
       return actor->Count(aParams.get_CountParams());
 
     case ObjectStoreRequestParams::TOpenCursorParams:
       return actor->OpenCursor(aParams.get_OpenCursorParams());
 
-    case ObjectStoreRequestParams::TOpenKeyCursorParams:
-      return actor->OpenKeyCursor(aParams.get_OpenKeyCursorParams());
-
     default:
       MOZ_CRASH("Unknown type!");
   }
 
   MOZ_CRASH("Should never get here!");
 }
 
 bool
@@ -1556,54 +1550,16 @@ IndexedDBObjectStoreRequestParent::GetAl
   }
 
   request->SetActor(this);
   mRequest.swap(request);
   return true;
 }
 
 bool
-IndexedDBObjectStoreRequestParent::GetAllKeys(const GetAllKeysParams& aParams)
-{
-  MOZ_ASSERT(mRequestType == ParamsUnionType::TGetAllKeysParams);
-  MOZ_ASSERT(mObjectStore);
-
-  nsRefPtr<IDBRequest> request;
-
-  const ipc::OptionalKeyRange keyRangeUnion = aParams.optionalKeyRange();
-
-  nsRefPtr<IDBKeyRange> keyRange;
-
-  switch (keyRangeUnion.type()) {
-    case ipc::OptionalKeyRange::TKeyRange:
-      keyRange =
-        IDBKeyRange::FromSerializedKeyRange(keyRangeUnion.get_KeyRange());
-      break;
-
-    case ipc::OptionalKeyRange::Tvoid_t:
-      break;
-
-    default:
-      MOZ_CRASH("Unknown param type!");
-  }
-
-  {
-    AutoSetCurrentTransaction asct(mObjectStore->Transaction());
-
-    ErrorResult rv;
-    request = mObjectStore->GetAllKeysInternal(keyRange, aParams.limit(), rv);
-    ENSURE_SUCCESS(rv, false);
-  }
-
-  request->SetActor(this);
-  mRequest.swap(request);
-  return true;
-}
-
-bool
 IndexedDBObjectStoreRequestParent::Add(const AddParams& aParams)
 {
   MOZ_ASSERT(mRequestType == ParamsUnionType::TAddParams);
   MOZ_ASSERT(mObjectStore);
 
   ipc::AddPutParams params = aParams.commonParams();
 
   nsTArray<nsCOMPtr<nsIDOMBlob> > blobs;
@@ -1773,57 +1729,16 @@ IndexedDBObjectStoreRequestParent::OpenC
     ENSURE_SUCCESS(rv, false);
   }
 
   request->SetActor(this);
   mRequest.swap(request);
   return true;
 }
 
-bool
-IndexedDBObjectStoreRequestParent::OpenKeyCursor(
-                                             const OpenKeyCursorParams& aParams)
-{
-  MOZ_ASSERT(mRequestType == ParamsUnionType::TOpenKeyCursorParams);
-  MOZ_ASSERT(mObjectStore);
-
-  const ipc::OptionalKeyRange keyRangeUnion = aParams.optionalKeyRange();
-
-  nsRefPtr<IDBKeyRange> keyRange;
-
-  switch (keyRangeUnion.type()) {
-    case ipc::OptionalKeyRange::TKeyRange:
-      keyRange =
-        IDBKeyRange::FromSerializedKeyRange(keyRangeUnion.get_KeyRange());
-      break;
-
-    case ipc::OptionalKeyRange::Tvoid_t:
-      break;
-
-    default:
-      MOZ_CRASH("Unknown param type!");
-  }
-
-  size_t direction = static_cast<size_t>(aParams.direction());
-
-  nsRefPtr<IDBRequest> request;
-
-  {
-    AutoSetCurrentTransaction asct(mObjectStore->Transaction());
-
-    ErrorResult rv;
-    request = mObjectStore->OpenKeyCursorInternal(keyRange, direction, rv);
-    ENSURE_SUCCESS(rv, false);
-  }
-
-  request->SetActor(this);
-  mRequest.swap(request);
-  return true;
-}
-
 /*******************************************************************************
  * IndexedDBIndexRequestParent
  ******************************************************************************/
 
 IndexedDBIndexRequestParent::IndexedDBIndexRequestParent(
                                                        IDBIndex* aIndex,
                                                        RequestType aRequestType)
 : mIndex(aIndex), mRequestType(aRequestType)
--- a/dom/indexedDB/ipc/IndexedDBParent.h
+++ b/dom/indexedDB/ipc/IndexedDBParent.h
@@ -702,36 +702,31 @@ class IndexedDBObjectStoreRequestParent 
   DebugOnly<RequestType> mRequestType;
 
   typedef ipc::AddParams AddParams;
   typedef ipc::PutParams PutParams;
   typedef ipc::ClearParams ClearParams;
   typedef ipc::DeleteParams DeleteParams;
   typedef ipc::GetParams GetParams;
   typedef ipc::GetAllParams GetAllParams;
-  typedef ipc::GetAllKeysParams GetAllKeysParams;
   typedef ipc::CountParams CountParams;
   typedef ipc::OpenCursorParams OpenCursorParams;
-  typedef ipc::OpenKeyCursorParams OpenKeyCursorParams;
 
 public:
   IndexedDBObjectStoreRequestParent(IDBObjectStore* aObjectStore,
                                     RequestType aRequestType);
   virtual ~IndexedDBObjectStoreRequestParent();
 
   bool
   Get(const GetParams& aParams);
 
   bool
   GetAll(const GetAllParams& aParams);
 
   bool
-  GetAllKeys(const GetAllKeysParams& aParams);
-
-  bool
   Add(const AddParams& aParams);
 
   bool
   Put(const PutParams& aParams);
 
   bool
   Delete(const DeleteParams& aParams);
 
@@ -739,19 +734,16 @@ public:
   Clear(const ClearParams& aParams);
 
   bool
   Count(const CountParams& aParams);
 
   bool
   OpenCursor(const OpenCursorParams& aParams);
 
-  bool
-  OpenKeyCursor(const OpenKeyCursorParams& aParams);
-
 protected:
   void
   ConvertBlobActors(const InfallibleTArray<PBlobParent*>& aActors,
                     nsTArray<nsCOMPtr<nsIDOMBlob> >& aBlobs);
 
 private:
   virtual bool
   IsDisconnected() MOZ_OVERRIDE;
--- a/dom/indexedDB/ipc/PIndexedDBIndex.ipdl
+++ b/dom/indexedDB/ipc/PIndexedDBIndex.ipdl
@@ -4,38 +4,58 @@
 
 include protocol PBlob;
 include protocol PIndexedDBCursor;
 include protocol PIndexedDBObjectStore;
 include protocol PIndexedDBRequest;
 
 include IndexedDBParams;
 
+using mozilla::dom::indexedDB::SerializedStructuredCloneReadInfo;
+
 namespace mozilla {
 namespace dom {
 namespace indexedDB {
 
 namespace ipc {
 
 struct GetKeyParams
 {
   KeyRange keyRange;
 };
 
+struct GetAllKeysParams
+{
+  OptionalKeyRange optionalKeyRange;
+  uint32_t limit;
+};
+
+struct OpenKeyCursorParams
+{
+  OptionalKeyRange optionalKeyRange;
+  Direction direction;
+};
+
 union IndexRequestParams
 {
   GetParams;
   GetKeyParams;
   GetAllParams;
   GetAllKeysParams;
   CountParams;
   OpenCursorParams;
   OpenKeyCursorParams;
 };
 
+union OptionalStructuredCloneReadInfo
+{
+  SerializedStructuredCloneReadInfo;
+  void_t;
+};
+
 struct IndexCursorConstructorParams
 {
   PIndexedDBRequest request;
   Direction direction;
   Key key;
   Key objectKey;
   OptionalStructuredCloneReadInfo optionalCloneInfo;
   PBlob[] blobs;
--- a/dom/indexedDB/ipc/PIndexedDBObjectStore.ipdl
+++ b/dom/indexedDB/ipc/PIndexedDBObjectStore.ipdl
@@ -7,16 +7,17 @@ include protocol PIndexedDBCursor;
 include protocol PIndexedDBIndex;
 include protocol PIndexedDBRequest;
 include protocol PIndexedDBTransaction;
 
 include IndexedDBParams;
 
 using mozilla::dom::indexedDB::IndexInfo;
 using mozilla::dom::indexedDB::IndexUpdateInfo;
+using mozilla::dom::indexedDB::SerializedStructuredCloneReadInfo;
 using mozilla::dom::indexedDB::SerializedStructuredCloneWriteInfo;
 
 namespace mozilla {
 namespace dom {
 namespace indexedDB {
 
 namespace ipc {
 
@@ -46,24 +47,22 @@ struct DeleteParams
 struct ClearParams
 {
 };
 
 union ObjectStoreRequestParams
 {
   GetParams;
   GetAllParams;
-  GetAllKeysParams;
   AddParams;
   PutParams;
   DeleteParams;
   ClearParams;
   CountParams;
   OpenCursorParams;
-  OpenKeyCursorParams;
 };
 
 struct CreateIndexParams
 {
   IndexInfo info;
 };
 
 struct GetIndexParams
@@ -77,17 +76,17 @@ union IndexConstructorParams
   GetIndexParams;
 };
 
 struct ObjectStoreCursorConstructorParams
 {
   PIndexedDBRequest request;
   Direction direction;
   Key key;
-  OptionalStructuredCloneReadInfo optionalCloneInfo;
+  SerializedStructuredCloneReadInfo cloneInfo;
   PBlob[] blobs;
 };
 
 } // namespace ipc
 
 protocol PIndexedDBObjectStore
 {
   manager PIndexedDBTransaction;
--- a/dom/indexedDB/ipc/unit/xpcshell.ini
+++ b/dom/indexedDB/ipc/unit/xpcshell.ini
@@ -31,19 +31,17 @@ tail =
 [test_indexes.js]
 [test_indexes_bad_values.js]
 [test_key_requirements.js]
 [test_keys.js]
 [test_multientry.js]
 [test_names_sorted.js]
 [test_object_identity.js]
 [test_objectCursors.js]
-[test_objectStore_getAllKeys.js]
 [test_objectStore_inline_autoincrement_key_added_on_put.js]
-[test_objectStore_openKeyCursor.js]
 [test_objectStore_remove_values.js]
 [test_odd_result_order.js]
 [test_open_empty_db.js]
 [test_open_objectStore.js]
 [test_optionalArguments.js]
 [test_overlapping_transactions.js]
 [test_put_get_values.js]
 [test_put_get_values_autoIncrement.js]
--- a/dom/indexedDB/test/Makefile.in
+++ b/dom/indexedDB/test/Makefile.in
@@ -65,19 +65,17 @@ MOCHITEST_FILES = \
   test_invalid_version.html \
   test_key_requirements.html \
   test_keys.html \
   test_leaving_page.html \
   test_lowDiskSpace.html \
   test_multientry.html \
   test_names_sorted.html \
   test_objectCursors.html \
-  test_objectStore_getAllKeys.html \
   test_objectStore_inline_autoincrement_key_added_on_put.html \
-  test_objectStore_openKeyCursor.html \
   test_objectStore_remove_values.html \
   test_object_identity.html \
   test_odd_result_order.html \
   test_open_empty_db.html \
   test_open_for_principal.html \
   test_open_objectStore.html \
   test_optionalArguments.html \
   test_overlapping_transactions.html \
deleted file mode 100644
--- a/dom/indexedDB/test/test_objectStore_getAllKeys.html
+++ /dev/null
@@ -1,19 +0,0 @@
-<!--
-  Any copyright is dedicated to the Public Domain.
-  http://creativecommons.org/publicdomain/zero/1.0/
--->
-<html>
-<head>
-  <title>Indexed Database Property Test</title>
-
-  <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
-  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
-
-  <script type="text/javascript;version=1.7" src="unit/test_objectStore_getAllKeys.js"></script>
-  <script type="text/javascript;version=1.7" src="helpers.js"></script>
-
-</head>
-
-<body onload="runTest();"></body>
-
-</html>
deleted file mode 100644
--- a/dom/indexedDB/test/test_objectStore_openKeyCursor.html
+++ /dev/null
@@ -1,19 +0,0 @@
-<!--
-  Any copyright is dedicated to the Public Domain.
-  http://creativecommons.org/publicdomain/zero/1.0/
--->
-<html>
-<head>
-  <title>Indexed Database Property Test</title>
-
-  <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
-  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
-
-  <script type="text/javascript;version=1.7" src="unit/test_objectStore_openKeyCursor.js"></script>
-  <script type="text/javascript;version=1.7" src="helpers.js"></script>
-
-</head>
-
-<body onload="runTest();"></body>
-
-</html>
--- a/dom/indexedDB/test/unit/Makefile.in
+++ b/dom/indexedDB/test/unit/Makefile.in
@@ -33,19 +33,17 @@ MOCHITEST_FILES = \
   test_invalid_version.js \
   test_key_requirements.js \
   test_keys.js \
   test_lowDiskSpace.js \
   test_multientry.js \
   test_names_sorted.js \
   test_object_identity.js \
   test_objectCursors.js \
-  test_objectStore_getAllKeys.js \
   test_objectStore_inline_autoincrement_key_added_on_put.js \
-  test_objectStore_openKeyCursor.js \
   test_objectStore_remove_values.js \
   test_odd_result_order.js \
   test_open_empty_db.js \
   test_open_for_principal.js \
   test_open_objectStore.js \
   test_optionalArguments.js \
   test_overlapping_transactions.js \
   test_persistenceType.js \
deleted file mode 100644
--- a/dom/indexedDB/test/unit/test_objectStore_getAllKeys.js
+++ /dev/null
@@ -1,123 +0,0 @@
-/**
- * Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-let testGenerator = testSteps();
-
-function testSteps() {
-  const dbName = this.window ?
-                 window.location.pathname :
-                 "test_objectStore_getAllKeys";
-  const dbVersion = 1;
-  const objectStoreName = "foo";
-  const keyCount = 200;
-
-  let request = indexedDB.open(dbName, dbVersion);
-  request.onerror = errorHandler;
-  request.onupgradeneeded = grabEventAndContinueHandler;
-  request.onsuccess = unexpectedSuccessHandler;
-
-  let event = yield undefined;
-
-  info("Creating database");
-
-  let db = event.target.result;
-  let objectStore = db.createObjectStore(objectStoreName);
-  for (let i = 0; i < keyCount; i++) {
-    objectStore.add(true, i);
-  }
-
-  request.onupgradeneeded = unexpectedSuccessHandler;
-  request.onsuccess = grabEventAndContinueHandler;
-
-  event = yield undefined;
-
-  db = event.target.result;
-  objectStore = db.transaction(objectStoreName).objectStore(objectStoreName);
-
-  info("Getting all keys");
-  objectStore.getAllKeys().onsuccess = grabEventAndContinueHandler;
-  event = yield undefined;
-
-  ok(Array.isArray(event.target.result), "Got an array result");
-  is(event.target.result.length, keyCount, "Got correct array length");
-
-  let match = true;
-  for (let i = 0; i < keyCount; i++) {
-    if (event.target.result[i] != i) {
-      match = false;
-      break;
-    }
-  }
-  ok(match, "Got correct keys");
-
-  info("Getting all keys with key range");
-  let keyRange = IDBKeyRange.bound(10, 20, false, true);
-  objectStore.getAllKeys(keyRange).onsuccess = grabEventAndContinueHandler;
-  event = yield undefined;
-
-  ok(Array.isArray(event.target.result), "Got an array result");
-  is(event.target.result.length, 10, "Got correct array length");
-
-  match = true;
-  for (let i = 10; i < 20; i++) {
-    if (event.target.result[i - 10] != i) {
-      match = false;
-      break;
-    }
-  }
-  ok(match, "Got correct keys");
-
-  info("Getting all keys with unmatched key range");
-  keyRange = IDBKeyRange.bound(10000, 200000);
-  objectStore.getAllKeys(keyRange).onsuccess = grabEventAndContinueHandler;
-  event = yield undefined;
-
-  ok(Array.isArray(event.target.result), "Got an array result");
-  is(event.target.result.length, 0, "Got correct array length");
-
-  info("Getting all keys with limit");
-  objectStore.getAllKeys(null, 5).onsuccess = grabEventAndContinueHandler;
-  event = yield undefined;
-
-  ok(Array.isArray(event.target.result), "Got an array result");
-  is(event.target.result.length, 5, "Got correct array length");
-
-  match = true;
-  for (let i = 0; i < 5; i++) {
-    if (event.target.result[i] != i) {
-      match = false;
-      break;
-    }
-  }
-  ok(match, "Got correct keys");
-
-  info("Getting all keys with key range and limit");
-  keyRange = IDBKeyRange.bound(10, 20, false, true);
-  objectStore.getAllKeys(keyRange, 5).onsuccess = grabEventAndContinueHandler;
-  event = yield undefined;
-
-  ok(Array.isArray(event.target.result), "Got an array result");
-  is(event.target.result.length, 5, "Got correct array length");
-
-  match = true;
-  for (let i = 10; i < 15; i++) {
-    if (event.target.result[i - 10] != i) {
-      match = false;
-      break;
-    }
-  }
-  ok(match, "Got correct keys");
-
-  info("Getting all keys with unmatched key range and limit");
-  keyRange = IDBKeyRange.bound(10000, 200000);
-  objectStore.getAllKeys(keyRange, 5).onsuccess = grabEventAndContinueHandler;
-  event = yield undefined;
-
-  ok(Array.isArray(event.target.result), "Got an array result");
-  is(event.target.result.length, 0, "Got correct array length");
-
-  finishTest();
-  yield undefined;
-}
deleted file mode 100644
--- a/dom/indexedDB/test/unit/test_objectStore_openKeyCursor.js
+++ /dev/null
@@ -1,400 +0,0 @@
-/**
- * Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-let testGenerator = testSteps();
-
-function testSteps() {
-  const dbName = this.window ?
-                 window.location.pathname :
-                 "test_objectStore_openKeyCursor";
-  const dbVersion = 1;
-  const objectStoreName = "foo";
-  const keyCount = 100;
-
-  let request = indexedDB.open(dbName, dbVersion);
-  request.onerror = errorHandler;
-  request.onupgradeneeded = grabEventAndContinueHandler;
-  request.onsuccess = unexpectedSuccessHandler;
-
-  let event = yield undefined;
-
-  info("Creating database");
-
-  let db = event.target.result;
-  let objectStore = db.createObjectStore(objectStoreName);
-  for (let i = 0; i < keyCount; i++) {
-    objectStore.add(true, i);
-  }
-
-  request.onupgradeneeded = unexpectedSuccessHandler;
-  request.onsuccess = grabEventAndContinueHandler;
-
-  event = yield undefined;
-
-  db = event.target.result;
-  objectStore = db.transaction(objectStoreName, "readwrite")
-                  .objectStore(objectStoreName);
-
-  info("Getting all keys");
-  objectStore.getAllKeys().onsuccess = grabEventAndContinueHandler;
-  event = yield undefined;
-
-  const allKeys = event.target.result;
-
-  ok(Array.isArray(allKeys), "Got an array result");
-  is(allKeys.length, keyCount, "Got correct array length");
-
-  info("Opening normal key cursor");
-
-  let seenKeys = [];
-  objectStore.openKeyCursor().onsuccess = event => {
-    let cursor = event.target.result;
-    if (!cursor) {
-      continueToNextStepSync();
-      return;
-    }
-
-    is(cursor.source, objectStore, "Correct source");
-    is(cursor.direction, "next", "Correct direction");
-
-    let exception = null;
-    try {
-      cursor.update(10);
-    } catch(e) {
-      exception = e;
-    }
-    ok(!!exception, "update() throws for key cursor");
-
-    exception = null;
-    try {
-      cursor.delete();
-    } catch(e) {
-      exception = e;
-    }
-    ok(!!exception, "delete() throws for key cursor");
-
-    is(cursor.key, cursor.primaryKey, "key and primaryKey match");
-    ok(!("value" in cursor), "No 'value' property on key cursor");
-
-    seenKeys.push(cursor.key);
-    cursor.continue();
-  };
-  yield undefined;
-
-  is(seenKeys.length, allKeys.length, "Saw the right number of keys");
-
-  let match = true;
-  for (let i = 0; i < seenKeys.length; i++) {
-    if (seenKeys[i] !== allKeys[i]) {
-      match = false;
-      break;
-    }
-  }
-  ok(match, "All keys matched");
-
-  info("Opening key cursor with keyRange");
-
-  let keyRange = IDBKeyRange.bound(10, 20, false, true);
-
-  seenKeys = [];
-  objectStore.openKeyCursor(keyRange).onsuccess = event => {
-    let cursor = event.target.result;
-    if (!cursor) {
-      continueToNextStepSync();
-      return;
-    }
-
-    is(cursor.source, objectStore, "Correct source");
-    is(cursor.direction, "next", "Correct direction");
-
-    let exception = null;
-    try {
-      cursor.update(10);
-    } catch(e) {
-      exception = e;
-    }
-    ok(!!exception, "update() throws for key cursor");
-
-    exception = null;
-    try {
-      cursor.delete();
-    } catch(e) {
-      exception = e;
-    }
-    ok(!!exception, "delete() throws for key cursor");
-
-    is(cursor.key, cursor.primaryKey, "key and primaryKey match");
-    ok(!("value" in cursor), "No 'value' property on key cursor");
-
-    seenKeys.push(cursor.key);
-    cursor.continue();
-  };
-  yield undefined;
-
-  is(seenKeys.length, 10, "Saw the right number of keys");
-
-  match = true;
-  for (let i = 0; i < seenKeys.length; i++) {
-    if (seenKeys[i] !== allKeys[i + 10]) {
-      match = false;
-      break;
-    }
-  }
-  ok(match, "All keys matched");
-
-  info("Opening key cursor with unmatched keyRange");
-
-  keyRange = IDBKeyRange.bound(10000, 200000);
-
-  seenKeys = [];
-  objectStore.openKeyCursor(keyRange).onsuccess = event => {
-    let cursor = event.target.result;
-    if (!cursor) {
-      continueToNextStepSync();
-      return;
-    }
-
-    ok(false, "Shouldn't have any keys here");
-    cursor.continue();
-  };
-  yield undefined;
-
-  is(seenKeys.length, 0, "Saw the right number of keys");
-
-  info("Opening reverse key cursor");
-
-  seenKeys = [];
-  objectStore.openKeyCursor(null, "prev").onsuccess = event => {
-    let cursor = event.target.result;
-    if (!cursor) {
-      continueToNextStepSync();
-      return;
-    }
-
-    is(cursor.source, objectStore, "Correct source");
-    is(cursor.direction, "prev", "Correct direction");
-
-    let exception = null;
-    try {
-      cursor.update(10);
-    } catch(e) {
-      exception = e;
-    }
-    ok(!!exception, "update() throws for key cursor");
-
-    exception = null;
-    try {
-      cursor.delete();
-    } catch(e) {
-      exception = e;
-    }
-    ok(!!exception, "delete() throws for key cursor");
-
-    is(cursor.key, cursor.primaryKey, "key and primaryKey match");
-    ok(!("value" in cursor), "No 'value' property on key cursor");
-
-    seenKeys.push(cursor.key);
-    cursor.continue();
-  };
-  yield undefined;
-
-  is(seenKeys.length, allKeys.length, "Saw the right number of keys");
-
-  seenKeys.reverse();
-
-  match = true;
-  for (let i = 0; i < seenKeys.length; i++) {
-    if (seenKeys[i] !== allKeys[i]) {
-      match = false;
-      break;
-    }
-  }
-  ok(match, "All keys matched");
-
-  info("Opening reverse key cursor with key range");
-
-  keyRange = IDBKeyRange.bound(10, 20, false, true);
-
-  seenKeys = [];
-  objectStore.openKeyCursor(keyRange, "prev").onsuccess = event => {
-    let cursor = event.target.result;
-    if (!cursor) {
-      continueToNextStepSync();
-      return;
-    }
-
-    is(cursor.source, objectStore, "Correct source");
-    is(cursor.direction, "prev", "Correct direction");
-
-    let exception = null;
-    try {
-      cursor.update(10);
-    } catch(e) {
-      exception = e;
-    }
-    ok(!!exception, "update() throws for key cursor");
-
-    exception = null;
-    try {
-      cursor.delete();
-    } catch(e) {
-      exception = e;
-    }
-    ok(!!exception, "delete() throws for key cursor");
-
-    is(cursor.key, cursor.primaryKey, "key and primaryKey match");
-    ok(!("value" in cursor), "No 'value' property on key cursor");
-
-    seenKeys.push(cursor.key);
-    cursor.continue();
-  };
-  yield undefined;
-
-  is(seenKeys.length, 10, "Saw the right number of keys");
-
-  seenKeys.reverse();
-
-  match = true;
-  for (let i = 0; i < 10; i++) {
-    if (seenKeys[i] !== allKeys[i + 10]) {
-      match = false;
-      break;
-    }
-  }
-  ok(match, "All keys matched");
-
-  info("Opening reverse key cursor with unmatched key range");
-
-  keyRange = IDBKeyRange.bound(10000, 200000);
-
-  seenKeys = [];
-  objectStore.openKeyCursor(keyRange, "prev").onsuccess = event => {
-    let cursor = event.target.result;
-    if (!cursor) {
-      continueToNextStepSync();
-      return;
-    }
-
-    ok(false, "Shouldn't have any keys here");
-    cursor.continue();
-  };
-  yield undefined;
-
-  is(seenKeys.length, 0, "Saw the right number of keys");
-
-  info("Opening key cursor with advance");
-
-  seenKeys = [];
-  objectStore.openKeyCursor().onsuccess = event => {
-    let cursor = event.target.result;
-    if (!cursor) {
-      continueToNextStepSync();
-      return;
-    }
-
-    is(cursor.source, objectStore, "Correct source");
-    is(cursor.direction, "next", "Correct direction");
-
-    let exception = null;
-    try {
-      cursor.update(10);
-    } catch(e) {
-      exception = e;
-    }
-    ok(!!exception, "update() throws for key cursor");
-
-    exception = null;
-    try {
-      cursor.delete();
-    } catch(e) {
-      exception = e;
-    }
-    ok(!!exception, "delete() throws for key cursor");
-
-    is(cursor.key, cursor.primaryKey, "key and primaryKey match");
-    ok(!("value" in cursor), "No 'value' property on key cursor");
-
-    seenKeys.push(cursor.key);
-    if (seenKeys.length == 1) {
-      cursor.advance(10);
-    } else {
-      cursor.continue();
-    }
-  };
-  yield undefined;
-
-  is(seenKeys.length, allKeys.length - 9, "Saw the right number of keys");
-
-  let match = true;
-  for (let i = 0, j = 0; i < seenKeys.length; i++) {
-    if (seenKeys[i] !== allKeys[i + j]) {
-      match = false;
-      break;
-    }
-    if (i == 0) {
-      j = 9;
-    }
-  }
-  ok(match, "All keys matched");
-
-  info("Opening key cursor with continue-to-key");
-
-  seenKeys = [];
-  objectStore.openKeyCursor().onsuccess = event => {
-    let cursor = event.target.result;
-    if (!cursor) {
-      continueToNextStepSync();
-      return;
-    }
-
-    is(cursor.source, objectStore, "Correct source");
-    is(cursor.direction, "next", "Correct direction");
-
-    let exception = null;
-    try {
-      cursor.update(10);
-    } catch(e) {
-      exception = e;
-    }
-    ok(!!exception, "update() throws for key cursor");
-
-    exception = null;
-    try {
-      cursor.delete();
-    } catch(e) {
-      exception = e;
-    }
-    ok(!!exception, "delete() throws for key cursor");
-
-    is(cursor.key, cursor.primaryKey, "key and primaryKey match");
-    ok(!("value" in cursor), "No 'value' property on key cursor");
-
-    seenKeys.push(cursor.key);
-
-    if (seenKeys.length == 1) {
-      cursor.continue(10);
-    } else {
-      cursor.continue();
-    }
-  };
-  yield undefined;
-
-  is(seenKeys.length, allKeys.length - 9, "Saw the right number of keys");
-
-  let match = true;
-  for (let i = 0, j = 0; i < seenKeys.length; i++) {
-    if (seenKeys[i] !== allKeys[i + j]) {
-      match = false;
-      break;
-    }
-    if (i == 0) {
-      j = 9;
-    }
-  }
-  ok(match, "All keys matched");
-
-  finishTest();
-  yield undefined;
-}
--- a/dom/indexedDB/test/unit/xpcshell.ini
+++ b/dom/indexedDB/test/unit/xpcshell.ini
@@ -34,19 +34,17 @@ tail =
 [test_invalid_version.js]
 [test_key_requirements.js]
 [test_keys.js]
 [test_lowDiskSpace.js]
 [test_multientry.js]
 [test_names_sorted.js]
 [test_object_identity.js]
 [test_objectCursors.js]
-[test_objectStore_getAllKeys.js]
 [test_objectStore_inline_autoincrement_key_added_on_put.js]
-[test_objectStore_openKeyCursor.js]
 [test_objectStore_remove_values.js]
 [test_odd_result_order.js]
 [test_open_empty_db.js]
 [test_open_for_principal.js]
 [test_open_objectStore.js]
 [test_optionalArguments.js]
 [test_overlapping_transactions.js]
 [test_persistenceType.js]
--- a/dom/webidl/IDBObjectStore.webidl
+++ b/dom/webidl/IDBObjectStore.webidl
@@ -60,18 +60,9 @@ interface IDBObjectStore {
     [Throws]
     IDBRequest count (optional any key);
 };
 
 partial interface IDBObjectStore {
     // Success fires IDBTransactionEvent, result == array of values for given keys
     [Throws]
     IDBRequest mozGetAll (optional any key, optional unsigned long limit);
-
-    [Pref="dom.indexedDB.experimental", Throws]
-    IDBRequest getAll (optional any key, optional unsigned long limit);
-
-    [Pref="dom.indexedDB.experimental", Throws]
-    IDBRequest getAllKeys (optional any key, optional unsigned long limit);
-
-    [Pref="dom.indexedDB.experimental", Throws]
-    IDBRequest openKeyCursor (optional any range, optional IDBCursorDirection direction = "next");
 };
--- a/js/xpconnect/src/XPCRuntimeService.cpp
+++ b/js/xpconnect/src/XPCRuntimeService.cpp
@@ -1,25 +1,22 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
  *
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
+#include "mozilla/dom/workers/Workers.h"
 #include "nsContentUtils.h"
 #include "BackstagePass.h"
 #include "nsIProgrammingLanguage.h"
 #include "nsDOMClassInfo.h"
 #include "nsIPrincipal.h"
 
-#include "mozilla/dom/indexedDB/IndexedDatabaseManager.h"
-#include "mozilla/dom/workers/Workers.h"
-
 using mozilla::dom::workers::ResolveWorkerClasses;
-namespace indexedDB = mozilla::dom::indexedDB;
 
 NS_INTERFACE_MAP_BEGIN(BackstagePass)
   NS_INTERFACE_MAP_ENTRY(nsIGlobalObject)
   NS_INTERFACE_MAP_ENTRY(nsIXPCScriptable)
   NS_INTERFACE_MAP_ENTRY(nsIClassInfo)
   NS_INTERFACE_MAP_ENTRY(nsIScriptObjectPrincipal)
   NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference)
   NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIXPCScriptable)
@@ -50,44 +47,31 @@ BackstagePass::NewResolve(nsIXPConnectWr
                           JSContext * cx, JSObject * objArg,
                           jsid idArg, uint32_t flags,
                           JSObject * *objpArg, bool *_retval)
 {
     JS::RootedObject obj(cx, objArg);
     JS::RootedId id(cx, idArg);
 
     bool resolved;
-    *objpArg = nullptr;
 
     *_retval = !!JS_ResolveStandardClass(cx, obj, id, &resolved);
-    NS_ENSURE_TRUE(*_retval, NS_ERROR_FAILURE);
+    if (!*_retval) {
+        *objpArg = nullptr;
+        return NS_OK;
+    }
 
     if (resolved) {
         *objpArg = obj;
         return NS_OK;
     }
 
     JS::RootedObject objp(cx, *objpArg);
-
-    *_retval = ResolveWorkerClasses(cx, obj, id, flags, &objp);
-    NS_ENSURE_TRUE(*_retval, NS_ERROR_FAILURE);
-
-    if (objp) {
-        *objpArg = objp;
-        return NS_OK;
-    }
-
-    *_retval = indexedDB::ResolveConstructors(cx, obj, id, &objp);
-    NS_ENSURE_TRUE(*_retval, NS_ERROR_FAILURE);
-
-    if (objp) {
-        *objpArg = objp;
-        return NS_OK;
-    }
-
+    *_retval = !!ResolveWorkerClasses(cx, obj, id, flags, &objp);
+    *objpArg = objp;
     return NS_OK;
 }
 
 /***************************************************************************/
 /* void getInterfaces (out uint32_t count, [array, size_is (count), retval]
                        out nsIIDPtr array); */
 NS_IMETHODIMP
 BackstagePass::GetInterfaces(uint32_t *aCount, nsIID * **aArray)
--- a/js/xpconnect/src/nsXPConnect.cpp
+++ b/js/xpconnect/src/nsXPConnect.cpp
@@ -25,16 +25,22 @@
 #ifdef MOZ_JSDEBUGGER
 #include "jsdIDebuggerService.h"
 #endif
 
 #include "XPCQuickStubs.h"
 
 #include "mozilla/dom/BindingUtils.h"
 #include "mozilla/dom/Exceptions.h"
+#include "mozilla/dom/IDBIndexBinding.h"
+#include "mozilla/dom/IDBObjectStoreBinding.h"
+#include "mozilla/dom/IDBOpenDBRequestBinding.h"
+#include "mozilla/dom/IDBRequestBinding.h"
+#include "mozilla/dom/IDBTransactionBinding.h"
+#include "mozilla/dom/IDBVersionChangeEventBinding.h"
 #include "mozilla/dom/TextDecoderBinding.h"
 #include "mozilla/dom/TextEncoderBinding.h"
 #include "mozilla/dom/DOMErrorBinding.h"
 
 #include "nsDOMMutationObserver.h"
 #include "nsICycleCollectorListener.h"
 #include "nsThread.h"
 #include "mozilla/XPTInterfaceInfoManager.h"
@@ -519,21 +525,23 @@ nsXPConnect::InitClassesWithNewWrappedGl
     }
 
     // Stuff coming through this path always ends up as a DOM global.
     // XXX Someone who knows why we can assert this should re-check
     //     (after bug 720580).
     MOZ_ASSERT(js::GetObjectClass(global)->flags & JSCLASS_DOM_GLOBAL);
 
     // Init WebIDL binding constructors wanted on all XPConnect globals.
-    // Additional bindings may be created lazily, see BackstagePass::NewResolve.
-    //
-    // XXX Please do not add any additional classes here without the approval of
-    //     the XPConnect module owner.
-    if (!TextDecoderBinding::GetConstructorObject(aJSContext, global) ||
+    if (!IDBIndexBinding::GetConstructorObject(aJSContext, global) ||
+        !IDBObjectStoreBinding::GetConstructorObject(aJSContext, global) ||
+        !IDBOpenDBRequestBinding::GetConstructorObject(aJSContext, global) ||
+        !IDBRequestBinding::GetConstructorObject(aJSContext, global) ||
+        !IDBTransactionBinding::GetConstructorObject(aJSContext, global) ||
+        !IDBVersionChangeEventBinding::GetConstructorObject(aJSContext, global) ||
+        !TextDecoderBinding::GetConstructorObject(aJSContext, global) ||
         !TextEncoderBinding::GetConstructorObject(aJSContext, global) ||
         !DOMErrorBinding::GetConstructorObject(aJSContext, global)) {
         return UnexpectedFailure(NS_ERROR_FAILURE);
     }
 
     wrappedGlobal.forget(_retval);
     return NS_OK;
 }