From b79eaf364cd916fb39ac84d99978f84425d11c47 Mon Sep 17 00:00:00 2001 From: matekm Date: Tue, 2 Apr 2013 20:16:25 -0400 Subject: [PATCH] Bug 784739 - Switch from NULL to nullptr in caps/; r=ehsan --- caps/include/nsScriptSecurityManager.h | 2 +- caps/src/nsNullPrincipal.cpp | 2 +- caps/src/nsPrincipal.cpp | 4 ++-- caps/src/nsScriptSecurityManager.cpp | 4 ++-- caps/src/nsSystemPrincipal.cpp | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/caps/include/nsScriptSecurityManager.h b/caps/include/nsScriptSecurityManager.h index 13d6f68bdd62..e5199d92f693 100644 --- a/caps/include/nsScriptSecurityManager.h +++ b/caps/include/nsScriptSecurityManager.h @@ -145,7 +145,7 @@ static void ClearPropertyPolicyEntry(PLDHashTable *table, PLDHashEntryHdr *entry) { PropertyPolicy* pp = (PropertyPolicy*)entry; - pp->key = NULL; + pp->key = nullptr; } // Class Policy diff --git a/caps/src/nsNullPrincipal.cpp b/caps/src/nsNullPrincipal.cpp index 3f710d84e431..1f12e944cac3 100644 --- a/caps/src/nsNullPrincipal.cpp +++ b/caps/src/nsNullPrincipal.cpp @@ -25,7 +25,7 @@ using namespace mozilla; -NS_IMPL_CLASSINFO(nsNullPrincipal, NULL, nsIClassInfo::MAIN_THREAD_ONLY, +NS_IMPL_CLASSINFO(nsNullPrincipal, nullptr, nsIClassInfo::MAIN_THREAD_ONLY, NS_NULLPRINCIPAL_CID) NS_IMPL_QUERY_INTERFACE2_CI(nsNullPrincipal, nsIPrincipal, diff --git a/caps/src/nsPrincipal.cpp b/caps/src/nsPrincipal.cpp index accaec3edf83..798c2ed84e27 100644 --- a/caps/src/nsPrincipal.cpp +++ b/caps/src/nsPrincipal.cpp @@ -144,7 +144,7 @@ void nsPrincipal::dumpImpl() } #endif -NS_IMPL_CLASSINFO(nsPrincipal, NULL, nsIClassInfo::MAIN_THREAD_ONLY, +NS_IMPL_CLASSINFO(nsPrincipal, nullptr, nsIClassInfo::MAIN_THREAD_ONLY, NS_PRINCIPAL_CID) NS_IMPL_QUERY_INTERFACE2_CI(nsPrincipal, nsIPrincipal, @@ -691,7 +691,7 @@ nsPrincipal::GetAppStatus() static const char EXPANDED_PRINCIPAL_SPEC[] = "[Expanded Principal]"; -NS_IMPL_CLASSINFO(nsExpandedPrincipal, NULL, nsIClassInfo::MAIN_THREAD_ONLY, +NS_IMPL_CLASSINFO(nsExpandedPrincipal, nullptr, nsIClassInfo::MAIN_THREAD_ONLY, NS_EXPANDEDPRINCIPAL_CID) NS_IMPL_QUERY_INTERFACE2_CI(nsExpandedPrincipal, nsIPrincipal, diff --git a/caps/src/nsScriptSecurityManager.cpp b/caps/src/nsScriptSecurityManager.cpp index 4db01d7e8d7b..d23ed55884d8 100644 --- a/caps/src/nsScriptSecurityManager.cpp +++ b/caps/src/nsScriptSecurityManager.cpp @@ -2513,8 +2513,8 @@ void nsScriptSecurityManager::Shutdown() { if (sRuntime) { - JS_SetSecurityCallbacks(sRuntime, NULL); - JS_SetTrustedPrincipals(sRuntime, NULL); + JS_SetSecurityCallbacks(sRuntime, nullptr); + JS_SetTrustedPrincipals(sRuntime, nullptr); sRuntime = nullptr; } sEnabledID = JSID_VOID; diff --git a/caps/src/nsSystemPrincipal.cpp b/caps/src/nsSystemPrincipal.cpp index 3003dd4b0f7b..f757c10cc8c1 100644 --- a/caps/src/nsSystemPrincipal.cpp +++ b/caps/src/nsSystemPrincipal.cpp @@ -18,7 +18,7 @@ #include "nsIClassInfoImpl.h" #include "nsIScriptSecurityManager.h" -NS_IMPL_CLASSINFO(nsSystemPrincipal, NULL, +NS_IMPL_CLASSINFO(nsSystemPrincipal, nullptr, nsIClassInfo::SINGLETON | nsIClassInfo::MAIN_THREAD_ONLY, NS_SYSTEMPRINCIPAL_CID) NS_IMPL_QUERY_INTERFACE2_CI(nsSystemPrincipal,