Bug 784739 - Switch from NULL to nullptr in xpcom/ (3/3); r=ehsan
authorBirunthan Mohanathas <birunthan@mohanathas.com>
Thu, 10 Oct 2013 16:42:16 -0400
changeset 150403 ad59ee55f59606bb7d07bf0d442a9078041c20a1
parent 150402 20f2a3e61f370b7374d78c7c03f4420f92f12756
child 150404 cbae15cadd74085839def063ed32d506d9df66a8
push id2991
push userkwierso@gmail.com
push dateFri, 11 Oct 2013 02:10:33 +0000
treeherderfx-team@98b44fcfebb2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersehsan
bugs784739
milestone27.0a1
Bug 784739 - Switch from NULL to nullptr in xpcom/ (3/3); r=ehsan
xpcom/reflect/xptcall/src/md/os2/xptcstubs_gcc_x86_os2.cpp
xpcom/reflect/xptcall/src/md/unix/xptcstubs_alpha_openbsd.cpp
xpcom/reflect/xptcall/src/md/unix/xptcstubs_amd64_openbsd.cpp
xpcom/reflect/xptcall/src/md/unix/xptcstubs_arm.cpp
xpcom/reflect/xptcall/src/md/unix/xptcstubs_arm_netbsd.cpp
xpcom/reflect/xptcall/src/md/unix/xptcstubs_arm_openbsd.cpp
xpcom/reflect/xptcall/src/md/unix/xptcstubs_gcc_x86_unix.cpp
xpcom/reflect/xptcall/src/md/unix/xptcstubs_ipf32.cpp
xpcom/reflect/xptcall/src/md/unix/xptcstubs_ipf64.cpp
xpcom/reflect/xptcall/src/md/unix/xptcstubs_linux_alpha.cpp
xpcom/reflect/xptcall/src/md/unix/xptcstubs_linux_m68k.cpp
xpcom/reflect/xptcall/src/md/unix/xptcstubs_linux_s390.cpp
xpcom/reflect/xptcall/src/md/unix/xptcstubs_linux_s390x.cpp
xpcom/reflect/xptcall/src/md/unix/xptcstubs_mips.cpp
xpcom/reflect/xptcall/src/md/unix/xptcstubs_mips64.cpp
xpcom/reflect/xptcall/src/md/unix/xptcstubs_netbsd_m68k.cpp
xpcom/reflect/xptcall/src/md/unix/xptcstubs_nto_arm.cpp
xpcom/reflect/xptcall/src/md/unix/xptcstubs_nto_shle.cpp
xpcom/reflect/xptcall/src/md/unix/xptcstubs_pa32.cpp
xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc64_linux.cpp
xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_aix.cpp
xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_aix64.cpp
xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_linux.cpp
xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_netbsd.cpp
xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_openbsd.cpp
xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_rhapsody.cpp
xpcom/reflect/xptcall/src/md/unix/xptcstubs_sparc64_openbsd.cpp
xpcom/reflect/xptcall/src/md/unix/xptcstubs_sparc_netbsd.cpp
xpcom/reflect/xptcall/src/md/unix/xptcstubs_sparc_openbsd.cpp
xpcom/reflect/xptcall/src/md/unix/xptcstubs_sparc_solaris.cpp
xpcom/reflect/xptcall/src/md/unix/xptcstubs_sparcv9_solaris.cpp
xpcom/reflect/xptcall/src/md/unix/xptcstubs_x86_64_darwin.cpp
xpcom/reflect/xptcall/src/md/unix/xptcstubs_x86_64_linux.cpp
xpcom/reflect/xptcall/src/md/unix/xptcstubs_x86_64_solaris.cpp
xpcom/reflect/xptcall/src/md/unix/xptcstubs_x86_solaris.cpp
xpcom/reflect/xptcall/src/md/win32/xptcstubs.cpp
xpcom/reflect/xptcall/src/md/win32/xptcstubs_x86_64.cpp
xpcom/reflect/xptcall/src/md/win32/xptcstubs_x86_64_gnu.cpp
xpcom/reflect/xptcall/tests/TestXPTCInvoke.cpp
xpcom/reflect/xptinfo/src/xptiInterfaceInfo.cpp
xpcom/reflect/xptinfo/src/xptiInterfaceInfoManager.cpp
xpcom/reflect/xptinfo/src/xptiWorkingSet.cpp
xpcom/reflect/xptinfo/tests/TestInterfaceInfo.cpp
xpcom/sample/nsSample.cpp
xpcom/sample/nsSampleModule.cpp
xpcom/string/src/nsTStringObsolete.cpp
xpcom/tests/RegFactory.cpp
xpcom/tests/SizeTest01.cpp
xpcom/tests/TestHarness.h
xpcom/tests/TestID.cpp
xpcom/tests/TestObserverService.cpp
xpcom/tests/TestPipe.cpp
xpcom/tests/TestPipes.cpp
xpcom/tests/TestRacingServiceManager.cpp
xpcom/tests/TestRegistrationOrder.cpp
xpcom/tests/TestShutdown.cpp
xpcom/tests/bug656331_component/TestComponent.cpp
xpcom/tests/component/TestComponent.cpp
xpcom/tests/component_no_aslr/TestComponent.cpp
xpcom/tests/windows/TestCOM.cpp
xpcom/tests/windows/TestHelloXPLoop.cpp
xpcom/tests/windows/TestNTFSPermissions.cpp
xpcom/tests/windows/TestWinFileAttribs.cpp
xpcom/threads/HangMonitor.cpp
xpcom/threads/nsEnvironment.cpp
xpcom/threads/nsProcessCommon.cpp
xpcom/threads/nsThreadManager.cpp
xpcom/threads/nsThreadPool.cpp
xpcom/windbgdlg/windbgdlg.cpp
--- a/xpcom/reflect/xptcall/src/md/os2/xptcstubs_gcc_x86_os2.cpp
+++ b/xpcom/reflect/xptcall/src/md/os2/xptcstubs_gcc_x86_os2.cpp
@@ -12,17 +12,17 @@
 extern "C" {
 static nsresult ATTRIBUTE_USED
 __attribute__ ((regparm (3)))
 PrepareAndDispatch(uint32_t methodIndex, nsXPTCStubBase* self, uint32_t* args)
 {
 #define PARAM_BUFFER_COUNT     16
 
     nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
-    nsXPTCMiniVariant* dispatchParams = NULL;
+    nsXPTCMiniVariant* dispatchParams = nullptr;
     const nsXPTMethodInfo* info;
     uint8_t paramCount;
     uint8_t i;
     nsresult result = NS_ERROR_FAILURE;
 
     NS_ASSERTION(self,"no self");
 
     self->mEntry->GetMethodInfo(uint16_t(methodIndex), &info);
--- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_alpha_openbsd.cpp
+++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_alpha_openbsd.cpp
@@ -15,17 +15,17 @@ PrepareAndDispatch(nsXPTCStubBase* self,
 
 static nsresult
 PrepareAndDispatch(nsXPTCStubBase* self, uint32_t methodIndex, uint64_t* args)
 {
     const uint8_t PARAM_BUFFER_COUNT = 16;
     const uint8_t NUM_ARG_REGS = 6-1;        // -1 for "this" pointer
 
     nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
-    nsXPTCMiniVariant* dispatchParams = NULL;
+    nsXPTCMiniVariant* dispatchParams = nullptr;
     const nsXPTMethodInfo* info;
     uint8_t paramCount;
     uint8_t i;
     nsresult result = NS_ERROR_FAILURE;
 
     NS_ASSERTION(self,"no self");
 
     self->mEntry->GetMethodInfo(uint16_t(methodIndex), &info);
--- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_amd64_openbsd.cpp
+++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_amd64_openbsd.cpp
@@ -28,17 +28,17 @@ const uint32_t FPR_COUNT            = 8;
 // The parameters are mapped into an array of type 'nsXPTCMiniVariant'
 // and then the method gets called.
 
 extern "C" nsresult
 PrepareAndDispatch(nsXPTCStubBase * self, uint32_t methodIndex,
                    uint64_t * args, uint64_t * gpregs, double *fpregs)
 {
     nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
-    nsXPTCMiniVariant* dispatchParams = NULL;
+    nsXPTCMiniVariant* dispatchParams = nullptr;
     const nsXPTMethodInfo* info;
     uint32_t paramCount;
     uint32_t i;
     nsresult result = NS_ERROR_FAILURE;
 
     NS_ASSERTION(self,"no self");
 
     self->mEntry->GetMethodInfo(uint16_t(methodIndex), &info);
--- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_arm.cpp
+++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_arm.cpp
@@ -42,17 +42,17 @@ DONT_DROP_OR_WARN;
 #endif
 
 static nsresult
 PrepareAndDispatch(nsXPTCStubBase* self, uint32_t methodIndex, uint32_t* args)
 {
 #define PARAM_BUFFER_COUNT     16
 
     nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
-    nsXPTCMiniVariant* dispatchParams = NULL;
+    nsXPTCMiniVariant* dispatchParams = nullptr;
     const nsXPTMethodInfo* info;
     uint8_t paramCount;
     uint8_t i;
     nsresult result = NS_ERROR_FAILURE;
 
     NS_ASSERTION(self,"no self");
 
     self->mEntry->GetMethodInfo(uint16_t(methodIndex), &info);
--- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_arm_netbsd.cpp
+++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_arm_netbsd.cpp
@@ -8,18 +8,18 @@
 #include "xptcprivate.h"
 
 nsresult
 PrepareAndDispatch(nsXPTCStubBase* self, uint32_t methodIndex, uint32_t* args)
 {
 #define PARAM_BUFFER_COUNT     16
 
     nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
-    nsXPTCMiniVariant* dispatchParams = NULL;
-    nsIInterfaceInfo* iface_info = NULL;
+    nsXPTCMiniVariant* dispatchParams = nullptr;
+    nsIInterfaceInfo* iface_info = nullptr;
     const nsXPTMethodInfo* info;
     uint8_t paramCount;
     uint8_t i;
     nsresult result = NS_ERROR_FAILURE;
 
     NS_ASSERTION(self,"no self");
 
     self->GetInterfaceInfo(&iface_info);
--- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_arm_openbsd.cpp
+++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_arm_openbsd.cpp
@@ -25,17 +25,17 @@ static nsresult PrepareAndDispatch(nsXPT
 DONT_DROP_OR_WARN;
 
 static nsresult
 PrepareAndDispatch(nsXPTCStubBase* self, uint32_t methodIndex, uint32_t* args)
 {
 #define PARAM_BUFFER_COUNT     16
 
     nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
-    nsXPTCMiniVariant* dispatchParams = NULL;
+    nsXPTCMiniVariant* dispatchParams = nullptr;
     const nsXPTMethodInfo* info;
     uint8_t paramCount;
     uint8_t i;
     nsresult result = NS_ERROR_FAILURE;
 
     NS_ASSERTION(self,"no self");
 
     self->mEntry->GetMethodInfo(uint16_t(methodIndex), &info);
--- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_gcc_x86_unix.cpp
+++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_gcc_x86_unix.cpp
@@ -12,17 +12,17 @@
 extern "C" {
 static nsresult ATTRIBUTE_USED
 __attribute__ ((regparm (3)))
 PrepareAndDispatch(uint32_t methodIndex, nsXPTCStubBase* self, uint32_t* args)
 {
 #define PARAM_BUFFER_COUNT     16
 
     nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
-    nsXPTCMiniVariant* dispatchParams = NULL;
+    nsXPTCMiniVariant* dispatchParams = nullptr;
     const nsXPTMethodInfo* info;
     uint8_t paramCount;
     uint8_t i;
     nsresult result = NS_ERROR_FAILURE;
 
     NS_ASSERTION(self,"no self");
 
     self->mEntry->GetMethodInfo(uint16_t(methodIndex), &info);
--- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ipf32.cpp
+++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ipf32.cpp
@@ -19,17 +19,17 @@
 extern "C" nsresult
 PrepareAndDispatch(nsXPTCStubBase* self, uint32_t methodIndex,
   uint64_t* intargs, uint64_t* floatargs, uint64_t* restargs)
 {
 
 #define PARAM_BUFFER_COUNT     16
 
   nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
-  nsXPTCMiniVariant* dispatchParams = NULL;
+  nsXPTCMiniVariant* dispatchParams = nullptr;
   const nsXPTMethodInfo* info;
   nsresult result = NS_ERROR_FAILURE;
   uint64_t* iargs = intargs;
   uint64_t* fargs = floatargs;
   uint8_t paramCount;
   uint8_t i;
 
   NS_ASSERTION(self,"no self");
--- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ipf64.cpp
+++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ipf64.cpp
@@ -20,17 +20,17 @@
 extern "C" nsresult
 PrepareAndDispatch(nsXPTCStubBase* self, uint32_t methodIndex,
   uint64_t* intargs, uint64_t* floatargs, uint64_t* restargs)
 {
 
 #define PARAM_BUFFER_COUNT     16
 
   nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
-  nsXPTCMiniVariant* dispatchParams = NULL;
+  nsXPTCMiniVariant* dispatchParams = nullptr;
   const nsXPTMethodInfo* info;
   nsresult result = NS_ERROR_FAILURE;
   uint64_t* iargs = intargs;
   uint64_t* fargs = floatargs;
   uint8_t paramCount;
   uint8_t i;
 
   NS_ASSERTION(self,"no self");
--- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_linux_alpha.cpp
+++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_linux_alpha.cpp
@@ -15,17 +15,17 @@ PrepareAndDispatch(nsXPTCStubBase* self,
 
 static nsresult
 PrepareAndDispatch(nsXPTCStubBase* self, uint32_t methodIndex, uint64_t* args)
 {
     const uint8_t PARAM_BUFFER_COUNT = 16;
     const uint8_t NUM_ARG_REGS = 6-1;        // -1 for "this" pointer
 
     nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
-    nsXPTCMiniVariant* dispatchParams = NULL;
+    nsXPTCMiniVariant* dispatchParams = nullptr;
     const nsXPTMethodInfo* info;
     uint8_t paramCount;
     uint8_t i;
     nsresult result = NS_ERROR_FAILURE;
 
     NS_ASSERTION(self,"no self");
 
     self->mEntry->GetMethodInfo(uint16_t(methodIndex), &info);
--- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_linux_m68k.cpp
+++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_linux_m68k.cpp
@@ -10,17 +10,17 @@
 
 extern "C" {
     nsresult
     PrepareAndDispatch(nsXPTCStubBase* self, uint32_t methodIndex, uint32_t* args)
     {
 #define PARAM_BUFFER_COUNT     16
 
         nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
-        nsXPTCMiniVariant* dispatchParams = NULL;
+        nsXPTCMiniVariant* dispatchParams = nullptr;
         const nsXPTMethodInfo* info;
         uint8_t paramCount;
         uint8_t i;
         nsresult result = NS_ERROR_FAILURE;
 
         NS_ASSERTION(self,"no self");
 
         self->mEntry->GetMethodInfo(uint16_t(methodIndex), &info);
--- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_linux_s390.cpp
+++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_linux_s390.cpp
@@ -11,17 +11,17 @@
 
 static nsresult
 PrepareAndDispatch(nsXPTCStubBase* self, uint32_t methodIndex, 
                    uint32_t* a_gpr, uint64_t *a_fpr, uint32_t *a_ov)
 {
 #define PARAM_BUFFER_COUNT     16
 
     nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
-    nsXPTCMiniVariant* dispatchParams = NULL;
+    nsXPTCMiniVariant* dispatchParams = nullptr;
     const nsXPTMethodInfo* info;
     uint8_t paramCount;
     uint8_t i;
     nsresult result = NS_ERROR_FAILURE;
 
     NS_ASSERTION(self,"no self");
 
     self->mEntry->GetMethodInfo(uint16_t(methodIndex), &info);
--- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_linux_s390x.cpp
+++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_linux_s390x.cpp
@@ -11,17 +11,17 @@
 
 static nsresult
 PrepareAndDispatch(nsXPTCStubBase* self, uint32_t methodIndex, 
                    uint64_t* a_gpr, uint64_t *a_fpr, uint64_t *a_ov)
 {
 #define PARAM_BUFFER_COUNT     16
 
     nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
-    nsXPTCMiniVariant* dispatchParams = NULL;
+    nsXPTCMiniVariant* dispatchParams = nullptr;
     const nsXPTMethodInfo* info;
     uint8_t paramCount;
     uint8_t i;
     nsresult result = NS_ERROR_FAILURE;
 
     NS_ASSERTION(self,"no self");
 
     self->mEntry->GetMethodInfo(uint16_t(methodIndex), &info);
--- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_mips.cpp
+++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_mips.cpp
@@ -18,17 +18,17 @@
 extern "C" nsresult
 PrepareAndDispatch(nsXPTCStubBase* self, uint32_t methodIndex, uint32_t* args)
 {
     args++; // always skip over a0
 
 #define PARAM_BUFFER_COUNT		16
 
     nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
-    nsXPTCMiniVariant* dispatchParams = NULL;
+    nsXPTCMiniVariant* dispatchParams = nullptr;
     const nsXPTMethodInfo* info;
     uint8_t paramCount;
     uint8_t i;
     nsresult result = NS_ERROR_FAILURE;
 
     NS_ASSERTION(self,"no self");
 
     self->mEntry->GetMethodInfo(uint16_t(methodIndex), &info);
--- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_mips64.cpp
+++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_mips64.cpp
@@ -24,17 +24,17 @@ extern "C" nsresult
 PrepareAndDispatch(nsXPTCStubBase* self, uint32_t methodIndex, uint64_t* args,
                    uint64_t *gprData, double *fprData)
 {
 #define PARAM_BUFFER_COUNT        16
 #define PARAM_GPR_COUNT            7
 #define PARAM_FPR_COUNT            7
 
     nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
-    nsXPTCMiniVariant* dispatchParams = NULL;
+    nsXPTCMiniVariant* dispatchParams = nullptr;
     const nsXPTMethodInfo* info;
     uint8_t paramCount;
     uint8_t i;
     nsresult result = NS_ERROR_FAILURE;
 
     NS_ASSERTION(self,"no self");
 
     self->mEntry->GetMethodInfo(uint16_t(methodIndex), &info);
--- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_netbsd_m68k.cpp
+++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_netbsd_m68k.cpp
@@ -13,18 +13,18 @@
 
 extern "C" {
     static nsresult
     PrepareAndDispatch(nsXPTCStubBase* self, uint32_t methodIndex, uint32_t* args)
     {
 #define PARAM_BUFFER_COUNT     16
 
         nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
-        nsXPTCMiniVariant* dispatchParams = NULL;
-        nsIInterfaceInfo* iface_info = NULL;
+        nsXPTCMiniVariant* dispatchParams = nullptr;
+        nsIInterfaceInfo* iface_info = nullptr;
         const nsXPTMethodInfo* info;
         uint8_t paramCount;
         uint8_t i;
         nsresult result = NS_ERROR_FAILURE;
 
         NS_ASSERTION(self,"no self");
 
         self->GetInterfaceInfo(&iface_info);
--- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_nto_arm.cpp
+++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_nto_arm.cpp
@@ -15,18 +15,18 @@
 static nsresult PrepareAndDispatch(nsXPTCStubBase* self, uint32_t methodIndex, uint32_t* args) asm("_PrepareAndDispatch");
 
 static nsresult
 PrepareAndDispatch(nsXPTCStubBase* self, uint32_t methodIndex, uint32_t* args)
 {
 #define PARAM_BUFFER_COUNT     16
 
     nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
-    nsXPTCMiniVariant* dispatchParams = NULL;
-    nsIInterfaceInfo* iface_info = NULL;
+    nsXPTCMiniVariant* dispatchParams = nullptr;
+    nsIInterfaceInfo* iface_info = nullptr;
     const nsXPTMethodInfo* info;
     uint8_t paramCount;
     uint8_t i;
     nsresult result = NS_ERROR_FAILURE;
 
     NS_ASSERTION(self,"no self");
 
     self->GetInterfaceInfo(&iface_info);
--- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_nto_shle.cpp
+++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_nto_shle.cpp
@@ -22,18 +22,18 @@ PrepareAndDispatch(nsXPTCStubBase* self,
 				   uint32_t *intRegParams, float *floatRegParams)
 {
 #define PARAM_BUFFER_COUNT     16
 
 	nsresult result = NS_ERROR_FAILURE;
 	int intCount = 0;
 	int floatCount = 0;
     nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
-    nsXPTCMiniVariant* dispatchParams = NULL;
-    nsIInterfaceInfo* iface_info = NULL;
+    nsXPTCMiniVariant* dispatchParams = nullptr;
+    nsIInterfaceInfo* iface_info = nullptr;
     const nsXPTMethodInfo* info;
     uint8_t paramCount;
 	uint8_t i;
 
 	NS_ASSERTION(self,"no self");
 
 	self->GetInterfaceInfo(&iface_info);
 	NS_ASSERTION(iface_info,"no interface info");
--- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_pa32.cpp
+++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_pa32.cpp
@@ -22,17 +22,17 @@ PrepareAndDispatch(nsXPTCStubBase* self,
   typedef struct {
     uint32_t hi;
     uint32_t lo;
   } DU;
 
 #define PARAM_BUFFER_COUNT     16
 
   nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
-  nsXPTCMiniVariant* dispatchParams = NULL;
+  nsXPTCMiniVariant* dispatchParams = nullptr;
   const nsXPTMethodInfo* info;
   int32_t regwords = 1; /* self pointer is not in the variant records */
   nsresult result = NS_ERROR_FAILURE;
   uint8_t paramCount;
   uint8_t i;
 
   NS_ASSERTION(self,"no self");
 
--- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc64_linux.cpp
+++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc64_linux.cpp
@@ -35,17 +35,17 @@
 extern "C" nsresult
 PrepareAndDispatch(nsXPTCStubBase* self,
                    uint64_t methodIndex,
                    uint64_t* args,
                    uint64_t *gprData,
                    double *fprData)
 {
     nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
-    nsXPTCMiniVariant* dispatchParams = NULL;
+    nsXPTCMiniVariant* dispatchParams = nullptr;
     const nsXPTMethodInfo* info;
     uint32_t paramCount;
     uint32_t i;
     nsresult result = NS_ERROR_FAILURE;
 
     NS_ASSERTION(self,"no self");
 
     self->mEntry->GetMethodInfo(uint16_t(methodIndex), &info);
--- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_aix.cpp
+++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_aix.cpp
@@ -23,18 +23,18 @@ PrepareAndDispatch(nsXPTCStubBase* self,
         uint32_t hi;
         uint32_t lo;      // have to move 64 bit entities as 32 bit halves since
     } DU;               // stack slots are not guaranteed 16 byte aligned
 
 #define PARAM_BUFFER_COUNT     16
 #define PARAM_GPR_COUNT         7  
 
     nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
-    nsXPTCMiniVariant* dispatchParams = NULL;
-    const nsXPTMethodInfo* info = NULL;
+    nsXPTCMiniVariant* dispatchParams = nullptr;
+    const nsXPTMethodInfo* info = nullptr;
     uint8_t paramCount;
     uint8_t i;
     nsresult result = NS_ERROR_FAILURE;
 
     NS_ASSERTION(self,"no self");
 
     self->mEntry->GetMethodInfo(uint16_t(methodIndex), &info);
     NS_ASSERTION(info,"no method info");
--- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_aix64.cpp
+++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_aix64.cpp
@@ -18,18 +18,18 @@
 extern "C" nsresult
 PrepareAndDispatch(nsXPTCStubBase* self, uint64_t methodIndex, uint64_t* args, uint64_t *gprData, double *fprData)
 {
 
 #define PARAM_BUFFER_COUNT     16
 #define PARAM_GPR_COUNT         7  
 
     nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
-    nsXPTCMiniVariant* dispatchParams = NULL;
-    const nsXPTMethodInfo* info = NULL;
+    nsXPTCMiniVariant* dispatchParams = nullptr;
+    const nsXPTMethodInfo* info = nullptr;
     uint8_t paramCount;
     uint8_t i;
     nsresult result = NS_ERROR_FAILURE;
 
     NS_ASSERTION(self,"no self");
 
     self->mEntry->GetMethodInfo(uint16_t(methodIndex), &info);
     NS_ASSERTION(info,"no method info");
--- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_linux.cpp
+++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_linux.cpp
@@ -34,18 +34,18 @@
 extern "C" nsresult
 PrepareAndDispatch(nsXPTCStubBase* self,
                    uint32_t methodIndex,
                    uint32_t* args,
                    uint32_t *gprData,
                    double *fprData)
 {
     nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
-    nsXPTCMiniVariant* dispatchParams = NULL;
-    const nsXPTMethodInfo* info = NULL;
+    nsXPTCMiniVariant* dispatchParams = nullptr;
+    const nsXPTMethodInfo* info = nullptr;
     uint32_t paramCount;
     uint32_t i;
     nsresult result = NS_ERROR_FAILURE;
 
     NS_ASSERTION(self,"no self");
 
     self->mEntry->GetMethodInfo(uint16_t(methodIndex), &info);
     NS_ASSERTION(info,"no method info");
--- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_netbsd.cpp
+++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_netbsd.cpp
@@ -30,18 +30,18 @@
 extern "C" nsresult
 PrepareAndDispatch(nsXPTCStubBase* self,
                    uint32_t methodIndex,
                    uint32_t* args,
                    uint32_t *gprData,
                    double *fprData)
 {
     nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
-    nsXPTCMiniVariant* dispatchParams = NULL;
-    nsIInterfaceInfo* iface_info = NULL;
+    nsXPTCMiniVariant* dispatchParams = nullptr;
+    nsIInterfaceInfo* iface_info = nullptr;
     const nsXPTMethodInfo* info;
     uint32_t paramCount;
     uint32_t i;
     nsresult result = NS_ERROR_FAILURE;
 
     NS_ASSERTION(self,"no self");
 
     self->GetInterfaceInfo(&iface_info);
--- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_openbsd.cpp
+++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_openbsd.cpp
@@ -31,18 +31,18 @@
 extern "C" nsresult
 PrepareAndDispatch(nsXPTCStubBase* self,
                    uint32_t methodIndex,
                    uint32_t* args,
                    uint32_t *gprData,
                    double *fprData)
 {
     nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
-    nsXPTCMiniVariant* dispatchParams = NULL;
-    const nsXPTMethodInfo* info = NULL;
+    nsXPTCMiniVariant* dispatchParams = nullptr;
+    const nsXPTMethodInfo* info = nullptr;
     uint32_t paramCount;
     uint32_t i;
     nsresult result = NS_ERROR_FAILURE;
 
     NS_ASSERTION(self,"no self");
 
     self->mEntry->GetMethodInfo(uint16_t(methodIndex), &info);
     NS_ASSERTION(info,"no method info");
--- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_rhapsody.cpp
+++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_rhapsody.cpp
@@ -42,17 +42,17 @@ PrepareAndDispatch(
   uint32_t       *argsStack,
   uint32_t       *argsGPR,
   double         *argsFPR) {
 #define PARAM_BUFFER_COUNT 16
 #define PARAM_FPR_COUNT    13
 #define PARAM_GPR_COUNT     7
 
   nsXPTCMiniVariant      paramBuffer[PARAM_BUFFER_COUNT];
-  nsXPTCMiniVariant     *dispatchParams = NULL;
+  nsXPTCMiniVariant     *dispatchParams = nullptr;
   const nsXPTMethodInfo *methodInfo;
   uint8_t                paramCount;
   uint8_t                i;
   nsresult               result         = NS_ERROR_FAILURE;
   uint32_t               argIndex       = 0;
   uint32_t               fprIndex       = 0;
 
   typedef struct {
--- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_sparc64_openbsd.cpp
+++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_sparc64_openbsd.cpp
@@ -13,17 +13,17 @@
 
 extern "C" nsresult
 PrepareAndDispatch(nsXPTCStubBase* self, uint64_t methodIndex, uint64_t* args)
 {
 
 #define PARAM_BUFFER_COUNT     16
 
     nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
-    nsXPTCMiniVariant* dispatchParams = NULL;
+    nsXPTCMiniVariant* dispatchParams = nullptr;
     const nsXPTMethodInfo* info;
     uint8_t paramCount;
     uint8_t i;
     nsresult result = NS_ERROR_FAILURE;
 
     NS_ASSERTION(self,"no self");
 
     self->mEntry->GetMethodInfo(uint16_t(methodIndex), &info);
--- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_sparc_netbsd.cpp
+++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_sparc_netbsd.cpp
@@ -17,18 +17,18 @@ PrepareAndDispatch(nsXPTCStubBase* self,
         uint32_t hi;
         uint32_t lo;
     } DU;               // have to move 64 bit entities as 32 bit halves since
                         // stack slots are not guaranteed 16 byte aligned
 
 #define PARAM_BUFFER_COUNT     16
 
     nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
-    nsXPTCMiniVariant* dispatchParams = NULL;
-    nsIInterfaceInfo* iface_info = NULL;
+    nsXPTCMiniVariant* dispatchParams = nullptr;
+    nsIInterfaceInfo* iface_info = nullptr;
     const nsXPTMethodInfo* info;
     uint8_t paramCount;
     uint8_t i;
     nsresult result = NS_ERROR_FAILURE;
 
     NS_ASSERTION(self,"no self");
 
     self->GetInterfaceInfo(&iface_info);
--- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_sparc_openbsd.cpp
+++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_sparc_openbsd.cpp
@@ -17,18 +17,18 @@ PrepareAndDispatch(nsXPTCStubBase* self,
         uint32_t hi;
         uint32_t lo;
     } DU;               // have to move 64 bit entities as 32 bit halves since
                         // stack slots are not guaranteed 16 byte aligned
 
 #define PARAM_BUFFER_COUNT     16
 
     nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
-    nsXPTCMiniVariant* dispatchParams = NULL;
-    nsIInterfaceInfo* iface_info = NULL;
+    nsXPTCMiniVariant* dispatchParams = nullptr;
+    nsIInterfaceInfo* iface_info = nullptr;
     const nsXPTMethodInfo* info;
     uint8_t paramCount;
     uint8_t i;
     nsresult result = NS_ERROR_FAILURE;
 
     NS_ASSERTION(self,"no self");
 
     self->GetInterfaceInfo(&iface_info);
--- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_sparc_solaris.cpp
+++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_sparc_solaris.cpp
@@ -18,17 +18,17 @@ PrepareAndDispatch(nsXPTCStubBase* self,
         uint32_t hi;
         uint32_t lo;
     } DU;               // have to move 64 bit entities as 32 bit halves since
                         // stack slots are not guaranteed 16 byte aligned
 
 #define PARAM_BUFFER_COUNT     16
 
     nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
-    nsXPTCMiniVariant* dispatchParams = NULL;
+    nsXPTCMiniVariant* dispatchParams = nullptr;
     const nsXPTMethodInfo* info;
     uint8_t paramCount;
     uint8_t i;
     nsresult result = NS_ERROR_FAILURE;
 
     NS_ASSERTION(self,"no self");
 
     self->mEntry->GetMethodInfo(uint16_t(methodIndex), &info);
--- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_sparcv9_solaris.cpp
+++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_sparcv9_solaris.cpp
@@ -13,17 +13,17 @@
 
 extern "C" nsresult
 PrepareAndDispatch(nsXPTCStubBase* self, uint64_t methodIndex, uint64_t* args)
 {
 
 #define PARAM_BUFFER_COUNT     16
 
     nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
-    nsXPTCMiniVariant* dispatchParams = NULL;
+    nsXPTCMiniVariant* dispatchParams = nullptr;
     const nsXPTMethodInfo* info;
     uint8_t paramCount;
     uint8_t i;
     nsresult result = NS_ERROR_FAILURE;
 
     NS_ASSERTION(self,"no self");
 
     self->mEntry->GetMethodInfo(uint16_t(methodIndex), &info);
--- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_x86_64_darwin.cpp
+++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_x86_64_darwin.cpp
@@ -30,17 +30,17 @@ const uint32_t FPR_COUNT            = 8;
 // The parameters are mapped into an array of type 'nsXPTCMiniVariant'
 // and then the method gets called.
 
 extern "C" nsresult
 PrepareAndDispatch(nsXPTCStubBase * self, uint32_t methodIndex,
                    uint64_t * args, uint64_t * gpregs, double *fpregs)
 {
     nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
-    nsXPTCMiniVariant* dispatchParams = NULL;
+    nsXPTCMiniVariant* dispatchParams = nullptr;
     const nsXPTMethodInfo* info;
     uint32_t paramCount;
     uint32_t i;
     nsresult result = NS_ERROR_FAILURE;
 
     NS_ASSERTION(self,"no self");
 
     self->mEntry->GetMethodInfo(uint16_t(methodIndex), &info);
--- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_x86_64_linux.cpp
+++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_x86_64_linux.cpp
@@ -30,17 +30,17 @@ const uint32_t FPR_COUNT            = 8;
 // The parameters are mapped into an array of type 'nsXPTCMiniVariant'
 // and then the method gets called.
 
 extern "C" nsresult
 PrepareAndDispatch(nsXPTCStubBase * self, uint32_t methodIndex,
                    uint64_t * args, uint64_t * gpregs, double *fpregs)
 {
     nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
-    nsXPTCMiniVariant* dispatchParams = NULL;
+    nsXPTCMiniVariant* dispatchParams = nullptr;
     const nsXPTMethodInfo* info;
     uint32_t paramCount;
     uint32_t i;
     nsresult result = NS_ERROR_FAILURE;
 
     NS_ASSERTION(self,"no self");
 
     self->mEntry->GetMethodInfo(uint16_t(methodIndex), &info);
--- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_x86_64_solaris.cpp
+++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_x86_64_solaris.cpp
@@ -30,17 +30,17 @@ const uint32_t FPR_COUNT            = 8;
 // The parameters are mapped into an array of type 'nsXPTCMiniVariant'
 // and then the method gets called.
 
 extern "C" nsresult
 PrepareAndDispatch(nsXPTCStubBase * self, uint32_t methodIndex,
                    uint64_t * args, uint64_t * gpregs, double *fpregs)
 {
     nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
-    nsXPTCMiniVariant* dispatchParams = NULL;
+    nsXPTCMiniVariant* dispatchParams = nullptr;
     const nsXPTMethodInfo* info;
     uint32_t paramCount;
     uint32_t i;
     nsresult result = NS_ERROR_FAILURE;
 
     NS_ASSERTION(self,"no self");
 
     self->mEntry->GetMethodInfo(uint16_t(methodIndex), &info);
--- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_x86_solaris.cpp
+++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_x86_solaris.cpp
@@ -10,17 +10,17 @@
 #include "xptiprivate.h"
 
 nsresult
 PrepareAndDispatch(nsXPTCStubBase* self, uint32_t methodIndex, uint32_t* args)
 {
 #define PARAM_BUFFER_COUNT     16
 
     nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
-    nsXPTCMiniVariant* dispatchParams = NULL;
+    nsXPTCMiniVariant* dispatchParams = nullptr;
     const nsXPTMethodInfo* info;
     uint8_t paramCount;
     uint8_t i;
     nsresult result = NS_ERROR_FAILURE;
 
     NS_ASSERTION(self,"no self");
 
     self->mEntry->GetMethodInfo(uint16_t(methodIndex), &info);
--- a/xpcom/reflect/xptcall/src/md/win32/xptcstubs.cpp
+++ b/xpcom/reflect/xptcall/src/md/win32/xptcstubs.cpp
@@ -19,18 +19,18 @@ static
 #endif
 nsresult __stdcall
 PrepareAndDispatch(nsXPTCStubBase* self, uint32_t methodIndex,
                    uint32_t* args, uint32_t* stackBytesToPop)
 {
 #define PARAM_BUFFER_COUNT     16
 
     nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
-    nsXPTCMiniVariant* dispatchParams = NULL;
-    const nsXPTMethodInfo* info = NULL;
+    nsXPTCMiniVariant* dispatchParams = nullptr;
+    const nsXPTMethodInfo* info = nullptr;
     uint8_t paramCount;
     uint8_t i;
     nsresult result = NS_ERROR_FAILURE;
 
     // If anything fails before stackBytesToPop can be set then
     // the failure is completely catastrophic!
 
     NS_ASSERTION(self,"no self");
--- a/xpcom/reflect/xptcall/src/md/win32/xptcstubs_x86_64.cpp
+++ b/xpcom/reflect/xptcall/src/md/win32/xptcstubs_x86_64.cpp
@@ -19,18 +19,18 @@ PrepareAndDispatch(nsXPTCStubBase* self,
 #define PARAM_BUFFER_COUNT  16
 //
 // "this" pointer is first parameter, so parameter count is 3.
 //
 #define PARAM_GPR_COUNT   3
 #define PARAM_FPR_COUNT   3
 
     nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
-    nsXPTCMiniVariant* dispatchParams = NULL;
-    const nsXPTMethodInfo* info = NULL;
+    nsXPTCMiniVariant* dispatchParams = nullptr;
+    const nsXPTMethodInfo* info = nullptr;
     uint8_t paramCount;
     uint8_t i;
     nsresult result = NS_ERROR_FAILURE;
 
     NS_ASSERTION(self,"no self");
 
     self->mEntry->GetMethodInfo(uint16_t(methodIndex), &info);
     NS_ASSERTION(info,"no method info");
--- a/xpcom/reflect/xptcall/src/md/win32/xptcstubs_x86_64_gnu.cpp
+++ b/xpcom/reflect/xptcall/src/md/win32/xptcstubs_x86_64_gnu.cpp
@@ -23,18 +23,18 @@ PrepareAndDispatch(nsXPTCStubBase * self
 #define PARAM_BUFFER_COUNT  16
 //
 // "this" pointer is first parameter, so parameter count is 3.
 //
 #define PARAM_GPR_COUNT   3
 #define PARAM_FPR_COUNT   3
 
     nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
-    nsXPTCMiniVariant* dispatchParams = NULL;
-    const nsXPTMethodInfo* info = NULL;
+    nsXPTCMiniVariant* dispatchParams = nullptr;
+    const nsXPTMethodInfo* info = nullptr;
     uint8_t paramCount;
     uint8_t i;
     nsresult result = NS_ERROR_FAILURE;
 
     NS_ASSERTION(self, "no self");
 
     self->mEntry->GetMethodInfo(uint16_t(methodIndex), &info);
     NS_ASSERTION(info, "no method info");
--- a/xpcom/reflect/xptcall/tests/TestXPTCInvoke.cpp
+++ b/xpcom/reflect/xptcall/tests/TestXPTCInvoke.cpp
@@ -1127,21 +1127,21 @@ FooBarImpl::FooBarImpl() : MyName("FooBa
 const char* FooBarImpl::ImplName()
 {
     return MyName;
 }
 
 NS_IMETHODIMP
 FooBarImpl::QueryInterface(REFNSIID aIID, void** aInstancePtr)
 {
-  if (NULL == aInstancePtr) {
+  if (nullptr == aInstancePtr) {
     return NS_ERROR_NULL_POINTER;
   }
 
-  *aInstancePtr = NULL;
+  *aInstancePtr = nullptr;
 
 
   if (aIID.Equals(NS_GET_IID(nsIFoo))) {
     *aInstancePtr = (void*) static_cast<nsIFoo*>(this);
     NS_ADDREF_THIS();
     return NS_OK;
   }
   if (aIID.Equals(NS_GET_IID(nsIBar))) {
@@ -1298,21 +1298,21 @@ NS_IMETHODIMP FooBarImpl2::BarMethod2(in
     printf("\tFooBarImpl2::BarMethod2 called with i == %d, local value = %x\n", 
            i, value);
     return NS_OK;
 }
 
 NS_IMETHODIMP
 FooBarImpl2::QueryInterface(REFNSIID aIID, void** aInstancePtr)
 {
-  if (NULL == aInstancePtr) {
+  if (nullptr == aInstancePtr) {
     return NS_ERROR_NULL_POINTER;
   }
 
-  *aInstancePtr = NULL;
+  *aInstancePtr = nullptr;
 
 
   if (aIID.Equals(NS_GET_IID(nsIFoo))) {
     *aInstancePtr = (void*) static_cast<nsIFoo2*>(this);
     NS_ADDREF_THIS();
     return NS_OK;
   }
   if (aIID.Equals(NS_GET_IID(nsIBar))) {
--- a/xpcom/reflect/xptinfo/src/xptiInterfaceInfo.cpp
+++ b/xpcom/reflect/xptinfo/src/xptiInterfaceInfo.cpp
@@ -54,18 +54,18 @@ xptiInterfaceEntry::xptiInterfaceEntry(c
                                        const nsID& iid,
                                        XPTInterfaceDescriptor* aDescriptor,
                                        xptiTypelibGuts* aTypelib)
     : mIID(iid)
     , mDescriptor(aDescriptor)
     , mMethodBaseIndex(0)
     , mConstantBaseIndex(0)
     , mTypelib(aTypelib)
-    , mParent(NULL)
-    , mInfo(NULL)
+    , mParent(nullptr)
+    , mInfo(nullptr)
     , mFlags(0)
 {
     memcpy(mName, name, nameLength);
     SetResolvedState(PARTIALLY_RESOLVED);
 }
 
 bool 
 xptiInterfaceEntry::Resolve()
@@ -186,17 +186,17 @@ xptiInterfaceEntry::GetMethodInfo(uint16
 
     if(index < mMethodBaseIndex)
         return mParent->GetMethodInfo(index, info);
 
     if(index >= mMethodBaseIndex + 
                 mDescriptor->num_methods)
     {
         NS_ERROR("bad param");
-        *info = NULL;
+        *info = nullptr;
         return NS_ERROR_INVALID_ARG;
     }
 
     // else...
     *info = reinterpret_cast<nsXPTMethodInfo*>
        (&mDescriptor->method_descriptors[index - mMethodBaseIndex]);
     return NS_OK;
 }
@@ -240,17 +240,17 @@ xptiInterfaceEntry::GetConstant(uint16_t
 
     if(index < mConstantBaseIndex)
         return mParent->GetConstant(index, constant);
 
     if(index >= mConstantBaseIndex + 
                 mDescriptor->num_constants)
     {
         NS_PRECONDITION(0, "bad param");
-        *constant = NULL;
+        *constant = nullptr;
         return NS_ERROR_INVALID_ARG;
     }
 
     // else...
     *constant =
         reinterpret_cast<nsXPTConstant*>
                         (&mDescriptor->
                                 const_descriptors[index -
--- a/xpcom/reflect/xptinfo/src/xptiInterfaceInfoManager.cpp
+++ b/xpcom/reflect/xptinfo/src/xptiInterfaceInfoManager.cpp
@@ -30,18 +30,18 @@ static int gCallCount = 0;
 
 size_t
 XPTInterfaceInfoManager::SizeOfIncludingThis(MallocSizeOf aMallocSizeOf)
 {
     size_t n = aMallocSizeOf(this);
     ReentrantMonitorAutoEnter monitor(mWorkingSet.mTableReentrantMonitor);
     // The entries themselves are allocated out of an arena accounted
     // for elsewhere, so don't measure them
-    n += mWorkingSet.mIIDTable.SizeOfExcludingThis(NULL, aMallocSizeOf);
-    n += mWorkingSet.mNameTable.SizeOfExcludingThis(NULL, aMallocSizeOf);
+    n += mWorkingSet.mIIDTable.SizeOfExcludingThis(nullptr, aMallocSizeOf);
+    n += mWorkingSet.mNameTable.SizeOfExcludingThis(nullptr, aMallocSizeOf);
     return n;
 }
 
 class XPTIWorkingSetReporter MOZ_FINAL : public MemoryUniReporter
 {
 public:
     XPTIWorkingSetReporter()
       : MemoryUniReporter("explicit/xpti-working-set", KIND_HEAP, UNITS_BYTES,
--- a/xpcom/reflect/xptinfo/src/xptiWorkingSet.cpp
+++ b/xpcom/reflect/xptinfo/src/xptiWorkingSet.cpp
@@ -32,17 +32,17 @@ xpti_Invalidator(const char* keyname, xp
     entry->LockedInvalidateInterfaceInfo();
     return PL_DHASH_NEXT;
 }
 
 void 
 XPTInterfaceInfoManager::xptiWorkingSet::InvalidateInterfaceInfos()
 {
     ReentrantMonitorAutoEnter monitor(mTableReentrantMonitor);
-    mNameTable.EnumerateRead(xpti_Invalidator, NULL);
+    mNameTable.EnumerateRead(xpti_Invalidator, nullptr);
 }        
 
 XPTInterfaceInfoManager::xptiWorkingSet::~xptiWorkingSet()
 {
     MOZ_COUNT_DTOR(xptiWorkingSet);
 
     // Only destroy the arena if we're doing leak stats. Why waste shutdown
     // time touching pages if we don't have to?
--- a/xpcom/reflect/xptinfo/tests/TestInterfaceInfo.cpp
+++ b/xpcom/reflect/xptinfo/tests/TestInterfaceInfo.cpp
@@ -66,17 +66,17 @@ int main (int argc, char **argv) {
     fprintf(stderr, "\nparams work?\n");
     fprintf(stderr, "\ngetting info for name 'nsIServiceManager'\n");
     iim->GetInfoForName("nsIComponentManager", &info5);
 #ifdef DEBUG
 //    ((nsInterfaceInfo *)info5)->print(stderr);
 #endif
 
     // XXX: nsIServiceManager is no more; what do we test with?
-    if (info5 == NULL) {
+    if (info5 == nullptr) {
         fprintf(stderr, "\nNo nsIComponentManager; cannot continue.\n");
         return 1;
     }
 
     uint16_t methodcount;
     info5->GetMethodCount(&methodcount);
     const nsXPTMethodInfo *mi;
     for (i = 0; i < methodcount; i++) {
--- a/xpcom/sample/nsSample.cpp
+++ b/xpcom/sample/nsSample.cpp
@@ -39,17 +39,17 @@ nsSampleImpl::~nsSampleImpl()
  * simple stuff, but you would have to create QueryInterface on your own.
  * nsSampleFactory.cpp is an example of this approach.
  * Notice that the second parameter to the macro is name of the interface, and
  * NOT the #defined IID.
  *
  * The _CI variant adds support for nsIClassInfo, which permits introspection
  * and interface flattening.
  */
-NS_IMPL_CLASSINFO(nsSampleImpl, NULL, 0, NS_SAMPLE_CID)
+NS_IMPL_CLASSINFO(nsSampleImpl, nullptr, 0, NS_SAMPLE_CID)
 NS_IMPL_ISUPPORTS1_CI(nsSampleImpl, nsISample)
 /**
  * Notice that in the protoype for this function, the NS_IMETHOD macro was
  * used to declare the return type.  For the implementation, the return
  * type is declared by NS_IMETHODIMP
  */
 NS_IMETHODIMP
 nsSampleImpl::GetValue(char** aValue)
--- a/xpcom/sample/nsSampleModule.cpp
+++ b/xpcom/sample/nsSampleModule.cpp
@@ -28,39 +28,39 @@
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsSampleImpl)
 
 // The following line defines a kNS_SAMPLE_CID CID variable.
 NS_DEFINE_NAMED_CID(NS_SAMPLE_CID);
 
 // Build a table of ClassIDs (CIDs) which are implemented by this module. CIDs
 // should be completely unique UUIDs.
 // each entry has the form { CID, service, factoryproc, constructorproc }
-// where factoryproc is usually NULL.
+// where factoryproc is usually nullptr.
 static const mozilla::Module::CIDEntry kSampleCIDs[] = {
-    { &kNS_SAMPLE_CID, false, NULL, nsSampleImplConstructor },
-    { NULL }
+    { &kNS_SAMPLE_CID, false, nullptr, nsSampleImplConstructor },
+    { nullptr }
 };
 
 // Build a table which maps contract IDs to CIDs.
 // A contract is a string which identifies a particular set of functionality. In some
 // cases an extension component may override the contract ID of a builtin gecko component
 // to modify or extend functionality.
 static const mozilla::Module::ContractIDEntry kSampleContracts[] = {
     { NS_SAMPLE_CONTRACTID, &kNS_SAMPLE_CID },
-    { NULL }
+    { nullptr }
 };
 
 // Category entries are category/key/value triples which can be used
 // to register contract ID as content handlers or to observe certain
 // notifications. Most modules do not need to register any category
 // entries: this is just a sample of how you'd do it.
 // @see nsICategoryManager for information on retrieving category data.
 static const mozilla::Module::CategoryEntry kSampleCategories[] = {
     { "my-category", "my-key", NS_SAMPLE_CONTRACTID },
-    { NULL }
+    { nullptr }
 };
 
 static const mozilla::Module kSampleModule = {
     mozilla::Module::kVersion,
     kSampleCIDs,
     kSampleContracts,
     kSampleCategories
 };
--- a/xpcom/string/src/nsTStringObsolete.cpp
+++ b/xpcom/string/src/nsTStringObsolete.cpp
@@ -564,17 +564,17 @@ nsTString_CharT::CompressWhitespace( boo
   /**
    * nsTString::AssignWithConversion
    */
 
 void
 nsTString_CharT::AssignWithConversion( const incompatible_char_type* aData, int32_t aLength )
   {
       // for compatibility with the old string implementation, we need to allow
-      // for a NULL input buffer :-(
+      // for a nullptr input buffer :-(
     if (!aData)
       {
         Truncate();
       }
     else
       {
         if (aLength < 0)
           aLength = nsCharTraits<incompatible_char_type>::length(aData);
--- a/xpcom/tests/RegFactory.cpp
+++ b/xpcom/tests/RegFactory.cpp
@@ -119,12 +119,12 @@ int main(int argc, char *argv[])
     {
       rv = registrar->AutoRegister(nullptr);
       ret = (NS_FAILED(rv)) ? -1 : 0;
     }
     else
       ret = ProcessArgs(registrar, argc, argv);
   } // this scopes the nsCOMPtrs
   // no nsCOMPtrs are allowed to be alive when you call NS_ShutdownXPCOM
-  rv = NS_ShutdownXPCOM( NULL );
+  rv = NS_ShutdownXPCOM(nullptr);
   NS_ASSERTION(NS_SUCCEEDED(rv), "NS_ShutdownXPCOM failed");
   return ret;
 }
--- a/xpcom/tests/SizeTest01.cpp
+++ b/xpcom/tests/SizeTest01.cpp
@@ -41,17 +41,17 @@ NS_DEF_PTR(nsIDOMNode);
 
 void
 Test01_raw( nsIDOMNode* aDOMNode, nsString* aResult )
 		// m140, w34
 	{
 			/*
 				This test is designed to be more like a typical large function where,
 				because you are working with several resources, you don't just return when
-				one of them is |NULL|.  Similarly: |Test01_nsCOMPtr00|, and |Test01_nsIPtr00|.
+				one of them is |nullptr|.  Similarly: |Test01_nsCOMPtr00|, and |Test01_nsIPtr00|.
 			*/
 
 		nsIDOMNode* node = aDOMNode;
 		NS_IF_ADDREF(node);
 
 		if ( node )
 			node->GetNodeName(*aResult);
 
@@ -59,17 +59,17 @@ Test01_raw( nsIDOMNode* aDOMNode, nsStri
 	}
 
 void
 Test01_raw_optimized( nsIDOMNode* aDOMNode, nsString* aResult )
 		// m112, w31
 	{
 			/*
 				This test simulates smaller functions where you _do_ just return
-				|NULL| at the first sign of trouble.  Similarly: |Test01_nsCOMPtr01|,
+				|nullptr| at the first sign of trouble.  Similarly: |Test01_nsCOMPtr01|,
 				and |Test01_nsIPtr01|.
 			*/
 
 			/*
 				This test produces smaller code that |Test01_raw| because it avoids
 				the three tests: |NS_IF_...|, and |if ( node )|.
 			*/
 
--- a/xpcom/tests/TestHarness.h
+++ b/xpcom/tests/TestHarness.h
@@ -96,27 +96,27 @@ public:
 };
 
 class ScopedXPCOM : public nsIDirectoryServiceProvider2
 {
   public:
     NS_DECL_ISUPPORTS
 
     ScopedXPCOM(const char* testName,
-                nsIDirectoryServiceProvider *dirSvcProvider = NULL)
+                nsIDirectoryServiceProvider *dirSvcProvider = nullptr)
     : mDirSvcProvider(dirSvcProvider)
     {
       mTestName = testName;
       printf("Running %s tests...\n", mTestName);
 
-      nsresult rv = NS_InitXPCOM2(&mServMgr, NULL, this);
+      nsresult rv = NS_InitXPCOM2(&mServMgr, nullptr, this);
       if (NS_FAILED(rv))
       {
         fail("NS_InitXPCOM2 returned failure code 0x%x", rv);
-        mServMgr = NULL;
+        mServMgr = nullptr;
         return;
       }
     }
 
     ~ScopedXPCOM()
     {
       // If we created a profile directory, we need to remove it.
       if (mProfD) {
@@ -135,30 +135,30 @@ class ScopedXPCOM : public nsIDirectoryS
         }
 
         mProfD = nullptr;
       }
 
       if (mServMgr)
       {
         NS_RELEASE(mServMgr);
-        nsresult rv = NS_ShutdownXPCOM(NULL);
+        nsresult rv = NS_ShutdownXPCOM(nullptr);
         if (NS_FAILED(rv))
         {
           fail("XPCOM shutdown failed with code 0x%x", rv);
           exit(1);
         }
       }
 
       printf("Finished running %s tests.\n", mTestName);
     }
 
     bool failed()
     {
-      return mServMgr == NULL;
+      return mServMgr == nullptr;
     }
 
     already_AddRefed<nsIFile> GetProfileDirectory()
     {
       if (mProfD) {
         nsCOMPtr<nsIFile> copy = mProfD;
         return copy.forget();
       }
--- a/xpcom/tests/TestID.cpp
+++ b/xpcom/tests/TestID.cpp
@@ -24,17 +24,17 @@ int main(int argc, char** argv)
   nsID id;
   for (int i = 0; i < NUM_IDS; i++) {
     const char* idstr = ids[i];
     if (!id.Parse(idstr)) {
       fprintf(stderr, "TestID: Parse failed on test #%d\n", i);
       return -1;
     }
     char* cp = id.ToString();
-    if (NULL == cp) {
+    if (nullptr == cp) {
       fprintf(stderr, "TestID: ToString failed on test #%d\n", i);
       return -1;
     }
     if (0 != PL_strcmp(cp, ids[4*(i/4) + 3])) {
       fprintf(stderr, "TestID: compare of ToString failed on test #%d\n", i);
       return -1;
     }
   }
--- a/xpcom/tests/TestObserverService.cpp
+++ b/xpcom/tests/TestObserverService.cpp
@@ -10,17 +10,17 @@
 #include "nsISimpleEnumerator.h"
 #include "nsStringGlue.h"
 #include "nsWeakReference.h"
 #include "nsComponentManagerUtils.h"
 #include "mozilla/Attributes.h"
 
 #include <stdio.h>
 
-static nsIObserverService *anObserverService = NULL;
+static nsIObserverService *anObserverService = nullptr;
 
 static void testResult( nsresult rv ) {
     if ( NS_SUCCEEDED( rv ) ) {
         printf("...ok\n");
     } else {
         printf("...failed, rv=0x%x\n", (int)rv);
     }
     return;
--- a/xpcom/tests/TestPipe.cpp
+++ b/xpcom/tests/TestPipe.cpp
@@ -103,38 +103,38 @@ nsresult BackwardsAllocator::Init(uint32
   return NS_OK;
 }
 
 NS_IMETHODIMP_(void*) BackwardsAllocator::Alloc(size_t size)
 {
   if (size != mSize)
   {
     NS_ERROR("umm, why would this be reached for this test?");
-    return NULL;
+    return nullptr;
   }
 
   uint32_t index = mIndex;
 
   while ((index = previous(index)) != mIndex)
   {
     if (mMemory[mSize * mCount + index] == 1)
       continue;
     mMemory[mSize * mCount + index] = 1;
     mIndex = index;
     return &mMemory[mSize * index];
   }
 
   NS_ERROR("shouldn't reach here in this test");
-  return NULL;
+  return nullptr;
 }
 
 NS_IMETHODIMP_(void*) BackwardsAllocator::Realloc(void* ptr, size_t newSize)
 {
   NS_ERROR("shouldn't reach here in this test");
-  return NULL;
+  return nullptr;
 }
 
 NS_IMETHODIMP_(void) BackwardsAllocator::Free(void* ptr)
 {
   uint8_t* p = static_cast<uint8_t*>(ptr);
   if (p)
     mMemory[mCount * mSize + (p - mMemory) / mSize] = 0;
 }
--- a/xpcom/tests/TestPipes.cpp
+++ b/xpcom/tests/TestPipes.cpp
@@ -443,27 +443,27 @@ TestSegmentedBuffer();
 #endif
 
 int
 main(int argc, char* argv[])
 {
     nsresult rv;
 
     nsCOMPtr<nsIServiceManager> servMgr;
-    rv = NS_InitXPCOM2(getter_AddRefs(servMgr), NULL, NULL);
+    rv = NS_InitXPCOM2(getter_AddRefs(servMgr), nullptr, nullptr);
     if (NS_FAILED(rv)) return rv;
 
     if (argc > 1 && nsCRT::strcmp(argv[1], "-trace") == 0)
         gTrace = true;
 
     rv = TestChainedPipes();
     NS_ASSERTION(NS_SUCCEEDED(rv), "TestChainedPipes failed");
     RunTests(16, 1);
     RunTests(4096, 16);
 
     servMgr = 0;
-    rv = NS_ShutdownXPCOM( NULL );
+    rv = NS_ShutdownXPCOM(nullptr);
     NS_ASSERTION(NS_SUCCEEDED(rv), "NS_ShutdownXPCOM failed");
 
     return 0;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
--- a/xpcom/tests/TestRacingServiceManager.cpp
+++ b/xpcom/tests/TestRacingServiceManager.cpp
@@ -226,24 +226,24 @@ CreateFactory(const mozilla::Module& mod
         gFactory = new Factory();
         NS_ADDREF(gFactory);
     }
     nsCOMPtr<nsIFactory> ret = gFactory;
     return ret.forget();
 }
 
 static const mozilla::Module::CIDEntry kLocalCIDs[] = {
-    { &kFactoryCID1, false, CreateFactory, NULL },
-    { &kFactoryCID2, false, CreateFactory, NULL },
-    { NULL }
+    { &kFactoryCID1, false, CreateFactory, nullptr },
+    { &kFactoryCID2, false, CreateFactory, nullptr },
+    { nullptr }
 };
 
 static const mozilla::Module::ContractIDEntry kLocalContracts[] = {
     { FACTORY_CONTRACTID, &kFactoryCID2 },
-    { NULL }
+    { nullptr }
 };
 
 static const mozilla::Module kLocalModule = {
     mozilla::Module::kVersion,
     kLocalCIDs,
     kLocalContracts
 };
 
--- a/xpcom/tests/TestRegistrationOrder.cpp
+++ b/xpcom/tests/TestRegistrationOrder.cpp
@@ -106,17 +106,17 @@ nsresult TestJar()
                           kCoreServiceB_CID, kExtServiceB_CID);
 }
 
 bool TestContractFirst()
 {
   nsCOMPtr<nsIComponentRegistrar> r;
   NS_GetComponentRegistrar(getter_AddRefs(r));
 
-  nsCID* cid = NULL;
+  nsCID* cid = nullptr;
   nsresult rv = r->ContractIDToCID("@mozilla.org/RegTestOrderC;1", &cid);
   if (NS_FAILED(rv)) {
     fail("RegTestOrderC: contract not registered");
     return false;
   }
 
   nsCID goodcid;
   goodcid.Parse("{ada15884-bb89-473c-8b50-dcfbb8447ff4}");
@@ -170,17 +170,17 @@ int main(int argc, char** argv)
   const char *regPath = argv[1];
 #endif
 
   XRE_AddManifestLocation(NS_COMPONENT_LOCATION,
                           nsCOMPtr<nsIFile>(GetRegDirectory(regPath, "core", "component.manifest")));
   XRE_AddManifestLocation(NS_COMPONENT_LOCATION,
                           nsCOMPtr<nsIFile>(GetRegDirectory(regPath, "extension", "extComponent.manifest")));
   XRE_AddJarManifestLocation(NS_COMPONENT_LOCATION,
-                          nsCOMPtr<nsIFile>(GetRegDirectory(regPath, "extension2.jar", NULL)));
+                          nsCOMPtr<nsIFile>(GetRegDirectory(regPath, "extension2.jar", nullptr)));
   ScopedXPCOM xpcom("RegistrationOrder");
   if (xpcom.failed())
     return 1;
 
   int rv = 0;
   if (NS_FAILED(TestRegular()))
     rv = 1;
 
--- a/xpcom/tests/TestShutdown.cpp
+++ b/xpcom/tests/TestShutdown.cpp
@@ -6,17 +6,17 @@
 #include "nsIServiceManager.h"
 
 // Gee this seems simple! It's for testing for memory leaks with Purify.
 
 void main(int argc, char* argv[])
 {
     nsresult rv;
     nsIServiceManager* servMgr;
-    rv = NS_InitXPCOM2(&servMgr, NULL, NULL);
+    rv = NS_InitXPCOM2(&servMgr, nullptr, nullptr);
     NS_ASSERTION(NS_SUCCEEDED(rv), "NS_InitXPCOM failed");
 
     // try loading a component and releasing it to see if it leaks
     if (argc > 1 && argv[1] != nullptr) {
         char* cidStr = argv[1];
         nsISupports* obj = nullptr;
         if (cidStr[0] == '{') {
             nsCID cid;
--- a/xpcom/tests/bug656331_component/TestComponent.cpp
+++ b/xpcom/tests/bug656331_component/TestComponent.cpp
@@ -14,18 +14,18 @@ NS_DEFINE_NAMED_CID(NS_TESTING_CID);
 
 static nsresult
 DummyConstructorFunc(nsISupports* aOuter, const nsIID& aIID, void** aResult)
 {
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 static const mozilla::Module::CIDEntry kTestCIDs[] = {
-  { &kNS_TESTING_CID, false, NULL, DummyConstructorFunc },
-  { NULL }
+  { &kNS_TESTING_CID, false, nullptr, DummyConstructorFunc },
+  { nullptr }
 };
 
 static const mozilla::Module kTestModule = {
   3, /* faking mozilla::Module::kVersion with a value that will never be used */
   kTestCIDs
 };
 
 NSMODULE_DEFN(dummy) = &kTestModule;
--- a/xpcom/tests/component/TestComponent.cpp
+++ b/xpcom/tests/component/TestComponent.cpp
@@ -13,19 +13,19 @@ NS_DEFINE_NAMED_CID(NS_TESTING_CID);
 
 static nsresult
 DummyConstructorFunc(nsISupports* aOuter, const nsIID& aIID, void** aResult)
 {
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 static const mozilla::Module::CIDEntry kTestCIDs[] = {
-  { &kNS_TESTING_CID, false, NULL, DummyConstructorFunc },
-  { &kNS_TESTING_CID, false, NULL, DummyConstructorFunc },
-  { NULL }
+  { &kNS_TESTING_CID, false, nullptr, DummyConstructorFunc },
+  { &kNS_TESTING_CID, false, nullptr, DummyConstructorFunc },
+  { nullptr }
 };
 
 static const mozilla::Module kTestModule = {
   mozilla::Module::kVersion,
   kTestCIDs
 };
 
 NSMODULE_DEFN(dummy) = &kTestModule;
--- a/xpcom/tests/component_no_aslr/TestComponent.cpp
+++ b/xpcom/tests/component_no_aslr/TestComponent.cpp
@@ -13,18 +13,18 @@ NS_DEFINE_NAMED_CID(NS_TESTING_CID);
 
 static nsresult
 DummyConstructorFunc(nsISupports* aOuter, const nsIID& aIID, void** aResult)
 {
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 static const mozilla::Module::CIDEntry kTestCIDs[] = {
-  { &kNS_TESTING_CID, false, NULL, DummyConstructorFunc },
-  { NULL }
+  { &kNS_TESTING_CID, false, nullptr, DummyConstructorFunc },
+  { nullptr }
 };
 
 static const mozilla::Module kTestModule = {
   mozilla::Module::kVersion,
   kTestCIDs
 };
 
 NSMODULE_DEFN(dummy) = &kTestModule;
--- a/xpcom/tests/windows/TestCOM.cpp
+++ b/xpcom/tests/windows/TestCOM.cpp
@@ -88,23 +88,23 @@ public:
 };
 
 NS_IMPL_ISUPPORTS1(nsTestComFactory, nsIFactory)
 
 nsresult nsTestComFactory::CreateInstance(nsISupports *aOuter,
 					  const nsIID &aIID,
 					  void **aResult)
 {
-  if (aOuter != NULL) {
+  if (aOuter != nullptr) {
     return NS_ERROR_NO_AGGREGATION;
   }
 
   nsTestCom *t = new nsTestCom();
   
-  if (t == NULL) {
+  if (t == nullptr) {
     return NS_ERROR_OUT_OF_MEMORY;
   }
   
   NS_ADDREF(t);
   nsresult res = t->QueryInterface(aIID, aResult);
   NS_RELEASE(t);
 
   if (NS_SUCCEEDED(res)) {
@@ -123,17 +123,17 @@ int main(int argc, char *argv[])
   nsTestComFactory *inst = new nsTestComFactory();
   IClassFactory *iFactory;
   inst->QueryInterface(NS_GET_IID(nsIFactory), (void **) &iFactory);
 
   IUnknown *iUnknown;  
   nsITestCom *iTestCom;
 
   iFactory->LockServer(TRUE);
-  iFactory->CreateInstance(NULL, IID_IUnknown, (void **) &iUnknown);
+  iFactory->CreateInstance(nullptr, IID_IUnknown, (void **) &iUnknown);
   iFactory->LockServer(FALSE);
 
   GUID testGUID = NS_ITEST_COM_IID;
   HRESULT hres;
   hres= iUnknown->QueryInterface(testGUID, 
 				 (void **) &iTestCom);
 
   iTestCom->Test();
--- a/xpcom/tests/windows/TestHelloXPLoop.cpp
+++ b/xpcom/tests/windows/TestHelloXPLoop.cpp
@@ -11,22 +11,22 @@
 #include <windows.h>
 
 static NS_DEFINE_CID(kNativeAppCID, NS_NATIVE_APP_CID);
 
 LRESULT CALLBACK WndProc(HWND wnd, UINT msg, WPARAM wParam, LPARAM lParam);
 
 void ErrorBox(LPSTR text)
 {
-	MessageBox(NULL, text, "XP Event Loop", MB_OK | MB_ICONSTOP);
+	MessageBox(nullptr, text, "XP Event Loop", MB_OK | MB_ICONSTOP);
 }
 
 void InfoBox(LPSTR text)
 {
-	MessageBox(NULL, text, "XP Event Loop", MB_OK | MB_ICONINFORMATION);
+	MessageBox(nullptr, text, "XP Event Loop", MB_OK | MB_ICONINFORMATION);
 }
 
 int WINAPI WinMain(HINSTANCE inst, 
                    HINSTANCE prevInstance, 
                    LPSTR lpszCmdLine,
                    int nShowCmd)
 {
 	char* lpszAppName = "HelloWorld";
@@ -56,30 +56,30 @@ int WINAPI WinMain(HINSTANCE inst,
         return -1;
       }
       wndclass.cbSize        = sizeof(wndclass);
       wndclass.style         = CS_HREDRAW | CS_VREDRAW;
       wndclass.lpfnWndProc   = WndProc;
       wndclass.cbClsExtra    = 0;
       wndclass.cbWndExtra    = 0;
       wndclass.hInstance     = inst;
-      wndclass.hIcon         = LoadIcon(NULL, IDI_APPLICATION);
-      wndclass.hCursor       = LoadCursor(NULL, IDC_ARROW);
+      wndclass.hIcon         = LoadIcon(nullptr, IDI_APPLICATION);
+      wndclass.hCursor       = LoadCursor(nullptr, IDC_ARROW);
       wndclass.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH);
-      wndclass.lpszMenuName  = NULL;
+      wndclass.lpszMenuName  = nullptr;
       wndclass.lpszClassName = lpszAppName;
-      wndclass.hIconSm       = LoadIcon(NULL, IDI_APPLICATION);
+      wndclass.hIconSm       = LoadIcon(nullptr, IDI_APPLICATION);
 
       RegisterClassEx(&wndclass) ;
       
       wnd = CreateWindow(lpszAppName, "The Hello World",
                          WS_OVERLAPPEDWINDOW,
                          CW_USEDEFAULT, CW_USEDEFAULT,
                          CW_USEDEFAULT, CW_USEDEFAULT,
-                         NULL, NULL, inst, NULL);		     
+                         nullptr, nullptr, inst, nullptr);		     
       
       ShowWindow(wnd, nShowCmd);
       UpdateWindow(wnd);
       
       nsCOMPtr<nsIEventLoop> eventLoop;
       
       if(NS_FAILED(nativeAppService->CreateEventLoop(L"_MainLoop", 
                                                      nsEventLoopTypes::MainAppLoop, getter_AddRefs(eventLoop))))
--- a/xpcom/tests/windows/TestNTFSPermissions.cpp
+++ b/xpcom/tests/windows/TestNTFSPermissions.cpp
@@ -29,19 +29,19 @@ nsresult TestPermissions()
     nsCOMPtr<nsIFile> tempDirectory1;
     nsCOMPtr<nsIFile> tempDirectory2;
     WCHAR filePath[MAX_PATH];
     WCHAR dir1Path[MAX_PATH];
     WCHAR dir2Path[MAX_PATH];
 
     // Security variables
     DWORD result;
-    PSID everyoneSID = NULL, adminSID = NULL;
-    PACL dirACL = NULL, fileACL = NULL;
-    PSECURITY_DESCRIPTOR dirSD = NULL, fileSD = NULL;
+    PSID everyoneSID = nullptr, adminSID = nullptr;
+    PACL dirACL = nullptr, fileACL = nullptr;
+    PSECURITY_DESCRIPTOR dirSD = nullptr, fileSD = nullptr;
     EXPLICIT_ACCESS ea[2];
     SID_IDENTIFIER_AUTHORITY SIDAuthWorld =
             SECURITY_WORLD_SID_AUTHORITY;
     SID_IDENTIFIER_AUTHORITY SIDAuthNT = SECURITY_NT_AUTHORITY;
     SECURITY_ATTRIBUTES sa;
     TRUSTEE everyoneTrustee;
     ACCESS_MASK everyoneRights;
 
@@ -81,27 +81,27 @@ nsresult TestPermissions()
     ea[1].grfAccessPermissions = GENERIC_ALL | STANDARD_RIGHTS_ALL;
     ea[1].grfAccessMode = SET_ACCESS;
     ea[1].grfInheritance= SUB_CONTAINERS_AND_OBJECTS_INHERIT;
     ea[1].Trustee.TrusteeForm = TRUSTEE_IS_SID;
     ea[1].Trustee.TrusteeType = TRUSTEE_IS_GROUP;
     ea[1].Trustee.ptstrName  = (LPTSTR) adminSID;
 
     // Create a new ACL that contains the new ACEs.
-    result = SetEntriesInAcl(2, ea, NULL, &dirACL);
+    result = SetEntriesInAcl(2, ea, nullptr, &dirACL);
     if (ERROR_SUCCESS != result) 
     {
         fail("NTFS Permissions: SetEntriesInAcl Error");
         return NS_ERROR_FAILURE; 
     }
 
     // Initialize a security descriptor.  
     dirSD = (PSECURITY_DESCRIPTOR) LocalAlloc(LPTR, 
                              SECURITY_DESCRIPTOR_MIN_LENGTH); 
-    if (NULL == dirSD) 
+    if (nullptr == dirSD) 
     { 
         fail("NTFS Permissions: LocalAlloc Error");
         return NS_ERROR_FAILURE; 
     }
 
     if (!InitializeSecurityDescriptor(dirSD,
             SECURITY_DESCRIPTOR_REVISION)) 
     {  
@@ -123,61 +123,61 @@ nsresult TestPermissions()
 
     // Create and open first temporary directory
     if(!CreateDirectoryW(L".\\NTFSPERMTEMP1", &sa))
     {
         fail("NTFS Permissions: Creating Temporary Directory");
         return NS_ERROR_FAILURE;
     }
 
-    GetFullPathNameW((LPCWSTR)L".\\NTFSPERMTEMP1", MAX_PATH, dir1Path, NULL);
-
+    GetFullPathNameW((LPCWSTR)L".\\NTFSPERMTEMP1", MAX_PATH, dir1Path,
+                     nullptr);
 
     rv = NS_NewLocalFile(nsEmbedString(dir1Path), false,
                          getter_AddRefs(tempDirectory1));
     if (NS_FAILED(rv))
     {
         fail("NTFS Permissions: Opening Temporary Directory 1");
         return rv;
     }
 
 
     // Create and open temporary file
     tempFileHandle = CreateFileW(L".\\NTFSPERMTEMP1\\NTFSPerm.tmp", 
                             GENERIC_READ | GENERIC_WRITE,
                             0, 
-                            NULL, //default security
+                            nullptr, //default security
                             CREATE_ALWAYS,        
                             FILE_ATTRIBUTE_NORMAL,
-                            NULL);  
+                            nullptr);  
 
     if(tempFileHandle == INVALID_HANDLE_VALUE)
     {
         fail("NTFS Permissions: Creating Temporary File");
         return NS_ERROR_FAILURE;
     }
 
     CloseHandle(tempFileHandle);
 
     GetFullPathNameW((LPCWSTR)L".\\NTFSPERMTEMP1\\NTFSPerm.tmp", 
-                        MAX_PATH, filePath, NULL);
+                        MAX_PATH, filePath, nullptr);
 
     rv = NS_NewLocalFile(nsEmbedString(filePath), false,
                          getter_AddRefs(tempFile));
     if (NS_FAILED(rv))
     {
         fail("NTFS Permissions: Opening Temporary File");
                 return rv;
     }
 
     // Update Everyone Explict_Acess to full access.
     ea[0].grfAccessPermissions = GENERIC_ALL | STANDARD_RIGHTS_ALL;
 
     // Update the ACL to contain the new ACEs.
-    result = SetEntriesInAcl(2, ea, NULL, &dirACL);
+    result = SetEntriesInAcl(2, ea, nullptr, &dirACL);
     if (ERROR_SUCCESS != result) 
     {
         fail("NTFS Permissions: SetEntriesInAcl 2 Error");
         return NS_ERROR_FAILURE; 
     }
 
     // Add the new ACL to the security descriptor. 
     if (!SetSecurityDescriptorDacl(dirSD, true, dirACL, false)) 
@@ -188,18 +188,18 @@ nsresult TestPermissions()
 
     // Create and open second temporary directory
     if(!CreateDirectoryW(L".\\NTFSPERMTEMP2", &sa))
     {
         fail("NTFS Permissions: Creating Temporary Directory 2");
         return NS_ERROR_FAILURE;
     }
 
-    GetFullPathNameW((LPCWSTR)L".\\NTFSPERMTEMP2", MAX_PATH, dir2Path, NULL);
-
+    GetFullPathNameW((LPCWSTR)L".\\NTFSPERMTEMP2", MAX_PATH, dir2Path,
+                     nullptr);
 
     rv = NS_NewLocalFile(nsEmbedString(dir2Path), false,
                          getter_AddRefs(tempDirectory2));
     if (NS_FAILED(rv))
     {
         fail("NTFS Permissions: Opening Temporary Directory 2");
         return rv;
     }
@@ -213,17 +213,18 @@ nsresult TestPermissions()
         return rv;
     }
 
     // Access the ACL of the file
     result = GetNamedSecurityInfoW(L".\\NTFSPERMTEMP2\\NTFSPerm.tmp", 
                                         SE_FILE_OBJECT,
                                         DACL_SECURITY_INFORMATION | 
                                         UNPROTECTED_DACL_SECURITY_INFORMATION,
-                                        NULL, NULL, &fileACL, NULL, &fileSD);
+                                        nullptr, nullptr, &fileACL, nullptr,
+                                        &fileSD);
     if (ERROR_SUCCESS != result) 
     {
         fail("NTFS Permissions: GetNamedSecurityDescriptor Error");
         return NS_ERROR_FAILURE; 
     }
 
     // Build a trustee representing "Everyone"
     BuildTrusteeWithSid(&everyoneTrustee, everyoneSID);
--- a/xpcom/tests/windows/TestWinFileAttribs.cpp
+++ b/xpcom/tests/windows/TestWinFileAttribs.cpp
@@ -40,31 +40,31 @@ nsresult TestWinAttribs()
     HANDLE hIndexed;
     nsCOMPtr<nsIFile> localFile;
     WCHAR filePath[MAX_PATH];
 
     // Create and open temporary file
     hIndexed = CreateFileW(L".\\indexbit.txt", 
                             GENERIC_READ | GENERIC_WRITE,
                             0, 
-                            NULL,
+                            nullptr,
                             CREATE_ALWAYS,        
                             FILE_ATTRIBUTE_NORMAL, //FILE_ATTRIBUTE_NOT_CONTENT_INDEXED, not supported by cf
-                            NULL);  
+                            nullptr);  
 
     if(hIndexed == INVALID_HANDLE_VALUE)
     {
         fail("Test Win Attribs: Creating Test File");
         return NS_ERROR_FAILURE;
     }
 
     CloseHandle(hIndexed);
 
     GetFullPathNameW((LPCWSTR)L".\\indexbit.txt", 
-                        MAX_PATH, filePath, NULL);
+                        MAX_PATH, filePath, nullptr);
 
     //wprintf(filePath);
     //wprintf(L"\n");
 
     rv = NS_NewLocalFile(nsEmbedString(filePath), false,
                          getter_AddRefs(localFile));
     if (NS_FAILED(rv))
     {
--- a/xpcom/threads/HangMonitor.cpp
+++ b/xpcom/threads/HangMonitor.cpp
@@ -54,17 +54,17 @@ PRThread* gThread;
 bool gShutdown;
 
 // The timestamp of the last event notification, or PR_INTERVAL_NO_WAIT if
 // we're currently not processing events.
 volatile PRIntervalTime gTimestamp = PR_INTERVAL_NO_WAIT;
 
 #ifdef REPORT_CHROME_HANGS
 // Main thread ID used in reporting chrome hangs under Windows
-static HANDLE winMainThreadHandle = NULL;
+static HANDLE winMainThreadHandle = nullptr;
 
 // Default timeout for reporting chrome hangs to Telemetry (5 seconds)
 static const int32_t DEFAULT_CHROME_HANG_INTERVAL = 5;
 
 // Maximum number of PCs to gather from the stack
 static const int32_t MAX_CALL_STACK_PCS = 400;
 #endif
 
@@ -227,36 +227,36 @@ Startup()
   // you must also deal with the threadsafety of AnnotateCrashReport in
   // non-chrome processes!
   if (GeckoProcessType_Default != XRE_GetProcessType())
     return;
 
   MOZ_ASSERT(!gMonitor, "Hang monitor already initialized");
   gMonitor = new Monitor("HangMonitor");
 
-  Preferences::RegisterCallback(PrefChanged, kHangMonitorPrefName, NULL);
-  PrefChanged(NULL, NULL);
+  Preferences::RegisterCallback(PrefChanged, kHangMonitorPrefName, nullptr);
+  PrefChanged(nullptr, nullptr);
 
 #ifdef REPORT_CHROME_HANGS
-  Preferences::RegisterCallback(PrefChanged, kTelemetryPrefName, NULL);
+  Preferences::RegisterCallback(PrefChanged, kTelemetryPrefName, nullptr);
   winMainThreadHandle =
     OpenThread(THREAD_ALL_ACCESS, FALSE, GetCurrentThreadId());
   if (!winMainThreadHandle)
     return;
 #endif
 
   // Don't actually start measuring hangs until we hit the main event loop.
   // This potentially misses a small class of really early startup hangs,
   // but avoids dealing with some xpcshell tests and other situations which
   // start XPCOM but don't ever start the event loop.
   Suspend();
 
   gThread = PR_CreateThread(PR_USER_THREAD,
                             ThreadMain,
-                            NULL, PR_PRIORITY_LOW, PR_GLOBAL_THREAD,
+                            nullptr, PR_PRIORITY_LOW, PR_GLOBAL_THREAD,
                             PR_JOINABLE_THREAD, 0);
 }
 
 void
 Shutdown()
 {
   if (GeckoProcessType_Default != XRE_GetProcessType())
     return;
@@ -267,38 +267,38 @@ Shutdown()
     MonitorAutoLock lock(*gMonitor);
     gShutdown = true;
     lock.Notify();
   }
 
   // thread creation could theoretically fail
   if (gThread) {
     PR_JoinThread(gThread);
-    gThread = NULL;
+    gThread = nullptr;
   }
 
   delete gMonitor;
-  gMonitor = NULL;
+  gMonitor = nullptr;
 }
 
 static bool
 IsUIMessageWaiting()
 {
 #ifndef XP_WIN
   return false;
 #else
   #define NS_WM_IMEFIRST WM_IME_SETCONTEXT
   #define NS_WM_IMELAST  WM_IME_KEYUP
   BOOL haveUIMessageWaiting = FALSE;
   MSG msg;
-  haveUIMessageWaiting |= ::PeekMessageW(&msg, NULL, WM_KEYFIRST, 
+  haveUIMessageWaiting |= ::PeekMessageW(&msg, nullptr, WM_KEYFIRST, 
                                          WM_IME_KEYLAST, PM_NOREMOVE);
-  haveUIMessageWaiting |= ::PeekMessageW(&msg, NULL, NS_WM_IMEFIRST,
+  haveUIMessageWaiting |= ::PeekMessageW(&msg, nullptr, NS_WM_IMEFIRST,
                                          NS_WM_IMELAST, PM_NOREMOVE);
-  haveUIMessageWaiting |= ::PeekMessageW(&msg, NULL, WM_MOUSEFIRST,
+  haveUIMessageWaiting |= ::PeekMessageW(&msg, nullptr, WM_MOUSEFIRST,
                                          WM_MOUSELAST, PM_NOREMOVE);
   return haveUIMessageWaiting;
 #endif
 }
 
 void
 NotifyActivity(ActivityType activityType)
 {
--- a/xpcom/threads/nsEnvironment.cpp
+++ b/xpcom/threads/nsEnvironment.cpp
@@ -48,18 +48,19 @@ nsEnvironment::Exists(const nsAString& a
 {
     nsAutoCString nativeName;
     nsresult rv = NS_CopyUnicodeToNative(aName, nativeName);
     NS_ENSURE_SUCCESS(rv, rv);
 
     nsAutoCString nativeVal;
 #if defined(XP_UNIX)
     /* For Unix/Linux platforms we follow the Unix definition:
-     * An environment variable exists when |getenv()| returns a non-NULL value.
-     * An environment variable does not exist when |getenv()| returns NULL.
+     * An environment variable exists when |getenv()| returns a non-nullptr
+     * value. An environment variable does not exist when |getenv()| returns
+     * nullptr.
      */
     const char *value = PR_GetEnv(nativeName.get());
     *aOutValue = value && *value;
 #else
     /* For non-Unix/Linux platforms we have to fall back to a 
      * "portable" definition (which is incorrect for Unix/Linux!!!!)
      * which simply checks whether the string returned by |Get()| is empty
      * or not.
--- a/xpcom/threads/nsProcessCommon.cpp
+++ b/xpcom/threads/nsProcessCommon.cpp
@@ -135,17 +135,17 @@ static int assembleCmdLine(char *const *
          * Finally, we need a space between arguments, and
          * a null byte at the end of command line.
          */
         cmdLineSize += 2 * strlen(*arg)  /* \ and " need to be escaped */
                 + 2                      /* we quote every argument */
                 + 1;                     /* space in between, or final null */
     }
     p = cmdLine = (char *) PR_MALLOC(cmdLineSize*sizeof(char));
-    if (p == NULL) {
+    if (p == nullptr) {
         return -1;
     }
 
     for (arg = argv; *arg; arg++) {
         /* Add a space to separates the arguments */
         if (arg != argv) {
             *p++ = ' '; 
         }
@@ -208,17 +208,17 @@ static int assembleCmdLine(char *const *
             }
         }
         if (argNeedQuotes) {
             *p++ = '"';
         }
     } 
 
     *p = '\0';
-    int32_t numChars = MultiByteToWideChar(codePage, 0, cmdLine, -1, NULL, 0); 
+    int32_t numChars = MultiByteToWideChar(codePage, 0, cmdLine, -1, nullptr, 0);
     *wideCmdLine = (PRUnichar *) PR_MALLOC(numChars*sizeof(PRUnichar));
     MultiByteToWideChar(codePage, 0, cmdLine, -1, *wideCmdLine, numChars); 
     PR_Free(cmdLine);
     return 0;
 }
 #endif
 
 void nsProcess::Monitor(void *arg)
@@ -237,17 +237,17 @@ void nsProcess::Monitor(void *arg)
         if (GetExitCodeProcess(process->mProcess, &exitCode) == FALSE)
             exitCode = -1;
     }
 
     // Lock in case Kill or GetExitCode are called during this
     {
         MutexAutoLock lock(process->mLock);
         CloseHandle(process->mProcess);
-        process->mProcess = NULL;
+        process->mProcess = nullptr;
         process->mExitValue = exitCode;
         if (process->mShutdown)
             return;
     }
 #else
 #ifdef XP_MACOSX
     int exitCode = -1;
     int status = 0;
@@ -334,30 +334,30 @@ nsProcess::RunAsync(const char **args, u
     return CopyArgsAndRunProcess(false, args, count, observer, holdWeak);
 }
 
 nsresult
 nsProcess::CopyArgsAndRunProcess(bool blocking, const char** args,
                                  uint32_t count, nsIObserver* observer,
                                  bool holdWeak)
 {
-    // Add one to the count for the program name and one for NULL termination.
-    char **my_argv = NULL;
+    // Add one to the count for the program name and one for null termination.
+    char **my_argv = nullptr;
     my_argv = (char**)NS_Alloc(sizeof(char*) * (count + 2));
     if (!my_argv) {
         return NS_ERROR_OUT_OF_MEMORY;
     }
 
     my_argv[0] = ToNewUTF8String(mTargetPath);
 
     for (uint32_t i = 0; i < count; i++) {
         my_argv[i + 1] = const_cast<char*>(args[i]);
     }
 
-    my_argv[count + 1] = NULL;
+    my_argv[count + 1] = nullptr;
 
     nsresult rv = RunProcess(blocking, my_argv, observer, holdWeak, false);
 
     NS_Free(my_argv[0]);
     NS_Free(my_argv);
     return rv;
 }
 
@@ -376,30 +376,30 @@ nsProcess::RunwAsync(const PRUnichar **a
     return CopyArgsAndRunProcessw(false, args, count, observer, holdWeak);
 }
 
 nsresult
 nsProcess::CopyArgsAndRunProcessw(bool blocking, const PRUnichar** args,
                                   uint32_t count, nsIObserver* observer,
                                   bool holdWeak)
 {
-    // Add one to the count for the program name and one for NULL termination.
-    char **my_argv = NULL;
+    // Add one to the count for the program name and one for null termination.
+    char **my_argv = nullptr;
     my_argv = (char**)NS_Alloc(sizeof(char*) * (count + 2));
     if (!my_argv) {
         return NS_ERROR_OUT_OF_MEMORY;
     }
 
     my_argv[0] = ToNewUTF8String(mTargetPath);
 
     for (uint32_t i = 0; i < count; i++) {
         my_argv[i + 1] = ToNewUTF8String(nsDependentString(args[i]));
     }
 
-    my_argv[count + 1] = NULL;
+    my_argv[count + 1] = nullptr;
 
     nsresult rv = RunProcess(blocking, my_argv, observer, holdWeak, true);
 
     for (uint32_t i = 0; i <= count; i++) {
         NS_Free(my_argv[i]);
     }
     NS_Free(my_argv);
     return rv;
@@ -423,37 +423,37 @@ nsProcess::RunProcess(bool blocking, cha
         }
     }
 
     mExitValue = -1;
     mPid = -1;
 
 #if defined(PROCESSMODEL_WINAPI)
     BOOL retVal;
-    PRUnichar *cmdLine = NULL;
+    PRUnichar *cmdLine = nullptr;
 
     // The 'argv' array is null-terminated and always starts with the program path.
     // If the second slot is non-null then arguments are being passed.
-    if (my_argv[1] != NULL &&
+    if (my_argv[1] != nullptr &&
         assembleCmdLine(my_argv + 1, &cmdLine, argsUTF8 ? CP_UTF8 : CP_ACP) == -1) {
         return NS_ERROR_FILE_EXECUTION_FAILED;    
     }
 
     /* The SEE_MASK_NO_CONSOLE flag is important to prevent console windows
      * from appearing. This makes behavior the same on all platforms. The flag
      * will not have any effect on non-console applications.
      */
 
     // The program name in my_argv[0] is always UTF-8
     NS_ConvertUTF8toUTF16 wideFile(my_argv[0]);
 
     SHELLEXECUTEINFOW sinfo;
     memset(&sinfo, 0, sizeof(SHELLEXECUTEINFOW));
     sinfo.cbSize = sizeof(SHELLEXECUTEINFOW);
-    sinfo.hwnd   = NULL;
+    sinfo.hwnd   = nullptr;
     sinfo.lpFile = wideFile.get();
     sinfo.nShow  = SW_SHOWNORMAL;
     sinfo.fMask  = SEE_MASK_FLAG_DDEWAIT |
                    SEE_MASK_NO_CONSOLE |
                    SEE_MASK_NOCLOSEPROCESS;
 
     if (cmdLine)
         sinfo.lpParameters = cmdLine;
@@ -482,26 +482,26 @@ nsProcess::RunProcess(bool blocking, cha
     if (posix_spawnattr_setbinpref_np(&spawnattr, attr_count, pref_cpu_types, &attr_ocount) != 0 ||
         attr_ocount != attr_count) {
         posix_spawnattr_destroy(&spawnattr);
         return NS_ERROR_FAILURE;
     }
 
     // Note that the 'argv' array is already null-terminated, which 'posix_spawnp' requires.
     pid_t newPid = 0;
-    int result = posix_spawnp(&newPid, my_argv[0], NULL, &spawnattr, my_argv, *_NSGetEnviron());
+    int result = posix_spawnp(&newPid, my_argv[0], nullptr, &spawnattr, my_argv, *_NSGetEnviron());
     mPid = static_cast<int32_t>(newPid);
 
     posix_spawnattr_destroy(&spawnattr);
 
     if (result != 0) {
         return NS_ERROR_FAILURE;
     }
 #else
-    mProcess = PR_CreateProcess(my_argv[0], my_argv, NULL, NULL);
+    mProcess = PR_CreateProcess(my_argv[0], my_argv, nullptr, nullptr);
     if (!mProcess)
         return NS_ERROR_FAILURE;
     struct MYProcess {
         uint32_t pid;
     };
     MYProcess* ptrProc = (MYProcess *) mProcess;
     mPid = ptrProc->pid;
 #endif
--- a/xpcom/threads/nsThreadManager.cpp
+++ b/xpcom/threads/nsThreadManager.cpp
@@ -36,17 +36,17 @@ AppendAndRemoveThread(PRThread *key, nsR
   nsThreadArray *threads = static_cast<nsThreadArray *>(arg);
   threads->AppendElement(thread);
   return PL_DHASH_REMOVE;
 }
 
 // statically allocated instance
 NS_IMETHODIMP_(nsrefcnt) nsThreadManager::AddRef() { return 2; }
 NS_IMETHODIMP_(nsrefcnt) nsThreadManager::Release() { return 1; }
-NS_IMPL_CLASSINFO(nsThreadManager, NULL,
+NS_IMPL_CLASSINFO(nsThreadManager, nullptr,
                   nsIClassInfo::THREADSAFE | nsIClassInfo::SINGLETON,
                   NS_THREADMANAGER_CID)
 NS_IMPL_QUERY_INTERFACE1_CI(nsThreadManager, nsIThreadManager)
 NS_IMPL_CI_INTERFACE_GETTER1(nsThreadManager, nsIThreadManager)
 
 //-----------------------------------------------------------------------------
 
 nsresult
--- a/xpcom/threads/nsThreadPool.cpp
+++ b/xpcom/threads/nsThreadPool.cpp
@@ -52,17 +52,17 @@ public:
 
 private:
   nsCOMArray<nsIThread> mThreads;
   nsCOMPtr<nsIThreadPoolListener> mListener;
 };
 
 NS_IMPL_ADDREF(nsThreadPool)
 NS_IMPL_RELEASE(nsThreadPool)
-NS_IMPL_CLASSINFO(nsThreadPool, NULL, nsIClassInfo::THREADSAFE,
+NS_IMPL_CLASSINFO(nsThreadPool, nullptr, nsIClassInfo::THREADSAFE,
                   NS_THREADPOOL_CID)
 NS_IMPL_QUERY_INTERFACE3_CI(nsThreadPool, nsIThreadPool, nsIEventTarget,
                             nsIRunnable)
 NS_IMPL_CI_INTERFACE_GETTER2(nsThreadPool, nsIThreadPool, nsIEventTarget)
 
 nsThreadPool::nsThreadPool()
   : mThreadLimit(DEFAULT_THREAD_LIMIT)
   , mIdleThreadLimit(DEFAULT_IDLE_THREAD_LIMIT)
--- a/xpcom/windbgdlg/windbgdlg.cpp
+++ b/xpcom/windbgdlg/windbgdlg.cpp
@@ -110,12 +110,12 @@ wWinMain(HINSTANCE  hInstance, HINSTANCE
     snwprintf(msg,
 #endif
               size,
               L"%s\n\nClick Abort to exit the Application.\n"
               L"Click Retry to Debug the Application.\n"
               L"Click Ignore to continue running the Application.",
               lpszCmdLine);
     msg[size - 1] = L'\0';
-    return MessageBoxW(NULL, msg, L"NSGlue_Assertion",
+    return MessageBoxW(nullptr, msg, L"NSGlue_Assertion",
                        MB_ICONSTOP | MB_SYSTEMMODAL |
                        MB_ABORTRETRYIGNORE | MB_DEFBUTTON3);
 }