Bug 784739 - Switch from NULL to nullptr in dom/indexedDB/; r=ehsan

--HG--
extra : rebase_source : 911f00517a3281b87cde7c90c2708ef8807054f7
This commit is contained in:
Birunthan Mohanathas 2013-11-25 14:01:59 -05:00
parent 6c562d6852
commit 46363842f7
6 changed files with 34 additions and 34 deletions

View File

@ -1444,7 +1444,7 @@ GetAllKeysHelper::GetSuccessResult(JSContext* aCx,
nsTArray<Key> keys;
mKeys.SwapElements(keys);
JS::Rooted<JSObject*> array(aCx, JS_NewArrayObject(aCx, 0, NULL));
JS::Rooted<JSObject*> array(aCx, JS_NewArrayObject(aCx, 0, nullptr));
if (!array) {
NS_WARNING("Failed to make array!");
return NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR;

View File

@ -613,7 +613,7 @@ class ThreadLocalJSRuntime
static const unsigned sRuntimeHeapSize = 768 * 1024;
ThreadLocalJSRuntime()
: mRuntime(NULL), mContext(NULL), mGlobal(NULL)
: mRuntime(nullptr), mContext(nullptr), mGlobal(nullptr)
{
MOZ_COUNT_CTOR(ThreadLocalJSRuntime);
}
@ -634,7 +634,7 @@ class ThreadLocalJSRuntime
JSAutoRequest ar(mContext);
mGlobal = JS_NewGlobalObject(mContext, &sGlobalClass, NULL,
mGlobal = JS_NewGlobalObject(mContext, &sGlobalClass, nullptr,
JS::FireOnNewGlobalHook);
NS_ENSURE_TRUE(mGlobal, NS_ERROR_OUT_OF_MEMORY);
@ -4924,7 +4924,7 @@ GetAllKeysHelper::GetSuccessResult(JSContext* aCx,
nsTArray<Key> keys;
mKeys.SwapElements(keys);
JS::Rooted<JSObject*> array(aCx, JS_NewArrayObject(aCx, 0, NULL));
JS::Rooted<JSObject*> array(aCx, JS_NewArrayObject(aCx, 0, nullptr));
if (!array) {
NS_WARNING("Failed to make array!");
return NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR;

View File

@ -49,14 +49,14 @@ public:
virtual nsresult
OnSuccess() MOZ_OVERRIDE
{
static_cast<IDBOpenDBRequest*>(mRequest.get())->SetTransaction(NULL);
static_cast<IDBOpenDBRequest*>(mRequest.get())->SetTransaction(nullptr);
return AsyncConnectionHelper::OnSuccess();
}
virtual void
OnError() MOZ_OVERRIDE
{
static_cast<IDBOpenDBRequest*>(mRequest.get())->SetTransaction(NULL);
static_cast<IDBOpenDBRequest*>(mRequest.get())->SetTransaction(nullptr);
AsyncConnectionHelper::OnError();
}
@ -102,7 +102,7 @@ class IPCDeleteDatabaseHelper : public AsyncConnectionHelper
{
public:
IPCDeleteDatabaseHelper(IDBRequest* aRequest)
: AsyncConnectionHelper(static_cast<IDBDatabase*>(NULL), aRequest)
: AsyncConnectionHelper(static_cast<IDBDatabase*>(nullptr), aRequest)
{ }
virtual nsresult UnpackResponseFromParentProcess(
@ -201,9 +201,9 @@ void
IndexedDBChild::ActorDestroy(ActorDestroyReason aWhy)
{
if (mFactory) {
mFactory->SetActor(static_cast<IndexedDBChild*>(NULL));
mFactory->SetActor(static_cast<IndexedDBChild*>(nullptr));
#ifdef DEBUG
mFactory = NULL;
mFactory = nullptr;
#endif
}
}
@ -246,7 +246,7 @@ IndexedDBChild::DeallocPIndexedDBDeleteDatabaseRequestChild(
IndexedDBDatabaseChild::IndexedDBDatabaseChild(const nsString& aName,
uint64_t aVersion)
: mDatabase(NULL), mName(aName), mVersion(aVersion)
: mDatabase(nullptr), mName(aName), mVersion(aVersion)
{
MOZ_COUNT_CTOR(IndexedDBDatabaseChild);
}
@ -325,7 +325,7 @@ IndexedDBDatabaseChild::EnsureDatabase(
if (!mDatabase) {
nsRefPtr<IDBDatabase> database =
IDBDatabase::Create(aRequest, aRequest->Factory(), dbInfo.forget(),
aDBInfo.origin, NULL, NULL);
aDBInfo.origin, nullptr, nullptr);
if (!database) {
NS_WARNING("Failed to create database!");
return false;
@ -344,9 +344,9 @@ void
IndexedDBDatabaseChild::ActorDestroy(ActorDestroyReason aWhy)
{
if (mDatabase) {
mDatabase->SetActor(static_cast<IndexedDBDatabaseChild*>(NULL));
mDatabase->SetActor(static_cast<IndexedDBDatabaseChild*>(nullptr));
#ifdef DEBUG
mDatabase = NULL;
mDatabase = nullptr;
#endif
}
}
@ -415,7 +415,7 @@ IndexedDBDatabaseChild::RecvError(const nsresult& aRv)
request->Reset();
}
else {
openHelper = new IPCOpenDatabaseHelper(NULL, request);
openHelper = new IPCOpenDatabaseHelper(nullptr, request);
}
openHelper->SetError(aRv);
@ -557,7 +557,7 @@ IndexedDBDatabaseChild::DeallocPIndexedDBTransactionChild(
******************************************************************************/
IndexedDBTransactionChild::IndexedDBTransactionChild()
: mTransaction(NULL)
: mTransaction(nullptr)
{
MOZ_COUNT_CTOR(IndexedDBTransactionChild);
}
@ -624,9 +624,9 @@ IndexedDBTransactionChild::ActorDestroy(ActorDestroyReason aWhy)
}
if (mTransaction) {
mTransaction->SetActor(static_cast<IndexedDBTransactionChild*>(NULL));
mTransaction->SetActor(static_cast<IndexedDBTransactionChild*>(nullptr));
#ifdef DEBUG
mTransaction = NULL;
mTransaction = nullptr;
#endif
}
}
@ -717,9 +717,9 @@ void
IndexedDBObjectStoreChild::ActorDestroy(ActorDestroyReason aWhy)
{
if (mObjectStore) {
mObjectStore->SetActor(static_cast<IndexedDBObjectStoreChild*>(NULL));
mObjectStore->SetActor(static_cast<IndexedDBObjectStoreChild*>(nullptr));
#ifdef DEBUG
mObjectStore = NULL;
mObjectStore = nullptr;
#endif
}
}
@ -860,9 +860,9 @@ void
IndexedDBIndexChild::ActorDestroy(ActorDestroyReason aWhy)
{
if (mIndex) {
mIndex->SetActor(static_cast<IndexedDBIndexChild*>(NULL));
mIndex->SetActor(static_cast<IndexedDBIndexChild*>(nullptr));
#ifdef DEBUG
mIndex = NULL;
mIndex = nullptr;
#endif
}
}
@ -952,7 +952,7 @@ IndexedDBIndexChild::DeallocPIndexedDBCursorChild(PIndexedDBCursorChild* aActor)
******************************************************************************/
IndexedDBCursorChild::IndexedDBCursorChild()
: mCursor(NULL)
: mCursor(nullptr)
{
MOZ_COUNT_CTOR(IndexedDBCursorChild);
}
@ -990,9 +990,9 @@ void
IndexedDBCursorChild::ActorDestroy(ActorDestroyReason aWhy)
{
if (mCursor) {
mCursor->SetActor(static_cast<IndexedDBCursorChild*>(NULL));
mCursor->SetActor(static_cast<IndexedDBCursorChild*>(nullptr));
#ifdef DEBUG
mCursor = NULL;
mCursor = nullptr;
#endif
}
}

View File

@ -53,7 +53,7 @@ AutoSetCurrentTransaction::AutoSetCurrentTransaction(
AutoSetCurrentTransaction::~AutoSetCurrentTransaction()
{
AsyncConnectionHelper::SetCurrentTransaction(NULL);
AsyncConnectionHelper::SetCurrentTransaction(nullptr);
}
/*******************************************************************************
@ -567,7 +567,7 @@ void
IndexedDBDatabaseParent::ActorDestroy(ActorDestroyReason aWhy)
{
if (mDatabase) {
mDatabase->SetActor(static_cast<IndexedDBDatabaseParent*>(NULL));
mDatabase->SetActor(static_cast<IndexedDBDatabaseParent*>(nullptr));
mDatabase->Invalidate();
}
}
@ -746,7 +746,7 @@ IndexedDBTransactionParent::ActorDestroy(ActorDestroyReason aWhy)
mArtificialRequestCount = false;
#endif
}
mTransaction->SetActor(static_cast<IndexedDBTransactionParent*>(NULL));
mTransaction->SetActor(static_cast<IndexedDBTransactionParent*>(nullptr));
}
}
@ -998,7 +998,7 @@ void
IndexedDBCursorParent::ActorDestroy(ActorDestroyReason aWhy)
{
MOZ_ASSERT(mCursor);
mCursor->SetActor(static_cast<IndexedDBCursorParent*>(NULL));
mCursor->SetActor(static_cast<IndexedDBCursorParent*>(nullptr));
}
bool
@ -1075,7 +1075,7 @@ void
IndexedDBObjectStoreParent::ActorDestroy(ActorDestroyReason aWhy)
{
if (mObjectStore) {
mObjectStore->SetActor(static_cast<IndexedDBObjectStoreParent*>(NULL));
mObjectStore->SetActor(static_cast<IndexedDBObjectStoreParent*>(nullptr));
}
}
@ -1359,7 +1359,7 @@ void
IndexedDBIndexParent::ActorDestroy(ActorDestroyReason aWhy)
{
if (mIndex) {
mIndex->SetActor(static_cast<IndexedDBIndexParent*>(NULL));
mIndex->SetActor(static_cast<IndexedDBIndexParent*>(nullptr));
}
}
@ -1460,7 +1460,7 @@ void
IndexedDBRequestParentBase::ActorDestroy(ActorDestroyReason aWhy)
{
if (mRequest) {
mRequest->SetActor(NULL);
mRequest->SetActor(nullptr);
}
}

View File

@ -93,7 +93,7 @@ public:
void
NoteDyingActor()
{
mActor = NULL;
mActor = nullptr;
}
NS_IMETHOD

View File

@ -244,7 +244,7 @@ struct ParamTraits<mozilla::dom::indexedDB::SerializedStructuredCloneReadInfo>
return false;
}
} else {
aResult->data = NULL;
aResult->data = nullptr;
}
return true;
@ -283,7 +283,7 @@ struct ParamTraits<mozilla::dom::indexedDB::SerializedStructuredCloneWriteInfo>
return false;
}
} else {
aResult->data = NULL;
aResult->data = nullptr;
}
if (!ReadParam(aMsg, aIter, &aResult->offsetToKeyProp)) {