Bug 574811 - Rename IDBIndexRequest to IDBIndex
authorShawn Wilsher <sdwilsh@shawnwilsher.com>
Mon, 28 Jun 2010 11:51:06 -0700
changeset 46361 6052456fb2882f4761b290a4b972d8a420003063
parent 46360 bd259ceb3acb6c5c9937851ce085fc81dce93966
child 46362 b2fa82bc1a645f41f554c78fe935d5de70626aaf
push idunknown
push userunknown
push dateunknown
bugs574811
milestone1.9.3a6pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 574811 - Rename IDBIndexRequest to IDBIndex Updating interface names per recent specification changes. r=bent
dom/base/nsDOMClassInfo.cpp
dom/base/nsDOMClassInfoClasses.h
dom/indexedDB/IDBCursorRequest.cpp
dom/indexedDB/IDBCursorRequest.h
dom/indexedDB/IDBIndex.cpp
dom/indexedDB/IDBIndex.h
dom/indexedDB/IDBIndexRequest.cpp
dom/indexedDB/IDBIndexRequest.h
dom/indexedDB/IDBObjectStore.cpp
dom/indexedDB/Makefile.in
dom/indexedDB/nsIIDBIndex.idl
dom/indexedDB/nsIIDBIndexRequest.idl
dom/indexedDB/nsIIDBObjectStore.idl
js/src/xpconnect/src/dom_quickstubs.qsconf
--- a/dom/base/nsDOMClassInfo.cpp
+++ b/dom/base/nsDOMClassInfo.cpp
@@ -482,17 +482,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/IDBKeyRange.h"
-#include "mozilla/dom/indexedDB/IDBIndexRequest.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";
 
 // NOTE: DEFAULT_SCRIPTABLE_FLAGS and DOM_DEFAULT_SCRIPTABLE_FLAGS
 //       are defined in nsIDOMClassInfo.h.
@@ -1433,17 +1433,17 @@ static nsDOMClassInfoData sClassInfoData
   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,
                            DOM_DEFAULT_SCRIPTABLE_FLAGS)
   NS_DEFINE_CLASSINFO_DATA(IDBKeyRange, nsDOMGenericSH,
                            DOM_DEFAULT_SCRIPTABLE_FLAGS)
-  NS_DEFINE_CLASSINFO_DATA(IDBIndexRequest, nsDOMGenericSH,
+  NS_DEFINE_CLASSINFO_DATA(IDBIndex, nsDOMGenericSH,
                            DOM_DEFAULT_SCRIPTABLE_FLAGS)
 };
 
 // Objects that should be constructable through |new Name();|
 struct nsContractIDMapData
 {
   PRInt32 mDOMClassInfoID;
   const char *mContractID;
@@ -3970,18 +3970,17 @@ nsDOMClassInfo::Init()
     DOM_CLASSINFO_MAP_ENTRY(nsIIDBCursorRequest)
     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(IDBIndexRequest, nsIIDBIndexRequest)
-    DOM_CLASSINFO_MAP_ENTRY(nsIIDBIndexRequest)
+  DOM_CLASSINFO_MAP_BEGIN(IDBIndex, nsIIDBIndex)
     DOM_CLASSINFO_MAP_ENTRY(nsIIDBIndex)
   DOM_CLASSINFO_MAP_END
 
 #ifdef NS_DEBUG
   {
     PRUint32 i = NS_ARRAY_LENGTH(sClassInfoData);
 
     if (i != eDOMClassInfoIDCount) {
--- a/dom/base/nsDOMClassInfoClasses.h
+++ b/dom/base/nsDOMClassInfoClasses.h
@@ -485,9 +485,9 @@ 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(IDBKeyRange)
-DOMCI_CLASS(IDBIndexRequest)
+DOMCI_CLASS(IDBIndex)
--- a/dom/indexedDB/IDBCursorRequest.cpp
+++ b/dom/indexedDB/IDBCursorRequest.cpp
@@ -52,17 +52,17 @@
 #include "nsDOMClassInfo.h"
 #include "nsJSON.h"
 #include "nsJSUtils.h"
 #include "nsThreadUtils.h"
 
 #include "AsyncConnectionHelper.h"
 #include "DatabaseInfo.h"
 #include "IDBEvents.h"
-#include "IDBIndexRequest.h"
+#include "IDBIndex.h"
 #include "IDBObjectStore.h"
 #include "IDBTransaction.h"
 #include "Savepoint.h"
 #include "TransactionThreadPool.h"
 
 USING_INDEXEDDB_NAMESPACE
 
 namespace {
@@ -165,17 +165,17 @@ IDBCursorRequest::Create(IDBRequest* aRe
 
   return cursor.forget();
 }
 
 // static
 already_AddRefed<IDBCursorRequest>
 IDBCursorRequest::Create(IDBRequest* aRequest,
                          IDBTransaction* aTransaction,
-                         IDBIndexRequest* aIndex,
+                         IDBIndex* aIndex,
                          PRUint16 aDirection,
                          nsTArray<KeyKeyPair>& aData)
 {
   NS_ASSERTION(aIndex, "Null pointer!");
 
   nsRefPtr<IDBCursorRequest> cursor =
     IDBCursorRequest::CreateCommon(aRequest, aTransaction, aDirection);
 
@@ -193,17 +193,17 @@ IDBCursorRequest::Create(IDBRequest* aRe
 
   return cursor.forget();
 }
 
 // static
 already_AddRefed<IDBCursorRequest>
 IDBCursorRequest::Create(IDBRequest* aRequest,
                          IDBTransaction* aTransaction,
-                         IDBIndexRequest* aIndex,
+                         IDBIndex* aIndex,
                          PRUint16 aDirection,
                          nsTArray<KeyValuePair>& aData)
 {
   NS_ASSERTION(aIndex, "Null pointer!");
 
   nsRefPtr<IDBCursorRequest> cursor =
     IDBCursorRequest::CreateCommon(aRequest, aTransaction, aDirection);
 
--- a/dom/indexedDB/IDBCursorRequest.h
+++ b/dom/indexedDB/IDBCursorRequest.h
@@ -44,17 +44,17 @@
 #include "nsIIDBCursorRequest.h"
 
 #include "jsapi.h"
 
 class nsIRunnable;
 
 BEGIN_INDEXEDDB_NAMESPACE
 
-class IDBIndexRequest;
+class IDBIndex;
 class IDBRequest;
 class IDBObjectStore;
 class IDBTransaction;
 
 struct KeyValuePair
 {
   Key key;
   nsString value;
@@ -85,25 +85,25 @@ public:
          IDBObjectStore* aObjectStore,
          PRUint16 aDirection,
          nsTArray<KeyValuePair>& aData);
 
   static
   already_AddRefed<IDBCursorRequest>
   Create(IDBRequest* aRequest,
          IDBTransaction* aTransaction,
-         IDBIndexRequest* aIndex,
+         IDBIndex* aIndex,
          PRUint16 aDirection,
          nsTArray<KeyKeyPair>& aData);
 
   static
   already_AddRefed<IDBCursorRequest>
   Create(IDBRequest* aRequest,
          IDBTransaction* aTransaction,
-         IDBIndexRequest* aIndex,
+         IDBIndex* aIndex,
          PRUint16 aDirection,
          nsTArray<KeyValuePair>& aData);
 
   enum Type
   {
     OBJECTSTORE = 0,
     INDEX,
     INDEXOBJECT
@@ -117,17 +117,17 @@ protected:
   already_AddRefed<IDBCursorRequest>
   CreateCommon(IDBRequest* aRequest,
                IDBTransaction* aTransaction,
                PRUint16 aDirection);
 
   nsRefPtr<IDBRequest> mRequest;
   nsRefPtr<IDBTransaction> mTransaction;
   nsRefPtr<IDBObjectStore> mObjectStore;
-  nsRefPtr<IDBIndexRequest> mIndex;
+  nsRefPtr<IDBIndex> mIndex;
 
   PRUint16 mDirection;
 
   nsCOMPtr<nsIVariant> mCachedKey;
   jsval mCachedValue;
   bool mHaveCachedValue;
   JSRuntime* mJSRuntime;
 
rename from dom/indexedDB/IDBIndexRequest.cpp
rename to dom/indexedDB/IDBIndex.cpp
--- a/dom/indexedDB/IDBIndexRequest.cpp
+++ b/dom/indexedDB/IDBIndex.cpp
@@ -33,17 +33,17 @@
  * 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 "IDBIndexRequest.h"
+#include "IDBIndex.h"
 
 #include "nsIIDBDatabaseException.h"
 #include "nsIIDBKeyRange.h"
 
 #include "nsDOMClassInfo.h"
 #include "nsThreadUtils.h"
 #include "mozilla/storage.h"
 
@@ -145,17 +145,17 @@ protected:
   nsTArray<nsString> mValues;
 };
 
 class OpenCursorHelper : public AsyncConnectionHelper
 {
 public:
   OpenCursorHelper(IDBTransaction* aTransaction,
                    IDBRequest* aRequest,
-                   IDBIndexRequest* aIndex,
+                   IDBIndex* aIndex,
                    PRInt64 aId,
                    bool aUnique,
                    bool aAutoIncrement,
                    const Key& aLeftKey,
                    const Key& aRightKey,
                    PRUint16 aKeyRangeFlags,
                    PRUint16 aDirection,
                    PRBool aPreload)
@@ -165,17 +165,17 @@ public:
     mDirection(aDirection), mPreload(aPreload)
   { }
 
   PRUint16 DoDatabaseWork(mozIStorageConnection* aConnection);
   PRUint16 GetSuccessResult(nsIWritableVariant* aResult);
 
 private:
   // In-params.
-  nsRefPtr<IDBIndexRequest> mIndex;
+  nsRefPtr<IDBIndex> mIndex;
   const PRInt64 mId;
   const bool mUnique;
   const bool mAutoIncrement;
   const Key mLeftKey;
   const Key mRightKey;
   const PRUint16 mKeyRangeFlags;
   const PRUint16 mDirection;
   const PRBool mPreload;
@@ -184,17 +184,17 @@ private:
   nsTArray<KeyKeyPair> mData;
 };
 
 class OpenObjectCursorHelper : public AsyncConnectionHelper
 {
 public:
   OpenObjectCursorHelper(IDBTransaction* aTransaction,
                          IDBRequest* aRequest,
-                         IDBIndexRequest* aIndex,
+                         IDBIndex* aIndex,
                          PRInt64 aId,
                          bool aUnique,
                          bool aAutoIncrement,
                          const Key& aLeftKey,
                          const Key& aRightKey,
                          PRUint16 aKeyRangeFlags,
                          PRUint16 aDirection,
                          PRBool aPreload)
@@ -204,116 +204,115 @@ public:
     mDirection(aDirection), mPreload(aPreload)
   { }
 
   PRUint16 DoDatabaseWork(mozIStorageConnection* aConnection);
   PRUint16 GetSuccessResult(nsIWritableVariant* aResult);
 
 private:
   // In-params.
-  nsRefPtr<IDBIndexRequest> mIndex;
+  nsRefPtr<IDBIndex> mIndex;
   const PRInt64 mId;
   const bool mUnique;
   const bool mAutoIncrement;
   const Key mLeftKey;
   const Key mRightKey;
   const PRUint16 mKeyRangeFlags;
   const PRUint16 mDirection;
   const PRBool mPreload;
 
   // Out-params.
   nsTArray<KeyValuePair> mData;
 };
 
 } // anonymous namespace
 
 // static
-already_AddRefed<IDBIndexRequest>
-IDBIndexRequest::Create(IDBObjectStore* aObjectStore,
-                        const IndexInfo* aIndexInfo)
+already_AddRefed<IDBIndex>
+IDBIndex::Create(IDBObjectStore* aObjectStore,
+                 const IndexInfo* aIndexInfo)
 {
   NS_PRECONDITION(NS_IsMainThread(), "Wrong thread!");
   NS_ASSERTION(aObjectStore, "Null pointer!");
   NS_ASSERTION(aIndexInfo, "Null pointer!");
 
-  nsRefPtr<IDBIndexRequest> index = new IDBIndexRequest();
+  nsRefPtr<IDBIndex> index = new IDBIndex();
 
   index->mObjectStore = aObjectStore;
   index->mId = aIndexInfo->id;
   index->mName = aIndexInfo->name;
   index->mKeyPath = aIndexInfo->keyPath;
   index->mUnique = aIndexInfo->unique;
   index->mAutoIncrement = aIndexInfo->autoIncrement;
 
   return index.forget();
 }
 
-IDBIndexRequest::IDBIndexRequest()
+IDBIndex::IDBIndex()
 : mId(LL_MININT),
   mUnique(false),
   mAutoIncrement(false)
 {
   NS_PRECONDITION(NS_IsMainThread(), "Wrong thread!");
 }
 
-IDBIndexRequest::~IDBIndexRequest()
+IDBIndex::~IDBIndex()
 {
   NS_PRECONDITION(NS_IsMainThread(), "Wrong thread!");
 }
 
-NS_IMPL_ADDREF(IDBIndexRequest)
-NS_IMPL_RELEASE(IDBIndexRequest)
+NS_IMPL_ADDREF(IDBIndex)
+NS_IMPL_RELEASE(IDBIndex)
 
-NS_INTERFACE_MAP_BEGIN(IDBIndexRequest)
+NS_INTERFACE_MAP_BEGIN(IDBIndex)
   NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, IDBRequest::Generator)
-  NS_INTERFACE_MAP_ENTRY(nsIIDBIndexRequest)
   NS_INTERFACE_MAP_ENTRY(nsIIDBIndex)
-  NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(IDBIndexRequest)
+  NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(IDBIndex)
 NS_INTERFACE_MAP_END
 
-DOMCI_DATA(IDBIndexRequest, IDBIndexRequest)
+DOMCI_DATA(IDBIndex, IDBIndex)
 
 NS_IMETHODIMP
-IDBIndexRequest::GetName(nsAString& aName)
+IDBIndex::GetName(nsAString& aName)
 {
   NS_PRECONDITION(NS_IsMainThread(), "Wrong thread!");
 
   aName.Assign(mName);
   return NS_OK;
 }
 
 NS_IMETHODIMP
-IDBIndexRequest::GetStoreName(nsAString& aStoreName)
+IDBIndex::GetStoreName(nsAString& aStoreName)
 {
   NS_PRECONDITION(NS_IsMainThread(), "Wrong thread!");
 
   return mObjectStore->GetName(aStoreName);
 }
 
 NS_IMETHODIMP
-IDBIndexRequest::GetKeyPath(nsAString& aKeyPath)
+IDBIndex::GetKeyPath(nsAString& aKeyPath)
 {
   NS_PRECONDITION(NS_IsMainThread(), "Wrong thread!");
 
   aKeyPath.Assign(mKeyPath);
   return NS_OK;
 }
 
 NS_IMETHODIMP
-IDBIndexRequest::GetUnique(PRBool* aUnique)
+IDBIndex::GetUnique(PRBool* aUnique)
 {
   NS_PRECONDITION(NS_IsMainThread(), "Wrong thread!");
 
   *aUnique = mUnique;
   return NS_OK;
 }
 
 NS_IMETHODIMP
-IDBIndexRequest::Get(nsIVariant* aKey,
-                     nsIIDBRequest** _retval)
+IDBIndex::Get(nsIVariant* aKey,
+              nsIIDBRequest** _retval)
 {
   NS_PRECONDITION(NS_IsMainThread(), "Wrong thread!");
 
   NS_WARNING("Using a slow path for Get! Fix this now!");
 
   Key key;
   nsresult rv = IDBObjectStore::GetKeyFromVariant(aKey, key);
   NS_ENSURE_SUCCESS(rv, rv);
@@ -331,18 +330,18 @@ IDBIndexRequest::Get(nsIVariant* aKey,
   rv = helper->DispatchToTransactionPool();
   NS_ENSURE_SUCCESS(rv, rv);
 
   request.forget(_retval);
   return NS_OK;
 }
 
 NS_IMETHODIMP
-IDBIndexRequest::GetObject(nsIVariant* aKey,
-                           nsIIDBRequest** _retval)
+IDBIndex::GetObject(nsIVariant* aKey,
+                    nsIIDBRequest** _retval)
 {
   NS_PRECONDITION(NS_IsMainThread(), "Wrong thread!");
 
   NS_WARNING("Using a slow path for Get! Fix this now!");
 
   Key key;
   nsresult rv = IDBObjectStore::GetKeyFromVariant(aKey, key);
   NS_ENSURE_SUCCESS(rv, rv);
@@ -360,20 +359,20 @@ IDBIndexRequest::GetObject(nsIVariant* a
   rv = helper->DispatchToTransactionPool();
   NS_ENSURE_SUCCESS(rv, rv);
 
   request.forget(_retval);
   return NS_OK;
 }
 
 NS_IMETHODIMP
-IDBIndexRequest::GetAll(nsIVariant* aKey,
-                        PRUint32 aLimit,
-                        PRUint8 aOptionalArgCount,
-                        nsIIDBRequest** _retval)
+IDBIndex::GetAll(nsIVariant* aKey,
+                 PRUint32 aLimit,
+                 PRUint8 aOptionalArgCount,
+                 nsIIDBRequest** _retval)
 {
   NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
 
   Key key;
   nsresult rv = IDBObjectStore::GetKeyFromVariant(aKey, key);
   NS_ENSURE_SUCCESS(rv, rv);
 
   if (key.IsNull()) {
@@ -393,20 +392,20 @@ IDBIndexRequest::GetAll(nsIVariant* aKey
   rv = helper->DispatchToTransactionPool();
   NS_ENSURE_SUCCESS(rv, rv);
 
   request.forget(_retval);
   return NS_OK;
 }
 
 NS_IMETHODIMP
-IDBIndexRequest::GetAllObjects(nsIVariant* aKey,
-                               PRUint32 aLimit,
-                               PRUint8 aOptionalArgCount,
-                               nsIIDBRequest** _retval)
+IDBIndex::GetAllObjects(nsIVariant* aKey,
+                        PRUint32 aLimit,
+                        PRUint8 aOptionalArgCount,
+                        nsIIDBRequest** _retval)
 {
   NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
 
   Key key;
   nsresult rv = IDBObjectStore::GetKeyFromVariant(aKey, key);
   NS_ENSURE_SUCCESS(rv, rv);
 
   if (key.IsNull()) {
@@ -426,21 +425,21 @@ IDBIndexRequest::GetAllObjects(nsIVarian
   rv = helper->DispatchToTransactionPool();
   NS_ENSURE_SUCCESS(rv, rv);
 
   request.forget(_retval);
   return NS_OK;
 }
 
 NS_IMETHODIMP
-IDBIndexRequest::OpenCursor(nsIIDBKeyRange* aKeyRange,
-                            PRUint16 aDirection,
-                            PRBool aPreload,
-                            PRUint8 aOptionalArgCount,
-                            nsIIDBRequest** _retval)
+IDBIndex::OpenCursor(nsIIDBKeyRange* aKeyRange,
+                     PRUint16 aDirection,
+                     PRBool aPreload,
+                     PRUint8 aOptionalArgCount,
+                     nsIIDBRequest** _retval)
 {
   NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
 
   if (!mObjectStore->TransactionIsOpen()) {
     return NS_ERROR_UNEXPECTED;
   }
 
   nsresult rv;
@@ -493,21 +492,21 @@ IDBIndexRequest::OpenCursor(nsIIDBKeyRan
   rv = helper->DispatchToTransactionPool();
   NS_ENSURE_SUCCESS(rv, rv);
 
   request.forget(_retval);
   return NS_OK;
 }
 
 NS_IMETHODIMP
-IDBIndexRequest::OpenObjectCursor(nsIIDBKeyRange* aKeyRange,
-                                  PRUint16 aDirection,
-                                  PRBool aPreload,
-                                  PRUint8 aOptionalArgCount,
-                                  nsIIDBRequest** _retval)
+IDBIndex::OpenObjectCursor(nsIIDBKeyRange* aKeyRange,
+                           PRUint16 aDirection,
+                           PRBool aPreload,
+                           PRUint8 aOptionalArgCount,
+                           nsIIDBRequest** _retval)
 {
   NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
 
   if (!mObjectStore->TransactionIsOpen()) {
     return NS_ERROR_UNEXPECTED;
   }
 
   nsresult rv;
rename from dom/indexedDB/IDBIndexRequest.h
rename to dom/indexedDB/IDBIndex.h
--- a/dom/indexedDB/IDBIndexRequest.h
+++ b/dom/indexedDB/IDBIndex.h
@@ -32,54 +32,53 @@
  * 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_idbindexrequest_h__
-#define mozilla_dom_indexeddb_idbindexrequest_h__
+#ifndef mozilla_dom_indexeddb_idbindex_h__
+#define mozilla_dom_indexeddb_idbindex_h__
 
 #include "mozilla/dom/indexedDB/IDBRequest.h"
 
-#include "nsIIDBIndexRequest.h"
+#include "nsIIDBIndex.h"
 
 BEGIN_INDEXEDDB_NAMESPACE
 
 class IDBObjectStore;
 struct IndexInfo;
 
-class IDBIndexRequest : public IDBRequest::Generator,
-                        public nsIIDBIndexRequest
+class IDBIndex : public IDBRequest::Generator,
+                 public nsIIDBIndex
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIIDBINDEX
-  NS_DECL_NSIIDBINDEXREQUEST
 
-  static already_AddRefed<IDBIndexRequest>
+  static already_AddRefed<IDBIndex>
   Create(IDBObjectStore* aObjectStore,
          const IndexInfo* aIndexInfo);
 
   IDBObjectStore* ObjectStore()
   {
     return mObjectStore;
   }
 
 protected:
-  IDBIndexRequest();
-  ~IDBIndexRequest();
+  IDBIndex();
+  ~IDBIndex();
 
 private:
   nsRefPtr<IDBObjectStore> mObjectStore;
 
   PRInt64 mId;
   nsString mName;
   nsString mKeyPath;
   bool mUnique;
   bool mAutoIncrement;
 };
 
 END_INDEXEDDB_NAMESPACE
 
-#endif // mozilla_dom_indexeddb_idbindexrequest_h__
+#endif // mozilla_dom_indexeddb_idbindex_h__
--- a/dom/indexedDB/IDBObjectStore.cpp
+++ b/dom/indexedDB/IDBObjectStore.cpp
@@ -40,17 +40,17 @@
 // XXX remove once we can get jsvals out of XPIDL
 #include "jscntxt.h"
 #include "jsapi.h"
 #include "nsContentUtils.h"
 #include "nsJSON.h"
 #include "IDBEvents.h"
 
 #include "IDBObjectStore.h"
-#include "IDBIndexRequest.h"
+#include "IDBIndex.h"
 
 #include "nsIIDBDatabaseException.h"
 #include "nsIJSContextStack.h"
 #include "nsIUUIDGenerator.h"
 #include "nsIVariant.h"
 
 #include "nsDOMClassInfo.h"
 #include "nsJSUtils.h"
@@ -1199,17 +1199,17 @@ IDBObjectStore::CreateIndex(const nsAStr
   NS_ENSURE_SUCCESS(rv, rv);
 
   request.forget(_retval);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 IDBObjectStore::Index(const nsAString& aName,
-                      nsIIDBIndexRequest** _retval)
+                      nsIIDBIndex** _retval)
 {
   NS_PRECONDITION(NS_IsMainThread(), "Wrong thread!");
 
   if (!mTransaction->TransactionIsOpen()) {
     return NS_ERROR_UNEXPECTED;
   }
 
   if (aName.IsEmpty()) {
@@ -1227,18 +1227,17 @@ IDBObjectStore::Index(const nsAString& a
       break;
     }
   }
 
   if (!indexInfo) {
     return NS_ERROR_NOT_AVAILABLE;
   }
 
-  nsRefPtr<IDBIndexRequest> request =
-    IDBIndexRequest::Create(this, indexInfo);
+  nsRefPtr<IDBIndex> request = IDBIndex::Create(this, indexInfo);
 
   request.forget(_retval);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 IDBObjectStore::RemoveIndex(const nsAString& aName,
                             nsIIDBRequest** _retval)
@@ -1965,17 +1964,17 @@ CreateIndexHelper::GetSuccessResult(nsIW
   }
 
   newInfo->id = mId;
   newInfo->name = mName;
   newInfo->keyPath = mKeyPath;
   newInfo->unique = mUnique;
   newInfo->autoIncrement = mAutoIncrement;
 
-  nsCOMPtr<nsIIDBIndexRequest> result;
+  nsCOMPtr<nsIIDBIndex> result;
   nsresult rv = mObjectStore->Index(mName, getter_AddRefs(result));
   NS_ENSURE_SUCCESS(rv, nsIIDBDatabaseException::UNKNOWN_ERR);
 
   aResult->SetAsISupports(result);
   return OK;
 }
 
 PRUint16
--- a/dom/indexedDB/Makefile.in
+++ b/dom/indexedDB/Makefile.in
@@ -52,31 +52,31 @@ FORCE_STATIC_LIB = 1
 EXPORTS_NAMESPACES = mozilla/dom/indexedDB
 
 CPPSRCS = \
   AsyncConnectionHelper.cpp \
   DatabaseInfo.cpp \
   IDBCursorRequest.cpp \
   IDBDatabase.cpp \
   IDBEvents.cpp \
-  IDBIndexRequest.cpp \
+  IDBIndex.cpp \
   IDBKeyRange.cpp \
   IDBObjectStore.cpp \
   IDBRequest.cpp \
   IDBTransaction.cpp \
   IDBFactory.cpp \
   LazyIdleThread.cpp \
   TransactionThreadPool.cpp \
   $(NULL)
 
 EXPORTS_mozilla/dom/indexedDB = \
   IDBCursorRequest.h \
   IDBDatabase.h \
   IDBEvents.h \
-  IDBIndexRequest.h \
+  IDBIndex.h \
   IDBKeyRange.h \
   IDBObjectStore.h \
   IDBRequest.h \
   IDBTransaction.h \
   IndexedDatabase.h \
   IDBFactory.h \
   LazyIdleThread.h \
   $(NULL)
@@ -94,17 +94,16 @@ DEFINES += -D_IMPL_NS_LAYOUT
 XPIDLSRCS = \
   nsIIDBCursor.idl \
   nsIIDBCursorRequest.idl \
   nsIIDBDatabase.idl \
   nsIIDBDatabaseException.idl \
   nsIIDBEvent.idl \
   nsIIDBErrorEvent.idl \
   nsIIDBIndex.idl \
-  nsIIDBIndexRequest.idl \
   nsIIDBKeyRange.idl \
   nsIIDBObjectStore.idl \
   nsIIDBRequest.idl \
   nsIIDBSuccessEvent.idl \
   nsIIDBTransaction.idl \
   nsIIDBTransactionEvent.idl \
   nsIIDBFactory.idl \
   $(NULL)
--- a/dom/indexedDB/nsIIDBIndex.idl
+++ b/dom/indexedDB/nsIIDBIndex.idl
@@ -34,24 +34,57 @@
  * 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 nsIIDBKeyRange;
+interface nsIIDBRequest;
+interface nsIVariant;
+
 /**
  * IDBIndex interface.  See
  * http://dev.w3.org/2006/webapi/WebSimpleDB/#idl-def-IDBIndex for more
  * information.
  */
-[scriptable, uuid(7df8a6cc-d11a-48c9-9cd4-6d18a9df3c09)]
+[scriptable, uuid(2451a60c-349a-4b7c-bab4-93ba8f52abec)]
 interface nsIIDBIndex : nsISupports
 {
   readonly attribute DOMString name;
 
   readonly attribute DOMString storeName;
 
   readonly attribute DOMString keyPath;
 
   readonly attribute boolean unique;
+
+  nsIIDBRequest
+  get(in nsIVariant key);
+
+  nsIIDBRequest
+  getObject(in nsIVariant key);
+
+  [optional_argc]
+  nsIIDBRequest
+  getAll([optional /* null */] in nsIVariant key,
+         [optional /* unlimited */] in unsigned long limit);
+
+  [optional_argc]
+  nsIIDBRequest
+  getAllObjects([optional /* null */] in nsIVariant key,
+                [optional /* unlimited */] in unsigned long limit);
+
+  [optional_argc]
+  nsIIDBRequest
+  openCursor([optional /* null */] in nsIIDBKeyRange range,
+             [optional /* nsIIDBCursor::NEXT */] in unsigned short direction,
+             [optional /* false */] in boolean preload);
+
+  [optional_argc]
+  nsIIDBRequest
+  openObjectCursor([optional /* null */] in nsIIDBKeyRange range,
+                   [optional /* nsIIDBCursor::NEXT */]
+                   in unsigned short direction,
+                   [optional /* false */] in boolean preload);
 };
deleted file mode 100644
--- a/dom/indexedDB/nsIIDBIndexRequest.idl
+++ /dev/null
@@ -1,82 +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 "nsIIDBIndex.idl"
-
-interface nsIIDBKeyRange;
-interface nsIIDBRequest;
-interface nsIVariant;
-
-/**
- * IDBIndexRequest interface.  See
- * http://dev.w3.org/2006/webapi/WebSimpleDB/#idl-def-IDBIndexRequest for more
- * information.
- */
-[scriptable, uuid(8c21dfc3-62fa-470e-bc92-7d115b0fac97)]
-interface nsIIDBIndexRequest : nsIIDBIndex
-{
-  nsIIDBRequest
-  get(in nsIVariant key);
-
-  nsIIDBRequest
-  getObject(in nsIVariant key);
-
-  [optional_argc]
-  nsIIDBRequest
-  getAll([optional /* null */] in nsIVariant key,
-         [optional /* unlimited */] in unsigned long limit);
-
-  [optional_argc]
-  nsIIDBRequest
-  getAllObjects([optional /* null */] in nsIVariant key,
-                [optional /* unlimited */] in unsigned long limit);
-
-  [optional_argc]
-  nsIIDBRequest
-  openCursor([optional /* null */] in nsIIDBKeyRange range,
-             [optional /* nsIIDBCursor::NEXT */] in unsigned short direction,
-             [optional /* false */] in boolean preload);
-
-  [optional_argc]
-  nsIIDBRequest
-  openObjectCursor([optional /* null */] in nsIIDBKeyRange range,
-                   [optional /* nsIIDBCursor::NEXT */]
-                   in unsigned short direction,
-                   [optional /* false */] in boolean preload);
-};
--- a/dom/indexedDB/nsIIDBObjectStore.idl
+++ b/dom/indexedDB/nsIIDBObjectStore.idl
@@ -34,28 +34,28 @@
  * 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 nsIIDBIndexRequest;
+interface nsIIDBIndex;
 interface nsIIDBKeyRange;
 interface nsIIDBRequest;
 interface nsIVariant;
 interface nsIDOMDOMStringList;
 
 /**
  * nsIIDBObjectStore interface.  See
  * http://dev.w3.org/2006/webapi/WebSimpleDB/#idl-def-nsIIDBObjectStore
  * for more information.
  */
-[scriptable, uuid(1168fc42-ac08-4720-822c-da820f00e15e)]
+[scriptable, uuid(9cb63602-a52f-4d21-b802-e7165143f83d)]
 interface nsIIDBObjectStore : nsISupports
 {
   readonly attribute DOMString name;
 
   readonly attribute DOMString keyPath;
 
   readonly attribute nsIDOMDOMStringList indexNames;
 
@@ -91,22 +91,22 @@ interface nsIIDBObjectStore : nsISupport
   // Success fires IDBTransactionEvent, result == IDBCursorRequest 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 == IDBIndexRequest
+  // Success fires IDBTransactionEvent, result == IDBIndex
   nsIIDBRequest
   createIndex(in AString name,
               in AString keyPath,
               [optional /* false */] in boolean unique);
 
   // Returns object immediately
-  nsIIDBIndexRequest
+  nsIIDBIndex
   index(in AString name);
 
   // Success fires IDBTransactionEvent, result == null
   nsIIDBRequest
   removeIndex(in AString name);
 };
--- a/js/src/xpconnect/src/dom_quickstubs.qsconf
+++ b/js/src/xpconnect/src/dom_quickstubs.qsconf
@@ -462,34 +462,33 @@ members = [
     # dom/indexedDB
     'nsIIDBCursor.*',
     'nsIIDBCursorRequest.*',
     'nsIIDBDatabase.*',
     'nsIIDBDatabaseException.*',
     'nsIIDBEvent.*',
     'nsIIDBErrorEvent.*',
     'nsIIDBIndex.*',
-    'nsIIDBIndexRequest.*',
     'nsIIDBKeyRange.*',
     'nsIIDBObjectStore.*',
     'nsIIDBRequest.*',
 # Remove once XPIDL can handle jsvals
 #    'nsIIDBSuccessEvent.*',
     'nsIIDBTransaction.*',
     'nsIIDBTransactionEvent.*',
     'nsIIDBFactory.*',
 # Remove once XPIDL can handle jsvals
     '-nsIIDBObjectStore.add',
     '-nsIIDBObjectStore.modify',
     '-nsIIDBObjectStore.addOrModify',
     '-nsIIDBCursorRequest.continue',
     '-nsIIDBCursorRequest.value',
     '-nsIIDBCursorRequest.update',
-    '-nsIIDBIndexRequest.openCursor',
-    '-nsIIDBIndexRequest.openObjectCursor'
+    '-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
 # a little help.
 #