Bug 574811 - Rename IDBCursorRequest to IDBCursor
authorShawn Wilsher <sdwilsh@shawnwilsher.com>
Mon, 28 Jun 2010 11:51:06 -0700
changeset 46362 b2fa82bc1a645f41f554c78fe935d5de70626aaf
parent 46361 6052456fb2882f4761b290a4b972d8a420003063
child 46364 c3780365fd0733021b6d55329aa17152df9128da
push idunknown
push userunknown
push dateunknown
bugs574811
milestone1.9.3a6pre
Bug 574811 - Rename IDBCursorRequest to IDBCursor Updating interface names per recent specification changes. r=bent
dom/base/nsDOMClassInfo.cpp
dom/base/nsDOMClassInfoClasses.h
dom/indexedDB/IDBCursor.cpp
dom/indexedDB/IDBCursor.h
dom/indexedDB/IDBCursorRequest.cpp
dom/indexedDB/IDBCursorRequest.h
dom/indexedDB/IDBIndex.cpp
dom/indexedDB/IDBObjectStore.cpp
dom/indexedDB/IDBTransaction.cpp
dom/indexedDB/Makefile.in
dom/indexedDB/nsIIDBCursor.idl
dom/indexedDB/nsIIDBCursorRequest.idl
dom/indexedDB/nsIIDBObjectStore.idl
js/src/xpconnect/src/dom_quickstubs.qsconf
--- a/dom/base/nsDOMClassInfo.cpp
+++ b/dom/base/nsDOMClassInfo.cpp
@@ -480,17 +480,17 @@
 using namespace mozilla::dom;
 
 #include "mozilla/dom/indexedDB/IDBFactory.h"
 #include "mozilla/dom/indexedDB/IDBRequest.h"
 #include "mozilla/dom/indexedDB/IDBDatabase.h"
 #include "mozilla/dom/indexedDB/IDBEvents.h"
 #include "mozilla/dom/indexedDB/IDBObjectStore.h"
 #include "mozilla/dom/indexedDB/IDBTransaction.h"
-#include "mozilla/dom/indexedDB/IDBCursorRequest.h"
+#include "mozilla/dom/indexedDB/IDBCursor.h"
 #include "mozilla/dom/indexedDB/IDBKeyRange.h"
 #include "mozilla/dom/indexedDB/IDBIndex.h"
 
 static NS_DEFINE_CID(kDOMSOF_CID, NS_DOM_SCRIPT_OBJECT_FACTORY_CID);
 
 static const char kDOMStringBundleURL[] =
   "chrome://global/locale/dom/dom.properties";
 
@@ -1429,17 +1429,17 @@ static nsDOMClassInfoData sClassInfoData
   NS_DEFINE_CLASSINFO_DATA(IDBSuccessEvent, nsDOMGenericSH,
                            DOM_DEFAULT_SCRIPTABLE_FLAGS)
   NS_DEFINE_CLASSINFO_DATA(IDBTransactionEvent, nsDOMGenericSH,
                            DOM_DEFAULT_SCRIPTABLE_FLAGS)
   NS_DEFINE_CLASSINFO_DATA(IDBObjectStore, nsDOMGenericSH,
                            DOM_DEFAULT_SCRIPTABLE_FLAGS)
   NS_DEFINE_CLASSINFO_DATA(IDBTransaction, nsDOMGenericSH,
                            DOM_DEFAULT_SCRIPTABLE_FLAGS)
-  NS_DEFINE_CLASSINFO_DATA(IDBCursorRequest, nsDOMGenericSH,
+  NS_DEFINE_CLASSINFO_DATA(IDBCursor, nsDOMGenericSH,
                            DOM_DEFAULT_SCRIPTABLE_FLAGS)
   NS_DEFINE_CLASSINFO_DATA(IDBKeyRange, nsDOMGenericSH,
                            DOM_DEFAULT_SCRIPTABLE_FLAGS)
   NS_DEFINE_CLASSINFO_DATA(IDBIndex, nsDOMGenericSH,
                            DOM_DEFAULT_SCRIPTABLE_FLAGS)
 };
 
 // Objects that should be constructable through |new Name();|
@@ -3961,18 +3961,17 @@ nsDOMClassInfo::Init()
   DOM_CLASSINFO_MAP_END
 
   DOM_CLASSINFO_MAP_BEGIN(IDBTransaction, nsIIDBTransaction)
     DOM_CLASSINFO_MAP_ENTRY(nsIIDBTransaction)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMNSEventTarget)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMEventTarget)
   DOM_CLASSINFO_MAP_END
 
-  DOM_CLASSINFO_MAP_BEGIN(IDBCursorRequest, nsIIDBCursorRequest)
-    DOM_CLASSINFO_MAP_ENTRY(nsIIDBCursorRequest)
+  DOM_CLASSINFO_MAP_BEGIN(IDBCursor, nsIIDBCursor)
     DOM_CLASSINFO_MAP_ENTRY(nsIIDBCursor)
   DOM_CLASSINFO_MAP_END
 
   DOM_CLASSINFO_MAP_BEGIN(IDBKeyRange, nsIIDBKeyRange)
     DOM_CLASSINFO_MAP_ENTRY(nsIIDBKeyRange)
   DOM_CLASSINFO_MAP_END
 
   DOM_CLASSINFO_MAP_BEGIN(IDBIndex, nsIIDBIndex)
--- a/dom/base/nsDOMClassInfoClasses.h
+++ b/dom/base/nsDOMClassInfoClasses.h
@@ -483,11 +483,11 @@ DOMCI_CLASS(CloseEvent)
 DOMCI_CLASS(IDBFactory)
 DOMCI_CLASS(IDBRequest)
 DOMCI_CLASS(IDBDatabase)
 DOMCI_CLASS(IDBErrorEvent)
 DOMCI_CLASS(IDBSuccessEvent)
 DOMCI_CLASS(IDBTransactionEvent)
 DOMCI_CLASS(IDBObjectStore)
 DOMCI_CLASS(IDBTransaction)
-DOMCI_CLASS(IDBCursorRequest)
+DOMCI_CLASS(IDBCursor)
 DOMCI_CLASS(IDBKeyRange)
 DOMCI_CLASS(IDBIndex)
rename from dom/indexedDB/IDBCursorRequest.cpp
rename to dom/indexedDB/IDBCursor.cpp
--- a/dom/indexedDB/IDBCursorRequest.cpp
+++ b/dom/indexedDB/IDBCursor.cpp
@@ -36,17 +36,17 @@
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 // XXX remove once we can get jsvals out of XPIDL
 #include "jscntxt.h"
 #include "jsapi.h"
 
-#include "IDBCursorRequest.h"
+#include "IDBCursor.h"
 
 #include "nsIIDBDatabaseException.h"
 #include "nsIVariant.h"
 
 #include "mozilla/storage.h"
 #include "nsComponentManagerUtils.h"
 #include "nsContentUtils.h"
 #include "nsDOMClassInfo.h"
@@ -122,67 +122,67 @@ private:
 
 BEGIN_INDEXEDDB_NAMESPACE
 
 class ContinueRunnable : public nsRunnable
 {
 public:
   NS_DECL_NSIRUNNABLE
 
-  ContinueRunnable(IDBCursorRequest* aCursor,
+  ContinueRunnable(IDBCursor* aCursor,
                    const Key& aKey)
   : mCursor(aCursor), mKey(aKey)
   { }
 
 private:
-  nsRefPtr<IDBCursorRequest> mCursor;
+  nsRefPtr<IDBCursor> mCursor;
   const Key mKey;
 };
 
 END_INDEXEDDB_NAMESPACE
 
 // static
-already_AddRefed<IDBCursorRequest>
-IDBCursorRequest::Create(IDBRequest* aRequest,
-                         IDBTransaction* aTransaction,
-                         IDBObjectStore* aObjectStore,
-                         PRUint16 aDirection,
-                         nsTArray<KeyValuePair>& aData)
+already_AddRefed<IDBCursor>
+IDBCursor::Create(IDBRequest* aRequest,
+                  IDBTransaction* aTransaction,
+                  IDBObjectStore* aObjectStore,
+                  PRUint16 aDirection,
+                  nsTArray<KeyValuePair>& aData)
 {
   NS_ASSERTION(aObjectStore, "Null pointer!");
 
-  nsRefPtr<IDBCursorRequest> cursor =
-    IDBCursorRequest::CreateCommon(aRequest, aTransaction, aDirection);
+  nsRefPtr<IDBCursor> cursor =
+    IDBCursor::CreateCommon(aRequest, aTransaction, aDirection);
 
   cursor->mObjectStore = aObjectStore;
 
   if (!cursor->mData.SwapElements(aData)) {
     NS_ERROR("Out of memory?!");
     return nsnull;
   }
   NS_ASSERTION(!cursor->mData.IsEmpty(), "Should never have an empty set!");
 
   cursor->mDataIndex = cursor->mData.Length() - 1;
   cursor->mType = OBJECTSTORE;
 
   return cursor.forget();
 }
 
 // static
-already_AddRefed<IDBCursorRequest>
-IDBCursorRequest::Create(IDBRequest* aRequest,
-                         IDBTransaction* aTransaction,
-                         IDBIndex* aIndex,
-                         PRUint16 aDirection,
-                         nsTArray<KeyKeyPair>& aData)
+already_AddRefed<IDBCursor>
+IDBCursor::Create(IDBRequest* aRequest,
+                  IDBTransaction* aTransaction,
+                  IDBIndex* aIndex,
+                  PRUint16 aDirection,
+                  nsTArray<KeyKeyPair>& aData)
 {
   NS_ASSERTION(aIndex, "Null pointer!");
 
-  nsRefPtr<IDBCursorRequest> cursor =
-    IDBCursorRequest::CreateCommon(aRequest, aTransaction, aDirection);
+  nsRefPtr<IDBCursor> cursor =
+    IDBCursor::CreateCommon(aRequest, aTransaction, aDirection);
 
   cursor->mObjectStore = aIndex->ObjectStore();
   cursor->mIndex = aIndex;
 
   if (!cursor->mKeyData.SwapElements(aData)) {
     NS_ERROR("Out of memory?!");
     return nsnull;
   }
@@ -190,27 +190,27 @@ IDBCursorRequest::Create(IDBRequest* aRe
 
   cursor->mDataIndex = cursor->mKeyData.Length() - 1;
   cursor->mType = INDEX;
 
   return cursor.forget();
 }
 
 // static
-already_AddRefed<IDBCursorRequest>
-IDBCursorRequest::Create(IDBRequest* aRequest,
-                         IDBTransaction* aTransaction,
-                         IDBIndex* aIndex,
-                         PRUint16 aDirection,
-                         nsTArray<KeyValuePair>& aData)
+already_AddRefed<IDBCursor>
+IDBCursor::Create(IDBRequest* aRequest,
+                  IDBTransaction* aTransaction,
+                  IDBIndex* aIndex,
+                  PRUint16 aDirection,
+                  nsTArray<KeyValuePair>& aData)
 {
   NS_ASSERTION(aIndex, "Null pointer!");
 
-  nsRefPtr<IDBCursorRequest> cursor =
-    IDBCursorRequest::CreateCommon(aRequest, aTransaction, aDirection);
+  nsRefPtr<IDBCursor> cursor =
+    IDBCursor::CreateCommon(aRequest, aTransaction, aDirection);
 
   cursor->mObjectStore = aIndex->ObjectStore();
   cursor->mIndex = aIndex;
 
   if (!cursor->mData.SwapElements(aData)) {
     NS_ERROR("Out of memory?!");
     return nsnull;
   }
@@ -218,77 +218,76 @@ IDBCursorRequest::Create(IDBRequest* aRe
 
   cursor->mDataIndex = cursor->mData.Length() - 1;
   cursor->mType = INDEXOBJECT;
 
   return cursor.forget();
 }
 
 // static
-already_AddRefed<IDBCursorRequest>
-IDBCursorRequest::CreateCommon(IDBRequest* aRequest,
-                               IDBTransaction* aTransaction,
-                               PRUint16 aDirection)
+already_AddRefed<IDBCursor>
+IDBCursor::CreateCommon(IDBRequest* aRequest,
+                        IDBTransaction* aTransaction,
+                        PRUint16 aDirection)
 {
   NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
   NS_ASSERTION(aRequest, "Null pointer!");
   NS_ASSERTION(aTransaction, "Null pointer!");
 
-  nsRefPtr<IDBCursorRequest> cursor(new IDBCursorRequest());
+  nsRefPtr<IDBCursor> cursor(new IDBCursor());
   cursor->mRequest = aRequest;
   cursor->mTransaction = aTransaction;
   cursor->mDirection = aDirection;
 
   return cursor.forget();
 }
 
-IDBCursorRequest::IDBCursorRequest()
+IDBCursor::IDBCursor()
 : mDirection(nsIIDBCursor::NEXT),
   mCachedValue(JSVAL_VOID),
   mHaveCachedValue(false),
   mJSRuntime(nsnull),
   mContinueCalled(false),
   mDataIndex(0),
   mType(OBJECTSTORE)
 {
   NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
 }
 
-IDBCursorRequest::~IDBCursorRequest()
+IDBCursor::~IDBCursor()
 {
   NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
 
   if (mJSRuntime) {
     JS_RemoveRootRT(mJSRuntime, &mCachedValue);
   }
 }
 
-NS_IMPL_ADDREF(IDBCursorRequest)
-NS_IMPL_RELEASE(IDBCursorRequest)
+NS_IMPL_ADDREF(IDBCursor)
+NS_IMPL_RELEASE(IDBCursor)
 
-NS_INTERFACE_MAP_BEGIN(IDBCursorRequest)
+NS_INTERFACE_MAP_BEGIN(IDBCursor)
   NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, IDBRequest::Generator)
-  NS_INTERFACE_MAP_ENTRY(nsIIDBCursorRequest)
   NS_INTERFACE_MAP_ENTRY(nsIIDBCursor)
-  NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(IDBCursorRequest)
+  NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(IDBCursor)
 NS_INTERFACE_MAP_END
 
-DOMCI_DATA(IDBCursorRequest, IDBCursorRequest)
+DOMCI_DATA(IDBCursor, IDBCursor)
 
 NS_IMETHODIMP
-IDBCursorRequest::GetDirection(PRUint16* aDirection)
+IDBCursor::GetDirection(PRUint16* aDirection)
 {
   NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
 
   *aDirection = mDirection;
   return NS_OK;
 }
 
 NS_IMETHODIMP
-IDBCursorRequest::GetKey(nsIVariant** aKey)
+IDBCursor::GetKey(nsIVariant** aKey)
 {
   NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
 
   if (!mCachedKey) {
     nsresult rv;
     nsCOMPtr<nsIWritableVariant> variant =
       do_CreateInstance(NS_VARIANT_CONTRACTID, &rv);
     NS_ENSURE_SUCCESS(rv, rv);
@@ -320,17 +319,17 @@ IDBCursorRequest::GetKey(nsIVariant** aK
   }
 
   nsCOMPtr<nsIVariant> result(mCachedKey);
   result.forget(aKey);
   return NS_OK;
 }
 
 NS_IMETHODIMP
-IDBCursorRequest::GetValue(nsIVariant** aValue)
+IDBCursor::GetValue(nsIVariant** aValue)
 {
   NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
 
   nsresult rv;
 
   if (mType == INDEX) {
     nsCOMPtr<nsIWritableVariant> variant =
       do_CreateInstance(NS_VARIANT_CONTRACTID);
@@ -381,17 +380,17 @@ IDBCursorRequest::GetValue(nsIVariant** 
     NS_ENSURE_SUCCESS(rv, rv);
 
     JSAutoRequest ar(cx);
 
     if (!mJSRuntime) {
       JSRuntime* rt = JS_GetRuntime(cx);
 
       JSBool ok = JS_AddNamedRootRT(rt, &mCachedValue,
-                                   "IDBCursorRequest::mCachedValue");
+                                   "IDBCursor::mCachedValue");
       NS_ENSURE_TRUE(ok, NS_ERROR_FAILURE);
 
       mJSRuntime = rt;
     }
 
     nsCOMPtr<nsIJSON> json(new nsJSON());
     rv = json->DecodeToJSVal(mData[mDataIndex].value, cx, &mCachedValue);
     NS_ENSURE_SUCCESS(rv, rv);
@@ -400,19 +399,19 @@ IDBCursorRequest::GetValue(nsIVariant** 
   }
 
   *retval = mCachedValue;
   cc->SetReturnValueWasSet(PR_TRUE);
   return NS_OK;
 }
 
 NS_IMETHODIMP
-IDBCursorRequest::Continue(nsIVariant* aKey,
-                           PRUint8 aOptionalArgCount,
-                           PRBool* _retval)
+IDBCursor::Continue(nsIVariant* aKey,
+                    PRUint8 aOptionalArgCount,
+                    PRBool* _retval)
 {
   NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
 
   if (!mObjectStore->TransactionIsOpen()) {
     return NS_ERROR_UNEXPECTED;
   }
 
   if (mContinueCalled) {
@@ -444,18 +443,18 @@ IDBCursorRequest::Continue(nsIVariant* a
 
   mContinueCalled = true;
 
   *_retval = PR_TRUE;
   return NS_OK;
 }
 
 NS_IMETHODIMP
-IDBCursorRequest::Update(nsIVariant* aValue,
-                         nsIIDBRequest** _retval)
+IDBCursor::Update(nsIVariant* aValue,
+                  nsIIDBRequest** _retval)
 {
   NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
 
   if (mType != OBJECTSTORE) {
     NS_NOTYETIMPLEMENTED("Implement me!");
     return NS_ERROR_NOT_IMPLEMENTED;
   }
 
@@ -591,17 +590,17 @@ IDBCursorRequest::Update(nsIVariant* aVa
   rv = helper->DispatchToTransactionPool();
   NS_ENSURE_SUCCESS(rv, rv);
 
   request.forget(_retval);
   return NS_OK;
 }
 
 NS_IMETHODIMP
-IDBCursorRequest::Remove(nsIIDBRequest** _retval)
+IDBCursor::Remove(nsIIDBRequest** _retval)
 {
   NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
 
   if (mType != OBJECTSTORE) {
     NS_NOTYETIMPLEMENTED("Implement me!");
     return NS_ERROR_NOT_IMPLEMENTED;
   }
 
@@ -766,34 +765,34 @@ ContinueRunnable::Run()
   }
 
   // Remove cached stuff from last time.
   mCursor->mCachedKey = nsnull;
   mCursor->mCachedValue = JSVAL_VOID;
   mCursor->mHaveCachedValue = false;
   mCursor->mContinueCalled = false;
 
-  if (mCursor->mType == IDBCursorRequest::INDEX) {
+  if (mCursor->mType == IDBCursor::INDEX) {
     mCursor->mKeyData.RemoveElementAt(mCursor->mDataIndex);
   }
   else {
     mCursor->mData.RemoveElementAt(mCursor->mDataIndex);
   }
   if (mCursor->mDataIndex) {
     mCursor->mDataIndex--;
   }
 
   nsCOMPtr<nsIWritableVariant> variant =
     do_CreateInstance(NS_VARIANT_CONTRACTID);
   if (!variant) {
     NS_ERROR("Couldn't create variant!");
     return NS_ERROR_FAILURE;
   }
 
-  PRBool empty = mCursor->mType == IDBCursorRequest::INDEX ?
+  PRBool empty = mCursor->mType == IDBCursor::INDEX ?
                  mCursor->mKeyData.IsEmpty() :
                  mCursor->mData.IsEmpty();
 
   if (empty) {
     rv = variant->SetAsEmpty();
     NS_ENSURE_SUCCESS(rv, rv);
   }
   else {
@@ -801,17 +800,17 @@ ContinueRunnable::Run()
       NS_ASSERTION(!mKey.IsNull(), "Huh?!");
 
       NS_WARNING("Using a slow O(n) search for continue(key), do something "
                  "smarter!");
 
       // Skip ahead to our next key match.
       PRInt32 index = PRInt32(mCursor->mDataIndex);
 
-      if (mCursor->mType == IDBCursorRequest::INDEX) {
+      if (mCursor->mType == IDBCursor::INDEX) {
         while (index >= 0) {
           const Key& key = mCursor->mKeyData[index].key;
           if (mKey == key) {
             break;
           }
           if (key < mKey) {
             index--;
             continue;
rename from dom/indexedDB/IDBCursorRequest.h
rename to dom/indexedDB/IDBCursor.h
--- a/dom/indexedDB/IDBCursorRequest.h
+++ b/dom/indexedDB/IDBCursor.h
@@ -32,21 +32,21 @@
  * use your version of this file under the terms of the MPL, indicate your
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
-#ifndef mozilla_dom_indexeddb_idbcursorrequest_h__
-#define mozilla_dom_indexeddb_idbcursorrequest_h__
+#ifndef mozilla_dom_indexeddb_idbcursor_h__
+#define mozilla_dom_indexeddb_idbcursor_h__
 
 #include "mozilla/dom/indexedDB/IDBObjectStore.h"
-#include "nsIIDBCursorRequest.h"
+#include "nsIIDBCursor.h"
 
 #include "jsapi.h"
 
 class nsIRunnable;
 
 BEGIN_INDEXEDDB_NAMESPACE
 
 class IDBIndex;
@@ -63,63 +63,62 @@ struct KeyValuePair
 struct KeyKeyPair
 {
   Key key;
   Key value;
 };
 
 class ContinueRunnable;
 
-class IDBCursorRequest : public IDBRequest::Generator,
-                         public nsIIDBCursorRequest
+class IDBCursor : public IDBRequest::Generator,
+                  public nsIIDBCursor
 {
   friend class ContinueRunnable;
 
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIIDBCURSOR
-  NS_DECL_NSIIDBCURSORREQUEST
 
   static
-  already_AddRefed<IDBCursorRequest>
+  already_AddRefed<IDBCursor>
   Create(IDBRequest* aRequest,
          IDBTransaction* aTransaction,
          IDBObjectStore* aObjectStore,
          PRUint16 aDirection,
          nsTArray<KeyValuePair>& aData);
 
   static
-  already_AddRefed<IDBCursorRequest>
+  already_AddRefed<IDBCursor>
   Create(IDBRequest* aRequest,
          IDBTransaction* aTransaction,
          IDBIndex* aIndex,
          PRUint16 aDirection,
          nsTArray<KeyKeyPair>& aData);
 
   static
-  already_AddRefed<IDBCursorRequest>
+  already_AddRefed<IDBCursor>
   Create(IDBRequest* aRequest,
          IDBTransaction* aTransaction,
          IDBIndex* aIndex,
          PRUint16 aDirection,
          nsTArray<KeyValuePair>& aData);
 
   enum Type
   {
     OBJECTSTORE = 0,
     INDEX,
     INDEXOBJECT
   };
 
 protected:
-  IDBCursorRequest();
-  ~IDBCursorRequest();
+  IDBCursor();
+  ~IDBCursor();
 
   static
-  already_AddRefed<IDBCursorRequest>
+  already_AddRefed<IDBCursor>
   CreateCommon(IDBRequest* aRequest,
                IDBTransaction* aTransaction,
                PRUint16 aDirection);
 
   nsRefPtr<IDBRequest> mRequest;
   nsRefPtr<IDBTransaction> mTransaction;
   nsRefPtr<IDBObjectStore> mObjectStore;
   nsRefPtr<IDBIndex> mIndex;
@@ -136,9 +135,9 @@ protected:
 
   Type mType;
   nsTArray<KeyValuePair> mData;
   nsTArray<KeyKeyPair> mKeyData;
 };
 
 END_INDEXEDDB_NAMESPACE
 
-#endif // mozilla_dom_indexeddb_idbcursorrequest_h__
+#endif // mozilla_dom_indexeddb_idbcursor_h__
--- a/dom/indexedDB/IDBIndex.cpp
+++ b/dom/indexedDB/IDBIndex.cpp
@@ -43,17 +43,17 @@
 #include "nsIIDBDatabaseException.h"
 #include "nsIIDBKeyRange.h"
 
 #include "nsDOMClassInfo.h"
 #include "nsThreadUtils.h"
 #include "mozilla/storage.h"
 
 #include "AsyncConnectionHelper.h"
-#include "IDBCursorRequest.h"
+#include "IDBCursor.h"
 #include "IDBEvents.h"
 #include "IDBObjectStore.h"
 #include "IDBTransaction.h"
 #include "DatabaseInfo.h"
 
 USING_INDEXEDDB_NAMESPACE
 
 namespace {
@@ -1134,19 +1134,18 @@ OpenCursorHelper::DoDatabaseWork(mozISto
 PRUint16
 OpenCursorHelper::GetSuccessResult(nsIWritableVariant* aResult)
 {
   if (mData.IsEmpty()) {
     aResult->SetAsEmpty();
     return OK;
   }
 
-  nsRefPtr<IDBCursorRequest> cursor =
-    IDBCursorRequest::Create(mRequest, mTransaction, mIndex, mDirection,
-                             mData);
+  nsRefPtr<IDBCursor> cursor =
+    IDBCursor::Create(mRequest, mTransaction, mIndex, mDirection, mData);
   NS_ENSURE_TRUE(cursor, nsIIDBDatabaseException::UNKNOWN_ERR);
 
   aResult->SetAsISupports(static_cast<IDBRequest::Generator*>(cursor));
 
   mIndex = nsnull;
 
   return OK;
 }
@@ -1336,19 +1335,18 @@ OpenObjectCursorHelper::DoDatabaseWork(m
 PRUint16
 OpenObjectCursorHelper::GetSuccessResult(nsIWritableVariant* aResult)
 {
   if (mData.IsEmpty()) {
     aResult->SetAsEmpty();
     return OK;
   }
 
-  nsRefPtr<IDBCursorRequest> cursor =
-    IDBCursorRequest::Create(mRequest, mTransaction, mIndex, mDirection,
-                             mData);
+  nsRefPtr<IDBCursor> cursor =
+    IDBCursor::Create(mRequest, mTransaction, mIndex, mDirection, mData);
   NS_ENSURE_TRUE(cursor, nsIIDBDatabaseException::UNKNOWN_ERR);
 
   aResult->SetAsISupports(static_cast<IDBRequest::Generator*>(cursor));
 
   mIndex = nsnull;
 
   return OK;
 }
--- a/dom/indexedDB/IDBObjectStore.cpp
+++ b/dom/indexedDB/IDBObjectStore.cpp
@@ -54,17 +54,17 @@
 
 #include "nsDOMClassInfo.h"
 #include "nsJSUtils.h"
 #include "nsServiceManagerUtils.h"
 #include "nsThreadUtils.h"
 #include "mozilla/storage.h"
 
 #include "AsyncConnectionHelper.h"
-#include "IDBCursorRequest.h"
+#include "IDBCursor.h"
 #include "IDBKeyRange.h"
 #include "IDBTransaction.h"
 #include "DatabaseInfo.h"
 #include "Savepoint.h"
 
 USING_INDEXEDDB_NAMESPACE
 
 BEGIN_INDEXEDDB_NAMESPACE
@@ -1779,19 +1779,18 @@ OpenCursorHelper::DoDatabaseWork(mozISto
 PRUint16
 OpenCursorHelper::GetSuccessResult(nsIWritableVariant* aResult)
 {
   if (mData.IsEmpty()) {
     aResult->SetAsEmpty();
     return OK;
   }
 
-  nsRefPtr<IDBCursorRequest> cursor =
-    IDBCursorRequest::Create(mRequest, mTransaction, mObjectStore, mDirection,
-                             mData);
+  nsRefPtr<IDBCursor> cursor =
+    IDBCursor::Create(mRequest, mTransaction, mObjectStore, mDirection, mData);
   NS_ENSURE_TRUE(cursor, nsIIDBDatabaseException::UNKNOWN_ERR);
 
   aResult->SetAsISupports(static_cast<IDBRequest::Generator*>(cursor));
 
   mObjectStore = nsnull;
 
   return OK;
 }
--- a/dom/indexedDB/IDBTransaction.cpp
+++ b/dom/indexedDB/IDBTransaction.cpp
@@ -40,17 +40,17 @@
 #include "IDBTransaction.h"
 
 #include "mozilla/storage.h"
 #include "nsDOMClassInfo.h"
 #include "nsProxyRelease.h"
 #include "nsThreadUtils.h"
 
 #include "IDBEvents.h"
-#include "IDBCursorRequest.h"
+#include "IDBCursor.h"
 #include "IDBObjectStore.h"
 #include "IDBFactory.h"
 #include "DatabaseInfo.h"
 #include "TransactionThreadPool.h"
 
 #define SAVEPOINT_INITIAL "initial"
 #define SAVEPOINT_INTERMEDIATE "intermediate"
 
--- a/dom/indexedDB/Makefile.in
+++ b/dom/indexedDB/Makefile.in
@@ -49,31 +49,31 @@ XPIDL_MODULE = dom_indexeddb
 LIBXUL_LIBRARY = 1
 FORCE_STATIC_LIB = 1
 
 EXPORTS_NAMESPACES = mozilla/dom/indexedDB
 
 CPPSRCS = \
   AsyncConnectionHelper.cpp \
   DatabaseInfo.cpp \
-  IDBCursorRequest.cpp \
+  IDBCursor.cpp \
   IDBDatabase.cpp \
   IDBEvents.cpp \
   IDBIndex.cpp \
   IDBKeyRange.cpp \
   IDBObjectStore.cpp \
   IDBRequest.cpp \
   IDBTransaction.cpp \
   IDBFactory.cpp \
   LazyIdleThread.cpp \
   TransactionThreadPool.cpp \
   $(NULL)
 
 EXPORTS_mozilla/dom/indexedDB = \
-  IDBCursorRequest.h \
+  IDBCursor.h \
   IDBDatabase.h \
   IDBEvents.h \
   IDBIndex.h \
   IDBKeyRange.h \
   IDBObjectStore.h \
   IDBRequest.h \
   IDBTransaction.h \
   IndexedDatabase.h \
@@ -88,17 +88,16 @@ LOCAL_INCLUDES = \
   $(NULL)
 
 DEFINES += -D_IMPL_NS_LAYOUT
 
 # Make sure to quickstub as much as possible here! See
 # js/src/xpconnect/src/dom_quickstubs.qsconf.
 XPIDLSRCS = \
   nsIIDBCursor.idl \
-  nsIIDBCursorRequest.idl \
   nsIIDBDatabase.idl \
   nsIIDBDatabaseException.idl \
   nsIIDBEvent.idl \
   nsIIDBErrorEvent.idl \
   nsIIDBIndex.idl \
   nsIIDBKeyRange.idl \
   nsIIDBObjectStore.idl \
   nsIIDBRequest.idl \
--- a/dom/indexedDB/nsIIDBCursor.idl
+++ b/dom/indexedDB/nsIIDBCursor.idl
@@ -34,22 +34,45 @@
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "nsISupports.idl"
 
+interface nsIIDBRequest;
+interface nsIVariant;
+
 /**
  * IDBCursor interface.  See
  * http://dev.w3.org/2006/webapi/WebSimpleDB/#idl-def-IDBCursor for more
  * information.
  */
-[scriptable, uuid(06b5980f-e5e1-433c-9df4-5ecef0238715)]
+[scriptable, uuid(f0954b7d-b639-49ac-ad4b-b5e072fd0cc5)]
 interface nsIIDBCursor : nsISupports
 {
   const unsigned short NEXT = 0;
   const unsigned short NEXT_NO_DUPLICATE = 1;
   const unsigned short PREV = 2;
   const unsigned short PREV_NO_DUPLICATE = 3;
   readonly attribute unsigned short direction;
+
+  readonly attribute nsIVariant key;
+
+  readonly attribute nsIVariant value;
+
+  // Returns true always for non-preloaded cursors. Calling continue means that
+  // the same onsuccess function will be called again with the new key/value
+  // (or null if no more matches).
+  //
+  // For preloaded cursors returns true if key/value have been set to new
+  // values. If false then no more matches are available and getting the key,
+  // value property will throw, as will calling update() and remove().
+  [optional_argc]
+  boolean continue([optional /* null */] in nsIVariant key);
+
+  // Success fires IDBTransactionEvent, result == key
+  nsIIDBRequest update(in nsIVariant value);
+
+  // Success fires IDBTransactionEvent, result == null
+  nsIIDBRequest remove();
 };
deleted file mode 100644
--- a/dom/indexedDB/nsIIDBCursorRequest.idl
+++ /dev/null
@@ -1,72 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=2 et sw=2 tw=80: */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Indexed Database.
- *
- * The Initial Developer of the Original Code is
- * The Mozilla Foundation.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Ben Turner <bent.mozilla@gmail.com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#include "nsIIDBCursor.idl"
-
-interface nsIIDBRequest;
-interface nsIVariant;
-
-/**
- * IDBCursorRequest interface.  See
- * http://dev.w3.org/2006/webapi/WebSimpleDB/#idl-def-IDBCursorRequest for more
- * information.
- */
-[scriptable, uuid(12ba5905-de6b-40f9-8c97-aec5f9dc706c)]
-interface nsIIDBCursorRequest : nsIIDBCursor
-{
-  readonly attribute nsIVariant key;
-
-  readonly attribute nsIVariant value;
-
-  // Returns true always for non-preloaded cursors. Calling continue means that
-  // the same onsuccess function will be called again with the new key/value
-  // (or null if no more matches).
-  //
-  // For preloaded cursors returns true if key/value have been set to new
-  // values. If false then no more matches are available and getting the key,
-  // value property will throw, as will calling update() and remove().
-  [optional_argc]
-  boolean continue([optional /* null */] in nsIVariant key);
-
-  // Success fires IDBTransactionEvent, result == key
-  nsIIDBRequest update(in nsIVariant value);
-
-  // Success fires IDBTransactionEvent, result == null
-  nsIIDBRequest remove();
-};
--- a/dom/indexedDB/nsIIDBObjectStore.idl
+++ b/dom/indexedDB/nsIIDBObjectStore.idl
@@ -83,17 +83,17 @@ interface nsIIDBObjectStore : nsISupport
   nsIIDBRequest
   addOrModify(in nsIVariant value,
               [optional /* null */] in nsIVariant key);
 
   // Success fires IDBTransactionEvent, result == null
   nsIIDBRequest
   remove(in nsIVariant key);
 
-  // Success fires IDBTransactionEvent, result == IDBCursorRequest or
+  // Success fires IDBTransactionEvent, result == IDBCursor or
   // IDBCursorPreloadedRequest if preload == true. result == null if no match.
   [optional_argc]
   nsIIDBRequest
   openCursor([optional /* null */] in nsIIDBKeyRange range,
              [optional /* NEXT */] in unsigned short direction,
              [optional /* false */] in boolean preload);
 
   // Success fires IDBTransactionEvent, result == IDBIndex
--- a/js/src/xpconnect/src/dom_quickstubs.qsconf
+++ b/js/src/xpconnect/src/dom_quickstubs.qsconf
@@ -456,17 +456,16 @@ members = [
     '-nsICanvasRenderingContextWebGL.texParameterf',
     '-nsICanvasRenderingContextWebGL.texParameteri',
     '-nsICanvasRenderingContextWebGL.getUniform',
     '-nsICanvasRenderingContextWebGL.getVertexAttrib',
     '-nsICanvasRenderingContextWebGL.getShaderParameter',
 
     # dom/indexedDB
     'nsIIDBCursor.*',
-    'nsIIDBCursorRequest.*',
     'nsIIDBDatabase.*',
     'nsIIDBDatabaseException.*',
     'nsIIDBEvent.*',
     'nsIIDBErrorEvent.*',
     'nsIIDBIndex.*',
     'nsIIDBKeyRange.*',
     'nsIIDBObjectStore.*',
     'nsIIDBRequest.*',
@@ -474,19 +473,19 @@ members = [
 #    'nsIIDBSuccessEvent.*',
     'nsIIDBTransaction.*',
     'nsIIDBTransactionEvent.*',
     'nsIIDBFactory.*',
 # Remove once XPIDL can handle jsvals
     '-nsIIDBObjectStore.add',
     '-nsIIDBObjectStore.modify',
     '-nsIIDBObjectStore.addOrModify',
-    '-nsIIDBCursorRequest.continue',
-    '-nsIIDBCursorRequest.value',
-    '-nsIIDBCursorRequest.update',
+    '-nsIIDBCursor.continue',
+    '-nsIIDBCursor.value',
+    '-nsIIDBCursor.update',
     '-nsIIDBIndex.openCursor',
     '-nsIIDBIndex.openObjectCursor'
     ]
 
 # Most interfaces can be found by searching the includePath; to find
 # nsIDOMEvent, for example, just look for nsIDOMEvent.idl.  But IDL filenames
 # for very long interface names are slightly abbreviated, and many interfaces
 # don't have their own files, just for extra wackiness.  So qsgen.py needs