зеркало из https://github.com/mozilla/gecko-dev.git
Bug 574740 - Rename nsIIndexedDatabaseRequest to nsIIDBFactory
Update interface names per specification. r=bent --HG-- rename : dom/indexedDB/IndexedDatabaseRequest.cpp => dom/indexedDB/IDBFactory.cpp rename : dom/indexedDB/IndexedDatabaseRequest.h => dom/indexedDB/IDBFactory.h rename : dom/indexedDB/nsIIndexedDatabaseRequest.idl => dom/indexedDB/nsIIDBFactory.idl
This commit is contained in:
Родитель
875cf25bd9
Коммит
3405a47131
|
@ -479,7 +479,7 @@
|
|||
|
||||
using namespace mozilla::dom;
|
||||
|
||||
#include "mozilla/dom/indexedDB/IndexedDatabaseRequest.h"
|
||||
#include "mozilla/dom/indexedDB/IDBFactory.h"
|
||||
#include "mozilla/dom/indexedDB/IDBRequest.h"
|
||||
#include "mozilla/dom/indexedDB/IDBDatabaseRequest.h"
|
||||
#include "mozilla/dom/indexedDB/IDBEvents.h"
|
||||
|
@ -1418,7 +1418,7 @@ static nsDOMClassInfoData sClassInfoData[] = {
|
|||
NS_DEFINE_CLASSINFO_DATA(CloseEvent, nsDOMGenericSH,
|
||||
DOM_DEFAULT_SCRIPTABLE_FLAGS)
|
||||
|
||||
NS_DEFINE_CLASSINFO_DATA(IndexedDatabaseRequest, nsDOMGenericSH,
|
||||
NS_DEFINE_CLASSINFO_DATA(IDBFactory, nsDOMGenericSH,
|
||||
DOM_DEFAULT_SCRIPTABLE_FLAGS)
|
||||
NS_DEFINE_CLASSINFO_DATA(IDBRequest, nsDOMGenericSH,
|
||||
DOM_DEFAULT_SCRIPTABLE_FLAGS)
|
||||
|
@ -3923,8 +3923,8 @@ nsDOMClassInfo::Init()
|
|||
DOM_CLASSINFO_EVENT_MAP_ENTRIES
|
||||
DOM_CLASSINFO_MAP_END
|
||||
|
||||
DOM_CLASSINFO_MAP_BEGIN(IndexedDatabaseRequest, nsIIndexedDatabaseRequest)
|
||||
DOM_CLASSINFO_MAP_ENTRY(nsIIndexedDatabaseRequest)
|
||||
DOM_CLASSINFO_MAP_BEGIN(IDBFactory, nsIIDBFactory)
|
||||
DOM_CLASSINFO_MAP_ENTRY(nsIIDBFactory)
|
||||
DOM_CLASSINFO_MAP_END
|
||||
|
||||
DOM_CLASSINFO_MAP_BEGIN(IDBRequest, nsIIDBRequest)
|
||||
|
|
|
@ -480,7 +480,7 @@ DOMCI_CLASS(FormData)
|
|||
DOMCI_CLASS(WebSocket)
|
||||
DOMCI_CLASS(CloseEvent)
|
||||
|
||||
DOMCI_CLASS(IndexedDatabaseRequest)
|
||||
DOMCI_CLASS(IDBFactory)
|
||||
DOMCI_CLASS(IDBRequest)
|
||||
DOMCI_CLASS(IDBDatabaseRequest)
|
||||
DOMCI_CLASS(IDBErrorEvent)
|
||||
|
|
|
@ -215,7 +215,7 @@
|
|||
#endif
|
||||
#include "prlog.h"
|
||||
|
||||
#include "mozilla/dom/indexedDB/IndexedDatabaseRequest.h"
|
||||
#include "mozilla/dom/indexedDB/IDBFactory.h"
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
static PRLogModuleInfo* gDOMLeakPRLog;
|
||||
|
@ -7596,14 +7596,14 @@ nsGlobalWindow::GetLocalStorage(nsIDOMStorage ** aLocalStorage)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsGlobalWindow::GetMoz_indexedDB(nsIIndexedDatabaseRequest** _retval)
|
||||
nsGlobalWindow::GetMoz_indexedDB(nsIIDBFactory** _retval)
|
||||
{
|
||||
if (!mIndexedDB) {
|
||||
mIndexedDB = mozilla::dom::indexedDB::IndexedDatabaseRequest::Create();
|
||||
mIndexedDB = mozilla::dom::indexedDB::IDBFactory::Create();
|
||||
NS_ENSURE_TRUE(mIndexedDB, NS_ERROR_FAILURE);
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIIndexedDatabaseRequest> request(mIndexedDB);
|
||||
nsCOMPtr<nsIIDBFactory> request(mIndexedDB);
|
||||
request.forget(_retval);
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
@ -101,7 +101,7 @@
|
|||
#include "nsPIDOMEventTarget.h"
|
||||
#include "nsIArray.h"
|
||||
#include "nsIContent.h"
|
||||
#include "nsIIndexedDatabaseRequest.h"
|
||||
#include "nsIIDBFactory.h"
|
||||
#include "nsFrameMessageManager.h"
|
||||
|
||||
#define DEFAULT_HOME_PAGE "www.mozilla.org"
|
||||
|
@ -830,7 +830,7 @@ protected:
|
|||
|
||||
nsCOMPtr<nsIDocument> mSuspendedDoc;
|
||||
|
||||
nsCOMPtr<nsIIndexedDatabaseRequest> mIndexedDB;
|
||||
nsCOMPtr<nsIIDBFactory> mIndexedDB;
|
||||
|
||||
// A unique (as long as our 64-bit counter doesn't roll over) id for
|
||||
// this window.
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
#include "IDBEvents.h"
|
||||
#include "IDBObjectStoreRequest.h"
|
||||
#include "IDBTransactionRequest.h"
|
||||
#include "IndexedDatabaseRequest.h"
|
||||
#include "IDBFactory.h"
|
||||
#include "LazyIdleThread.h"
|
||||
|
||||
USING_INDEXEDDB_NAMESPACE
|
||||
|
@ -268,7 +268,7 @@ IDBDatabaseRequest::GetOrCreateConnection(mozIStorageConnection** aResult)
|
|||
NS_ASSERTION(!NS_IsMainThread(), "Wrong thread!");
|
||||
|
||||
if (!mConnection) {
|
||||
mConnection = IndexedDatabaseRequest::GetConnection(mFilePath);
|
||||
mConnection = IDBFactory::GetConnection(mFilePath);
|
||||
NS_ENSURE_TRUE(mConnection, NS_ERROR_FAILURE);
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "IndexedDatabaseRequest.h"
|
||||
#include "IDBFactory.h"
|
||||
|
||||
#include "nsIIDBDatabaseException.h"
|
||||
#include "nsILocalFile.h"
|
||||
|
@ -451,17 +451,17 @@ ValidateVariantForKey(nsIVariant* aVariant)
|
|||
} // anonyomous namespace
|
||||
|
||||
// static
|
||||
already_AddRefed<nsIIndexedDatabaseRequest>
|
||||
IndexedDatabaseRequest::Create()
|
||||
already_AddRefed<nsIIDBFactory>
|
||||
IDBFactory::Create()
|
||||
{
|
||||
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
|
||||
nsCOMPtr<nsIIndexedDatabaseRequest> request(new IndexedDatabaseRequest());
|
||||
nsCOMPtr<nsIIDBFactory> request(new IDBFactory());
|
||||
return request.forget();
|
||||
}
|
||||
|
||||
// static
|
||||
already_AddRefed<mozIStorageConnection>
|
||||
IndexedDatabaseRequest::GetConnection(const nsAString& aDatabaseFilePath)
|
||||
IDBFactory::GetConnection(const nsAString& aDatabaseFilePath)
|
||||
{
|
||||
NS_ASSERTION(StringEndsWith(aDatabaseFilePath, NS_LITERAL_STRING(".sqlite")),
|
||||
"Bad file path!");
|
||||
|
@ -504,21 +504,21 @@ IndexedDatabaseRequest::GetConnection(const nsAString& aDatabaseFilePath)
|
|||
return connection.forget();
|
||||
}
|
||||
|
||||
NS_IMPL_ADDREF(IndexedDatabaseRequest)
|
||||
NS_IMPL_RELEASE(IndexedDatabaseRequest)
|
||||
NS_IMPL_ADDREF(IDBFactory)
|
||||
NS_IMPL_RELEASE(IDBFactory)
|
||||
|
||||
NS_INTERFACE_MAP_BEGIN(IndexedDatabaseRequest)
|
||||
NS_INTERFACE_MAP_BEGIN(IDBFactory)
|
||||
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, IDBRequest::Generator)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIIndexedDatabaseRequest)
|
||||
NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(IndexedDatabaseRequest)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIIDBFactory)
|
||||
NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(IDBFactory)
|
||||
NS_INTERFACE_MAP_END
|
||||
|
||||
DOMCI_DATA(IndexedDatabaseRequest, IndexedDatabaseRequest)
|
||||
DOMCI_DATA(IDBFactory, IDBFactory)
|
||||
|
||||
NS_IMETHODIMP
|
||||
IndexedDatabaseRequest::Open(const nsAString& aName,
|
||||
const nsAString& aDescription,
|
||||
nsIIDBRequest** _retval)
|
||||
IDBFactory::Open(const nsAString& aName,
|
||||
const nsAString& aDescription,
|
||||
nsIIDBRequest** _retval)
|
||||
{
|
||||
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
|
||||
|
||||
|
@ -555,8 +555,8 @@ IndexedDatabaseRequest::Open(const nsAString& aName,
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
IndexedDatabaseRequest::MakeSingleKeyRange(nsIVariant* aValue,
|
||||
nsIIDBKeyRange** _retval)
|
||||
IDBFactory::MakeSingleKeyRange(nsIVariant* aValue,
|
||||
nsIIDBKeyRange** _retval)
|
||||
{
|
||||
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
|
||||
|
||||
|
@ -575,9 +575,9 @@ IndexedDatabaseRequest::MakeSingleKeyRange(nsIVariant* aValue,
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
IndexedDatabaseRequest::MakeLeftBoundKeyRange(nsIVariant* aBound,
|
||||
PRBool aOpen,
|
||||
nsIIDBKeyRange** _retval)
|
||||
IDBFactory::MakeLeftBoundKeyRange(nsIVariant* aBound,
|
||||
PRBool aOpen,
|
||||
nsIIDBKeyRange** _retval)
|
||||
{
|
||||
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
|
||||
|
||||
|
@ -598,9 +598,9 @@ IndexedDatabaseRequest::MakeLeftBoundKeyRange(nsIVariant* aBound,
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
IndexedDatabaseRequest::MakeRightBoundKeyRange(nsIVariant* aBound,
|
||||
PRBool aOpen,
|
||||
nsIIDBKeyRange** _retval)
|
||||
IDBFactory::MakeRightBoundKeyRange(nsIVariant* aBound,
|
||||
PRBool aOpen,
|
||||
nsIIDBKeyRange** _retval)
|
||||
{
|
||||
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
|
||||
|
||||
|
@ -621,11 +621,11 @@ IndexedDatabaseRequest::MakeRightBoundKeyRange(nsIVariant* aBound,
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
IndexedDatabaseRequest::MakeBoundKeyRange(nsIVariant* aLeft,
|
||||
nsIVariant* aRight,
|
||||
PRBool aOpenLeft,
|
||||
PRBool aOpenRight,
|
||||
nsIIDBKeyRange **_retval)
|
||||
IDBFactory::MakeBoundKeyRange(nsIVariant* aLeft,
|
||||
nsIVariant* aRight,
|
||||
PRBool aOpenLeft,
|
||||
PRBool aOpenRight,
|
||||
nsIIDBKeyRange **_retval)
|
||||
{
|
||||
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
|
||||
|
|
@ -37,25 +37,25 @@
|
|||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef mozilla_dom_indexeddb_indexeddatabaserequest_h__
|
||||
#define mozilla_dom_indexeddb_indexeddatabaserequest_h__
|
||||
#ifndef mozilla_dom_indexeddb_idbfactory_h__
|
||||
#define mozilla_dom_indexeddb_idbfactory_h__
|
||||
|
||||
#include "mozilla/dom/indexedDB/IDBRequest.h"
|
||||
|
||||
#include "mozIStorageConnection.h"
|
||||
#include "nsIIndexedDatabaseRequest.h"
|
||||
#include "nsIIDBFactory.h"
|
||||
|
||||
BEGIN_INDEXEDDB_NAMESPACE
|
||||
|
||||
class IndexedDatabaseRequest : public IDBRequest::Generator,
|
||||
public nsIIndexedDatabaseRequest
|
||||
class IDBFactory : public IDBRequest::Generator,
|
||||
public nsIIDBFactory
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIINDEXEDDATABASEREQUEST
|
||||
NS_DECL_NSIIDBFACTORY
|
||||
|
||||
static
|
||||
already_AddRefed<nsIIndexedDatabaseRequest>
|
||||
already_AddRefed<nsIIDBFactory>
|
||||
Create();
|
||||
|
||||
static
|
||||
|
@ -64,9 +64,9 @@ public:
|
|||
|
||||
protected:
|
||||
// Only called by Create().
|
||||
IndexedDatabaseRequest() { }
|
||||
IDBFactory() { }
|
||||
};
|
||||
|
||||
END_INDEXEDDB_NAMESPACE
|
||||
|
||||
#endif // mozilla_dom_indexeddb_indexeddatabaserequest_h__
|
||||
#endif // mozilla_dom_indexeddb_idbfactory_h__
|
|
@ -47,11 +47,11 @@
|
|||
|
||||
BEGIN_INDEXEDDB_NAMESPACE
|
||||
|
||||
class IndexedDatabaseRequest;
|
||||
class IDBFactory;
|
||||
|
||||
class IDBKeyRange : public nsIIDBKeyRange
|
||||
{
|
||||
friend class IndexedDatabaseRequest;
|
||||
friend class IDBFactory;
|
||||
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
BEGIN_INDEXEDDB_NAMESPACE
|
||||
|
||||
class AsyncConnectionHelper;
|
||||
class IndexedDatabaseRequest;
|
||||
class IDBFactory;
|
||||
class IDBDatabaseRequest;
|
||||
|
||||
class IDBRequest : public nsDOMEventTargetHelper,
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
#include "IDBEvents.h"
|
||||
#include "IDBCursorRequest.h"
|
||||
#include "IDBObjectStoreRequest.h"
|
||||
#include "IndexedDatabaseRequest.h"
|
||||
#include "IDBFactory.h"
|
||||
#include "DatabaseInfo.h"
|
||||
#include "TransactionThreadPool.h"
|
||||
|
||||
|
@ -238,7 +238,7 @@ IDBTransactionRequest::GetOrCreateConnection(mozIStorageConnection** aResult)
|
|||
|
||||
if (!mConnection) {
|
||||
nsCOMPtr<mozIStorageConnection> connection =
|
||||
IndexedDatabaseRequest::GetConnection(mDatabase->FilePath());
|
||||
IDBFactory::GetConnection(mDatabase->FilePath());
|
||||
NS_ENSURE_TRUE(connection, NS_ERROR_FAILURE);
|
||||
|
||||
connection.swap(mConnection);
|
||||
|
|
|
@ -62,7 +62,7 @@ CPPSRCS = \
|
|||
IDBObjectStoreRequest.cpp \
|
||||
IDBRequest.cpp \
|
||||
IDBTransactionRequest.cpp \
|
||||
IndexedDatabaseRequest.cpp \
|
||||
IDBFactory.cpp \
|
||||
LazyIdleThread.cpp \
|
||||
TransactionThreadPool.cpp \
|
||||
$(NULL)
|
||||
|
@ -77,7 +77,7 @@ EXPORTS_mozilla/dom/indexedDB = \
|
|||
IDBRequest.h \
|
||||
IDBTransactionRequest.h \
|
||||
IndexedDatabase.h \
|
||||
IndexedDatabaseRequest.h \
|
||||
IDBFactory.h \
|
||||
LazyIdleThread.h \
|
||||
$(NULL)
|
||||
|
||||
|
@ -109,7 +109,7 @@ XPIDLSRCS = \
|
|||
nsIIDBTransaction.idl \
|
||||
nsIIDBTransactionEvent.idl \
|
||||
nsIIDBTransactionRequest.idl \
|
||||
nsIIndexedDatabaseRequest.idl \
|
||||
nsIIDBFactory.idl \
|
||||
$(NULL)
|
||||
|
||||
ifdef ENABLE_TESTS
|
||||
|
|
|
@ -46,11 +46,11 @@ interface nsIVariant;
|
|||
|
||||
/**
|
||||
* Interface that defines the indexedDB property on a window. See
|
||||
* http://dev.w3.org/2006/webapi/WebSimpleDB/#idl-def-IndexedDatabaseRequest
|
||||
* http://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#idl-def-IDBFactory
|
||||
* for more information.
|
||||
*/
|
||||
[scriptable, uuid(043161e0-93b8-43b4-94d8-f34046d679b4)]
|
||||
interface nsIIndexedDatabaseRequest : nsISupports
|
||||
[scriptable, uuid(a1e1dbd1-53a7-490a-ab6f-aa55809dd867)]
|
||||
interface nsIIDBFactory : nsISupports
|
||||
{
|
||||
nsIIDBRequest
|
||||
open(in AString name,
|
|
@ -48,7 +48,7 @@
|
|||
interface nsIDOMStorageObsolete;
|
||||
interface nsIDOMStorage;
|
||||
interface nsIDOMStorageList;
|
||||
interface nsIIndexedDatabaseRequest;
|
||||
interface nsIIDBFactory;
|
||||
|
||||
[scriptable, uuid(b6f6efd8-1bdc-43af-b8ef-6685d6260931)]
|
||||
interface nsIDOMStorageWindow : nsISupports
|
||||
|
@ -71,5 +71,5 @@ interface nsIDOMStorageWindow : nsISupports
|
|||
/**
|
||||
* Indexed Databases for the current browsing context.
|
||||
*/
|
||||
readonly attribute nsIIndexedDatabaseRequest moz_indexedDB;
|
||||
readonly attribute nsIIDBFactory moz_indexedDB;
|
||||
};
|
||||
|
|
|
@ -478,7 +478,7 @@ members = [
|
|||
'nsIIDBTransaction.*',
|
||||
'nsIIDBTransactionEvent.*',
|
||||
'nsIIDBTransactionRequest.*',
|
||||
'nsIIndexedDatabaseRequest.*',
|
||||
'nsIIDBFactory.*',
|
||||
# Remove once XPIDL can handle jsvals
|
||||
'-nsIIDBObjectStoreRequest.add',
|
||||
'-nsIIDBObjectStoreRequest.modify',
|
||||
|
|
Загрузка…
Ссылка в новой задаче