Bug 879475 - Part 003. Use nsIContentParent in indexeddb r=bent
☠☠ backed out by ef5fa0fa46c3 ☠ ☠
author"Kan-Ru Chen (陳侃如)" <kanru@kanru.info>
Mon, 09 Jun 2014 16:49:11 +0800
changeset 187530 3f1a5417af05693178de465e70ce581ee853df15
parent 187529 f1406960c26a5f18a74a5046fba0304c1541eb9a
child 187531 5b65bf834d5f8e9450542d4d46de12ae033f62e5
push id44615
push userkchen@mozilla.com
push dateMon, 09 Jun 2014 08:52:19 +0000
treeherdermozilla-inbound@00c2ba04f8d4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbent
bugs879475
milestone32.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 879475 - Part 003. Use nsIContentParent in indexeddb r=bent Based on original patch by David Zbarsky <dzbarsky@gmail.com>
dom/indexedDB/IDBCursor.cpp
dom/indexedDB/IDBDatabase.cpp
dom/indexedDB/IDBDatabase.h
dom/indexedDB/IDBFactory.cpp
dom/indexedDB/IDBFactory.h
dom/indexedDB/IDBIndex.cpp
dom/indexedDB/IDBObjectStore.cpp
dom/indexedDB/IDBObjectStore.h
dom/indexedDB/OpenDatabaseHelper.h
dom/ipc/TabParent.cpp
--- a/dom/indexedDB/IDBCursor.cpp
+++ b/dom/indexedDB/IDBCursor.cpp
@@ -1128,17 +1128,17 @@ ContinueHelper::SendResponseToChildProce
   NS_ASSERTION(actor, "How did we get this far without an actor?");
 
   InfallibleTArray<PBlobParent*> blobsParent;
 
   if (NS_SUCCEEDED(aResultCode)) {
     IDBDatabase* database = mTransaction->Database();
     NS_ASSERTION(database, "This should never be null!");
 
-    ContentParent* contentParent = database->GetContentParent();
+    nsIContentParent* contentParent = database->GetContentParent();
     NS_ASSERTION(contentParent, "This should never be null!");
 
     FileManager* fileManager = database->Manager();
     NS_ASSERTION(fileManager, "This should never be null!");
 
     const nsTArray<StructuredCloneFile>& files = mCloneReadInfo.mFiles;
 
     aResultCode =
--- a/dom/indexedDB/IDBDatabase.cpp
+++ b/dom/indexedDB/IDBDatabase.cpp
@@ -6,17 +6,17 @@
 
 #include "base/basictypes.h"
 
 #include "IDBDatabase.h"
 
 #include "mozilla/EventDispatcher.h"
 #include "mozilla/Mutex.h"
 #include "mozilla/storage.h"
-#include "mozilla/dom/ContentParent.h"
+#include "mozilla/dom/nsIContentParent.h"
 #include "mozilla/dom/DOMStringList.h"
 #include "mozilla/dom/DOMStringListBinding.h"
 #include "mozilla/dom/quota/Client.h"
 #include "mozilla/dom/quota/QuotaManager.h"
 #include "nsJSUtils.h"
 #include "nsProxyRelease.h"
 #include "nsThreadUtils.h"
 
@@ -34,17 +34,17 @@
 #include "TransactionThreadPool.h"
 
 #include "ipc/IndexedDBChild.h"
 #include "ipc/IndexedDBParent.h"
 
 #include "mozilla/dom/IDBDatabaseBinding.h"
 
 USING_INDEXEDDB_NAMESPACE
-using mozilla::dom::ContentParent;
+using mozilla::dom::nsIContentParent;
 using mozilla::dom::quota::AssertIsOnIOThread;
 using mozilla::dom::quota::Client;
 using mozilla::dom::quota::QuotaManager;
 using mozilla::ErrorResult;
 using namespace mozilla;
 using namespace mozilla::dom;
 
 namespace {
@@ -178,17 +178,17 @@ private:
 
 // static
 already_AddRefed<IDBDatabase>
 IDBDatabase::Create(IDBWrapperCache* aOwnerCache,
                     IDBFactory* aFactory,
                     already_AddRefed<DatabaseInfo> aDatabaseInfo,
                     const nsACString& aASCIIOrigin,
                     FileManager* aFileManager,
-                    mozilla::dom::ContentParent* aContentParent)
+                    mozilla::dom::nsIContentParent* aContentParent)
 {
   NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
   NS_ASSERTION(aFactory, "Null pointer!");
   NS_ASSERTION(!aASCIIOrigin.IsEmpty(), "Empty origin!");
 
   nsRefPtr<DatabaseInfo> databaseInfo(aDatabaseInfo);
   NS_ASSERTION(databaseInfo, "Null pointer!");
 
--- a/dom/indexedDB/IDBDatabase.h
+++ b/dom/indexedDB/IDBDatabase.h
@@ -23,17 +23,17 @@
 #include "mozilla/dom/indexedDB/IDBWrapperCache.h"
 
 class nsIScriptContext;
 class nsPIDOMWindow;
 
 namespace mozilla {
 class EventChainPostVisitor;
 namespace dom {
-class ContentParent;
+class nsIContentParent;
 namespace quota {
 class Client;
 }
 }
 }
 
 BEGIN_INDEXEDDB_NAMESPACE
 
@@ -63,17 +63,17 @@ public:
   NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(IDBDatabase, IDBWrapperCache)
 
   static already_AddRefed<IDBDatabase>
   Create(IDBWrapperCache* aOwnerCache,
          IDBFactory* aFactory,
          already_AddRefed<DatabaseInfo> aDatabaseInfo,
          const nsACString& aASCIIOrigin,
          FileManager* aFileManager,
-         mozilla::dom::ContentParent* aContentParent);
+         mozilla::dom::nsIContentParent* aContentParent);
 
   static IDBDatabase*
   FromStorage(nsIOfflineStorage* aStorage);
 
   // nsIDOMEventTarget
   virtual nsresult PostHandleEvent(
                      EventChainPostVisitor& aVisitor) MOZ_OVERRIDE;
 
@@ -148,17 +148,17 @@ public:
   }
 
   IndexedDBDatabaseParent*
   GetActorParent() const
   {
     return mActorParent;
   }
 
-  mozilla::dom::ContentParent*
+  mozilla::dom::nsIContentParent*
   GetContentParent() const
   {
     return mContentParent;
   }
 
   already_AddRefed<IDBObjectStore>
   CreateObjectStoreInternal(IDBTransaction* aTransaction,
                             const ObjectStoreInfoGuts& aInfo,
@@ -253,17 +253,17 @@ private:
   nsString mFilePath;
   nsCString mASCIIOrigin;
 
   nsRefPtr<FileManager> mFileManager;
 
   IndexedDBDatabaseChild* mActorChild;
   IndexedDBDatabaseParent* mActorParent;
 
-  mozilla::dom::ContentParent* mContentParent;
+  mozilla::dom::nsIContentParent* mContentParent;
 
   nsRefPtr<mozilla::dom::quota::Client> mQuotaClient;
 
   bool mInvalidated;
   bool mRegistered;
   bool mClosed;
   bool mRunningVersionChange;
 };
--- a/dom/indexedDB/IDBFactory.cpp
+++ b/dom/indexedDB/IDBFactory.cpp
@@ -9,17 +9,17 @@
 #include "nsIFile.h"
 #include "nsIPrincipal.h"
 #include "nsIScriptContext.h"
 #include "nsIScriptSecurityManager.h"
 #include "nsIXPConnect.h"
 #include "nsIXPCScriptable.h"
 
 #include <algorithm>
-#include "mozilla/dom/ContentParent.h"
+#include "mozilla/dom/nsIContentParent.h"
 #include "mozilla/dom/ContentChild.h"
 #include "mozilla/dom/IDBFactoryBinding.h"
 #include "mozilla/dom/PBrowserChild.h"
 #include "mozilla/dom/quota/OriginOrPatternString.h"
 #include "mozilla/dom/quota/QuotaManager.h"
 #include "mozilla/dom/TabChild.h"
 #include "mozilla/Preferences.h"
 #include "mozilla/storage.h"
@@ -50,17 +50,17 @@
 #include "ipc/IndexedDBChild.h"
 
 #define PREF_INDEXEDDB_ENABLED "dom.indexedDB.enabled"
 
 USING_INDEXEDDB_NAMESPACE
 USING_QUOTA_NAMESPACE
 
 using mozilla::dom::ContentChild;
-using mozilla::dom::ContentParent;
+using mozilla::dom::nsIContentParent;
 using mozilla::dom::IDBOpenDBOptions;
 using mozilla::dom::NonNull;
 using mozilla::dom::Optional;
 using mozilla::dom::TabChild;
 using mozilla::ErrorResult;
 using mozilla::Preferences;
 
 namespace {
@@ -98,17 +98,17 @@ IDBFactory::~IDBFactory()
   }
 }
 
 // static
 nsresult
 IDBFactory::Create(nsPIDOMWindow* aWindow,
                    const nsACString& aGroup,
                    const nsACString& aASCIIOrigin,
-                   ContentParent* aContentParent,
+                   nsIContentParent* aContentParent,
                    IDBFactory** aFactory)
 {
   NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
   NS_ASSERTION(aASCIIOrigin.IsEmpty() || nsContentUtils::IsCallerChrome(),
                "Non-chrome may not supply their own origin!");
 
   IDB_ENSURE_TRUE(aWindow, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR);
 
@@ -174,17 +174,17 @@ IDBFactory::Create(nsPIDOMWindow* aWindo
   factory.forget(aFactory);
   return NS_OK;
 }
 
 // static
 nsresult
 IDBFactory::Create(JSContext* aCx,
                    JS::Handle<JSObject*> aOwningObject,
-                   ContentParent* aContentParent,
+                   nsIContentParent* aContentParent,
                    IDBFactory** aFactory)
 {
   NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
   NS_ASSERTION(aCx, "Null context!");
   NS_ASSERTION(aOwningObject, "Null object!");
   NS_ASSERTION(JS_GetGlobalForObject(aCx, aOwningObject) == aOwningObject,
                "Not a global object!");
   NS_ASSERTION(nsContentUtils::IsCallerChrome(), "Only for chrome!");
@@ -224,17 +224,17 @@ IDBFactory::Create(JSContext* aCx,
   }
 
   factory.forget(aFactory);
   return NS_OK;
 }
 
 // static
 nsresult
-IDBFactory::Create(ContentParent* aContentParent,
+IDBFactory::Create(nsIContentParent* aContentParent,
                    IDBFactory** aFactory)
 {
   NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
   NS_ASSERTION(IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
   NS_ASSERTION(nsContentUtils::IsCallerChrome(), "Only for chrome!");
 
   // We need to get this information before we push a null principal to avoid
   // IsCallerChrome() assertion in quota manager.
--- a/dom/indexedDB/IDBFactory.h
+++ b/dom/indexedDB/IDBFactory.h
@@ -21,67 +21,67 @@ class nsIFileURL;
 class nsIPrincipal;
 class nsPIDOMWindow;
 template<typename> class nsRefPtr;
 
 namespace mozilla {
 class ErrorResult;
 
 namespace dom {
-class ContentParent;
+class nsIContentParent;
 class IDBOpenDBOptions;
 
 namespace indexedDB {
 
 struct DatabaseInfo;
 class IDBDatabase;
 class IDBOpenDBRequest;
 class IndexedDBChild;
 class IndexedDBParent;
 
 struct ObjectStoreInfo;
 
 class IDBFactory MOZ_FINAL : public nsISupports,
                              public nsWrapperCache
 {
-  typedef mozilla::dom::ContentParent ContentParent;
+  typedef mozilla::dom::nsIContentParent nsIContentParent;
   typedef mozilla::dom::quota::PersistenceType PersistenceType;
   typedef nsTArray<nsRefPtr<ObjectStoreInfo> > ObjectStoreInfoArray;
   typedef mozilla::dom::quota::StoragePrivilege StoragePrivilege;
 
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(IDBFactory)
 
   // Called when using IndexedDB from a window in a different process.
   static nsresult Create(nsPIDOMWindow* aWindow,
                          const nsACString& aGroup,
                          const nsACString& aASCIIOrigin,
-                         ContentParent* aContentParent,
+                         nsIContentParent* aContentParent,
                          IDBFactory** aFactory);
 
   // Called when using IndexedDB from a window in the current process.
   static nsresult Create(nsPIDOMWindow* aWindow,
-                         ContentParent* aContentParent,
+                         nsIContentParent* aContentParent,
                          IDBFactory** aFactory)
   {
     return Create(aWindow, EmptyCString(), EmptyCString(), aContentParent,
                   aFactory);
   }
 
   // Called when using IndexedDB from a JS component or a JSM in the current
   // process.
   static nsresult Create(JSContext* aCx,
                          JS::Handle<JSObject*> aOwningObject,
-                         ContentParent* aContentParent,
+                         nsIContentParent* aContentParent,
                          IDBFactory** aFactory);
 
   // Called when using IndexedDB from a JS component or a JSM in a different
   // process or from a C++ component.
-  static nsresult Create(ContentParent* aContentParent,
+  static nsresult Create(nsIContentParent* aContentParent,
                          IDBFactory** aFactory);
 
   static already_AddRefed<nsIFileURL>
   GetDatabaseFileURL(nsIFile* aDatabaseFile,
                      PersistenceType aPersistenceType,
                      const nsACString& aGroup,
                      const nsACString& aOrigin);
 
@@ -212,17 +212,17 @@ private:
   // If this factory lives on a window then mWindow must be non-null. Otherwise
   // mOwningObject must be non-null.
   nsCOMPtr<nsPIDOMWindow> mWindow;
   JS::Heap<JSObject*> mOwningObject;
 
   IndexedDBChild* mActorChild;
   IndexedDBParent* mActorParent;
 
-  mozilla::dom::ContentParent* mContentParent;
+  mozilla::dom::nsIContentParent* mContentParent;
 
   bool mRootedOwningObject;
 };
 
 } // namespace indexedDB
 } // namespace dom
 } // namespace mozilla
 
--- a/dom/indexedDB/IDBIndex.cpp
+++ b/dom/indexedDB/IDBIndex.cpp
@@ -1295,17 +1295,17 @@ GetHelper::SendResponseToChildProcess(ns
   NS_ASSERTION(actor, "How did we get this far without an actor?");
 
   InfallibleTArray<PBlobParent*> blobsParent;
 
   if (NS_SUCCEEDED(aResultCode)) {
     IDBDatabase* database = mIndex->ObjectStore()->Transaction()->Database();
     NS_ASSERTION(database, "This should never be null!");
 
-    ContentParent* contentParent = database->GetContentParent();
+    nsIContentParent* contentParent = database->GetContentParent();
     NS_ASSERTION(contentParent, "This should never be null!");
 
     FileManager* fileManager = database->Manager();
     NS_ASSERTION(fileManager, "This should never be null!");
 
     const nsTArray<StructuredCloneFile>& files = mCloneReadInfo.mFiles;
 
     aResultCode =
@@ -1669,17 +1669,17 @@ GetAllHelper::SendResponseToChildProcess
   NS_ASSERTION(actor, "How did we get this far without an actor?");
 
   GetAllResponse getAllResponse;
 
   if (NS_SUCCEEDED(aResultCode) && !mCloneReadInfos.IsEmpty()) {
     IDBDatabase* database = mIndex->ObjectStore()->Transaction()->Database();
     NS_ASSERTION(database, "This should never be null!");
 
-    ContentParent* contentParent = database->GetContentParent();
+    nsIContentParent* contentParent = database->GetContentParent();
     NS_ASSERTION(contentParent, "This should never be null!");
 
     FileManager* fileManager = database->Manager();
     NS_ASSERTION(fileManager, "This should never be null!");
 
     uint32_t length = mCloneReadInfos.Length();
 
     InfallibleTArray<SerializedStructuredCloneReadInfo>& infos =
@@ -2353,17 +2353,17 @@ OpenCursorHelper::SendResponseToChildPro
   NS_ASSERTION(actor, "How did we get this far without an actor?");
 
   InfallibleTArray<PBlobParent*> blobsParent;
 
   if (NS_SUCCEEDED(aResultCode)) {
     IDBDatabase* database = mIndex->ObjectStore()->Transaction()->Database();
     NS_ASSERTION(database, "This should never be null!");
 
-    ContentParent* contentParent = database->GetContentParent();
+    nsIContentParent* contentParent = database->GetContentParent();
     NS_ASSERTION(contentParent, "This should never be null!");
 
     FileManager* fileManager = database->Manager();
     NS_ASSERTION(fileManager, "This should never be null!");
 
     const nsTArray<StructuredCloneFile>& files = mCloneReadInfo.mFiles;
 
     aResultCode =
--- a/dom/indexedDB/IDBObjectStore.cpp
+++ b/dom/indexedDB/IDBObjectStore.cpp
@@ -9,17 +9,17 @@
 #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/nsIContentParent.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/Endian.h"
 #include "mozilla/storage.h"
 #include "nsContentUtils.h"
 #include "nsDOMClassInfo.h"
@@ -1743,17 +1743,17 @@ IDBObjectStore::ConvertActorsToBlobs(
       file->mFile = actor->GetBlob();
     }
   }
 }
 
 // static
 nsresult
 IDBObjectStore::ConvertBlobsToActors(
-                                    ContentParent* aContentParent,
+                                    nsIContentParent* aContentParent,
                                     FileManager* aFileManager,
                                     const nsTArray<StructuredCloneFile>& aFiles,
                                     InfallibleTArray<PBlobParent*>& aActors)
 {
   NS_ASSERTION(IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
   NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
   NS_ASSERTION(aContentParent, "Null contentParent!");
   NS_ASSERTION(aFileManager, "Null file manager!");
@@ -3517,17 +3517,17 @@ GetHelper::SendResponseToChildProcess(ns
   NS_ASSERTION(actor, "How did we get this far without an actor?");
 
   InfallibleTArray<PBlobParent*> blobsParent;
 
   if (NS_SUCCEEDED(aResultCode)) {
     IDBDatabase* database = mObjectStore->Transaction()->Database();
     NS_ASSERTION(database, "This should never be null!");
 
-    ContentParent* contentParent = database->GetContentParent();
+    nsIContentParent* contentParent = database->GetContentParent();
     NS_ASSERTION(contentParent, "This should never be null!");
 
     FileManager* fileManager = database->Manager();
     NS_ASSERTION(fileManager, "This should never be null!");
 
     const nsTArray<StructuredCloneFile>& files = mCloneReadInfo.mFiles;
 
     aResultCode =
@@ -3982,17 +3982,17 @@ OpenCursorHelper::SendResponseToChildPro
   NS_ASSERTION(actor, "How did we get this far without an actor?");
 
   InfallibleTArray<PBlobParent*> blobsParent;
 
   if (NS_SUCCEEDED(aResultCode)) {
     IDBDatabase* database = mObjectStore->Transaction()->Database();
     NS_ASSERTION(database, "This should never be null!");
 
-    ContentParent* contentParent = database->GetContentParent();
+    nsIContentParent* contentParent = database->GetContentParent();
     NS_ASSERTION(contentParent, "This should never be null!");
 
     FileManager* fileManager = database->Manager();
     NS_ASSERTION(fileManager, "This should never be null!");
 
     const nsTArray<StructuredCloneFile>& files = mCloneReadInfo.mFiles;
 
     aResultCode =
@@ -4742,17 +4742,17 @@ GetAllHelper::SendResponseToChildProcess
   IndexedDBRequestParentBase* actor = mRequest->GetActorParent();
   NS_ASSERTION(actor, "How did we get this far without an actor?");
 
   GetAllResponse getAllResponse;
   if (NS_SUCCEEDED(aResultCode) && !mCloneReadInfos.IsEmpty()) {
     IDBDatabase* database = mObjectStore->Transaction()->Database();
     NS_ASSERTION(database, "This should never be null!");
 
-    ContentParent* contentParent = database->GetContentParent();
+    nsIContentParent* contentParent = database->GetContentParent();
     NS_ASSERTION(contentParent, "This should never be null!");
 
     FileManager* fileManager = database->Manager();
     NS_ASSERTION(fileManager, "This should never be null!");
 
     uint32_t length = mCloneReadInfos.Length();
 
     InfallibleTArray<SerializedStructuredCloneReadInfo>& infos =
--- a/dom/indexedDB/IDBObjectStore.h
+++ b/dom/indexedDB/IDBObjectStore.h
@@ -21,17 +21,17 @@
 #include "mozilla/dom/indexedDB/KeyPath.h"
 
 class nsIDOMBlob;
 class nsIScriptContext;
 class nsPIDOMWindow;
 
 namespace mozilla {
 namespace dom {
-class ContentParent;
+class nsIContentParent;
 class PBlobChild;
 class PBlobParent;
 }
 }
 
 BEGIN_INDEXEDDB_NAMESPACE
 
 class AsyncConnectionHelper;
@@ -117,17 +117,17 @@ public:
                                void* aClosure);
 
   static nsresult
   ConvertFileIdsToArray(const nsAString& aFileIds,
                         nsTArray<int64_t>& aResult);
 
   // Called only in the main process.
   static nsresult
-  ConvertBlobsToActors(ContentParent* aContentParent,
+  ConvertBlobsToActors(nsIContentParent* aContentParent,
                        FileManager* aFileManager,
                        const nsTArray<StructuredCloneFile>& aFiles,
                        InfallibleTArray<PBlobParent*>& aActors);
 
   // Called only in the child process.
   static void
   ConvertActorsToBlobs(const InfallibleTArray<PBlobChild*>& aActors,
                        nsTArray<StructuredCloneFile>& aFiles);
--- a/dom/indexedDB/OpenDatabaseHelper.h
+++ b/dom/indexedDB/OpenDatabaseHelper.h
@@ -14,17 +14,17 @@
 #include "DatabaseInfo.h"
 #include "IDBDatabase.h"
 #include "IDBRequest.h"
 
 class mozIStorageConnection;
 
 namespace mozilla {
 namespace dom {
-class ContentParent;
+class nsIContentParent;
 }
 }
 
 BEGIN_INDEXEDDB_NAMESPACE
 
 class CheckPermissionsHelper;
 
 class OpenDatabaseHelper : public HelperBase
@@ -37,17 +37,17 @@ class OpenDatabaseHelper : public Helper
 public:
   OpenDatabaseHelper(IDBOpenDBRequest* aRequest,
                      const nsAString& aName,
                      const nsACString& aGroup,
                      const nsACString& aASCIIOrigin,
                      uint64_t aRequestedVersion,
                      PersistenceType aPersistenceType,
                      bool aForDeletion,
-                     mozilla::dom::ContentParent* aContentParent,
+                     mozilla::dom::nsIContentParent* aContentParent,
                      StoragePrivilege aPrivilege)
     : HelperBase(aRequest), mOpenDBRequest(aRequest), mName(aName),
       mGroup(aGroup), mASCIIOrigin(aASCIIOrigin),
       mRequestedVersion(aRequestedVersion), mPersistenceType(aPersistenceType),
       mForDeletion(aForDeletion), mPrivilege(aPrivilege),
       mContentParent(aContentParent), mCurrentVersion(0), mLastObjectStoreId(0),
       mLastIndexId(0), mState(eCreated), mResultCode(NS_OK),
       mLoadDBMetadata(false),
@@ -132,17 +132,17 @@ protected:
   nsString mName;
   nsCString mGroup;
   nsCString mASCIIOrigin;
   uint64_t mRequestedVersion;
   PersistenceType mPersistenceType;
   bool mForDeletion;
   StoragePrivilege mPrivilege;
   nsCString mDatabaseId;
-  mozilla::dom::ContentParent* mContentParent;
+  mozilla::dom::nsIContentParent* mContentParent;
 
   // Out-params.
   nsTArray<nsRefPtr<ObjectStoreInfo> > mObjectStores;
   uint64_t mCurrentVersion;
   nsString mDatabaseFilePath;
   int64_t mLastObjectStoreId;
   int64_t mLastIndexId;
   nsRefPtr<IDBDatabase> mDatabase;
--- a/dom/ipc/TabParent.cpp
+++ b/dom/ipc/TabParent.cpp
@@ -1708,18 +1708,17 @@ TabParent::RecvPIndexedDBConstructor(PIn
   if (!outer || outer->GetCurrentInnerWindow() != window) {
     *aAllowed = false;
     return true;
   }
 
   NS_ASSERTION(Manager(), "Null manager?!");
 
   nsRefPtr<IDBFactory> factory;
-  rv = IDBFactory::Create(window, aGroup, aASCIIOrigin,
-                          Manager()->AsContentParent(),
+  rv = IDBFactory::Create(window, aGroup, aASCIIOrigin, Manager(),
                           getter_AddRefs(factory));
   NS_ENSURE_SUCCESS(rv, false);
 
   if (!factory) {
     *aAllowed = false;
     return true;
   }