Bug 1120062 - Part 1: Remove most Nullptr.h includes. r=waldo
authorMasatoshi Kimura <VYV03354@nifty.ne.jp>
Sun, 11 Jan 2015 11:34:52 +0900
changeset 248970 3928ee1b0381453833c00fbe1e1b72a26143f13a
parent 248969 5f41156dbd4c15193f07ae77a88313153b5782cf
child 248971 b4ebefd0f7e3a0814ea9d9f42dc0da74be3fb998
push idunknown
push userunknown
push dateunknown
reviewerswaldo
bugs1120062
milestone37.0a1
Bug 1120062 - Part 1: Remove most Nullptr.h includes. r=waldo
build/unix/elfhack/elfxx.h
dom/bluetooth/bluez/BluetoothDBusService.cpp
dom/bluetooth2/bluez/BluetoothDBusService.cpp
dom/media/compiledtest/TestAudioBuffers.cpp
dom/media/eme/EMELog.cpp
dom/media/gmp-plugin/gmp-test-decryptor.cpp
dom/media/gmp-plugin/gmp-test-storage.cpp
dom/media/gmp/GMPLoader.cpp
dom/media/gstreamer/GStreamerLoader.cpp
dom/media/omx/mediaresourcemanager/MediaResourceHandler.cpp
dom/media/systemservices/OSXRunLoopSingleton.cpp
dom/media/systemservices/OpenSLESProvider.cpp
dom/plugins/test/testplugin/nptest.cpp
dom/plugins/test/testplugin/nptest_gtk2.cpp
dom/plugins/test/testplugin/nptest_utils.cpp
gfx/2d/Types.h
gfx/layers/AtomicRefCountedWithFinalize.h
gfx/thebes/nsUnicodeRange.cpp
ipc/chromium/src/chrome/common/child_process_host.cc
js/public/CharacterEncoding.h
js/public/Class.h
js/public/GCAPI.h
js/public/HashTable.h
js/public/Id.h
js/public/MemoryMetrics.h
js/public/ProfilingStack.h
js/public/StructuredClone.h
js/public/TracingAPI.h
js/public/Utility.h
js/src/asmjs/AsmJSFrameIterator.h
js/src/jit/JSONSpewer.h
js/src/jspubtd.h
js/xpconnect/src/XPCLog.cpp
layout/base/StackArena.h
layout/style/CounterStyleManager.h
media/gmp-clearkey/0.1/ClearKeyDecryptionManager.cpp
media/gmp-clearkey/0.1/ClearKeyStorage.cpp
media/gmp-clearkey/0.1/ClearKeyUtils.cpp
media/gmp-clearkey/0.1/gmp-clearkey.cpp
media/mtransport/nriceresolverfake.h
media/mtransport/rlogringbuffer.cpp
memory/build/replace_malloc_bridge.h
memory/mozalloc/VolatileBuffer.h
memory/mozalloc/VolatileBufferAshmem.cpp
memory/mozalloc/VolatileBufferFallback.cpp
memory/mozalloc/mozalloc.h
memory/mozalloc/tests/TestVolatileBuffer.cpp
memory/replace/logalloc/FdPrintf.cpp
memory/replace/logalloc/LogAlloc.cpp
memory/replace/logalloc/replay/Replay.cpp
mfbt/AllocPolicy.h
mfbt/AlreadyAddRefed.h
mfbt/GuardObjects.h
mfbt/LinkedList.h
mfbt/Range.h
mfbt/RangedPtr.h
mfbt/RefPtr.h
mfbt/Scoped.h
mfbt/SplayTree.h
mfbt/TaggedAnonymousMemory.cpp
mfbt/ThreadLocal.h
mfbt/Vector.h
mfbt/WeakPtr.h
mfbt/decimal/moz-decimal-utils.h
mfbt/tests/TestArrayUtils.cpp
mfbt/tests/TestPoisonArea.cpp
mozglue/build/arm.cpp
netwerk/protocol/rtsp/rtsp/ARTPConnection.cpp
netwerk/protocol/rtsp/rtsp/ARTPWriter.cpp
netwerk/protocol/rtsp/rtsp/RTSPTransmitter.h
netwerk/protocol/rtsp/rtsp/UDPPusher.cpp
parser/html/jArray.h
security/sandbox/linux/Sandbox.cpp
security/sandbox/linux/SandboxAssembler.cpp
security/sandbox/linux/SandboxFilter.cpp
security/sandbox/linux/common/SandboxInfo.cpp
security/sandbox/linux/glue/SandboxCrash.cpp
testing/gtest/mozilla/GTestRunner.cpp
testing/tools/screenshot/gdk-screenshot.cpp
toolkit/components/finalizationwitness/FinalizationWitnessService.cpp
toolkit/crashreporter/client/crashreporter.cpp
toolkit/crashreporter/client/crashreporter_gtk_common.cpp
toolkit/crashreporter/client/crashreporter_linux.cpp
toolkit/crashreporter/client/crashreporter_win.cpp
toolkit/library/StaticXULComponentsEnd/StaticXULComponentsEnd.cpp
toolkit/library/StaticXULComponentsStart.cpp
toolkit/mozapps/update/common/readstrings.h
toolkit/mozapps/update/tests/TestAUSHelper.cpp
toolkit/mozapps/update/updater/archivereader.h
tools/profiler/AutoObjectMapper.cpp
tools/profiler/GeckoProfiler.h
tools/profiler/GeckoProfilerFunc.h
tools/profiler/LulCommonExt.h
tools/profiler/LulExidx.cpp
tools/profiler/LulRWLock.cpp
tools/profiler/PseudoStack.h
widget/gonk/libdisplay/BootAnimation.cpp
widget/gonk/libdisplay/GonkDisplayICS.cpp
xpcom/base/StaticPtr.h
xpcom/base/nscore.h
xpcom/glue/nsCOMPtr.h
--- a/build/unix/elfhack/elfxx.h
+++ b/build/unix/elfhack/elfxx.h
@@ -1,14 +1,12 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#include "mozilla/NullPtr.h"
-
 #include <stdexcept>
 #include <list>
 #include <vector>
 #include <cstring>
 #include <iostream>
 #include <fstream>
 #include <algorithm>
 #include <elf.h>
--- a/dom/bluetooth/bluez/BluetoothDBusService.cpp
+++ b/dom/bluetooth/bluez/BluetoothDBusService.cpp
@@ -41,17 +41,16 @@
 #include "mozilla/dom/bluetooth/BluetoothTypes.h"
 #include "mozilla/Hal.h"
 #include "mozilla/ipc/UnixSocket.h"
 #include "mozilla/ipc/DBusUtils.h"
 #include "mozilla/ipc/RawDBusConnection.h"
 #include "mozilla/LazyIdleThread.h"
 #include "mozilla/Monitor.h"
 #include "mozilla/Mutex.h"
-#include "mozilla/NullPtr.h"
 #include "mozilla/StaticMutex.h"
 #include "mozilla/unused.h"
 
 #if defined(MOZ_WIDGET_GONK)
 #include "cutils/properties.h"
 #include <dlfcn.h>
 #endif
 
--- a/dom/bluetooth2/bluez/BluetoothDBusService.cpp
+++ b/dom/bluetooth2/bluez/BluetoothDBusService.cpp
@@ -40,17 +40,16 @@
 #include "mozilla/ClearOnShutdown.h"
 #include "mozilla/dom/bluetooth/BluetoothTypes.h"
 #include "mozilla/Hal.h"
 #include "mozilla/ipc/UnixSocket.h"
 #include "mozilla/ipc/DBusUtils.h"
 #include "mozilla/ipc/RawDBusConnection.h"
 #include "mozilla/LazyIdleThread.h"
 #include "mozilla/Mutex.h"
-#include "mozilla/NullPtr.h"
 #include "mozilla/StaticMutex.h"
 #include "mozilla/unused.h"
 
 #if defined(MOZ_WIDGET_GONK)
 #include "cutils/properties.h"
 #include <dlfcn.h>
 #endif
 
--- a/dom/media/compiledtest/TestAudioBuffers.cpp
+++ b/dom/media/compiledtest/TestAudioBuffers.cpp
@@ -1,16 +1,15 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include <stdint.h>
 #include <assert.h>
-#include <mozilla/NullPtr.h>
 #include "AudioBufferUtils.h"
 
 const uint32_t FRAMES = 256;
 const uint32_t CHANNELS = 2;
 const uint32_t SAMPLES = CHANNELS * FRAMES;
 
 int main() {
   mozilla::AudioCallbackBufferWrapper<float, CHANNELS> mBuffer;
--- a/dom/media/eme/EMELog.cpp
+++ b/dom/media/eme/EMELog.cpp
@@ -1,16 +1,15 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "EMELog.h"
-#include "mozilla/NullPtr.h"
 
 namespace mozilla {
 
 #ifdef PR_LOGGING
 
 PRLogModuleInfo* GetEMELog() {
   static PRLogModuleInfo* log = nullptr;
   if (!log) {
--- a/dom/media/gmp-plugin/gmp-test-decryptor.cpp
+++ b/dom/media/gmp-plugin/gmp-test-decryptor.cpp
@@ -12,17 +12,16 @@
 #include <iostream>
 #include <istream>
 #include <iterator>
 #include <sstream>
 #include <set>
 
 #include "mozilla/Assertions.h"
 #include "mozilla/Attributes.h"
-#include "mozilla/NullPtr.h"
 
 using namespace std;
 
 FakeDecryptor* FakeDecryptor::sInstance = nullptr;
 extern GMPPlatformAPI* g_platform_api; // Defined in gmp-fake.cpp
 
 class GMPMutexAutoLock
 {
--- a/dom/media/gmp-plugin/gmp-test-storage.cpp
+++ b/dom/media/gmp-plugin/gmp-test-storage.cpp
@@ -3,17 +3,16 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "gmp-test-storage.h"
 #include <vector>
 
 #include "mozilla/Assertions.h"
 #include "mozilla/Attributes.h"
-#include "mozilla/NullPtr.h"
 
 class WriteRecordClient : public GMPRecordClient {
 public:
   GMPErr Init(GMPRecord* aRecord,
               GMPTask* aOnSuccess,
               GMPTask* aOnFailure,
               const uint8_t* aData,
               uint32_t aDataSize) {
--- a/dom/media/gmp/GMPLoader.cpp
+++ b/dom/media/gmp/GMPLoader.cpp
@@ -2,17 +2,16 @@
  * vim: sw=4 ts=4 et :
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "GMPLoader.h"
 #include <stdio.h>
 #include "mozilla/Attributes.h"
-#include "mozilla/NullPtr.h"
 #include "gmp-entrypoints.h"
 #include "prlink.h"
 
 #include <string>
 
 #if defined(XP_WIN) && defined(MOZ_SANDBOX)
 #include "mozilla/sandboxTarget.h"
 #include "windows.h"
--- a/dom/media/gstreamer/GStreamerLoader.cpp
+++ b/dom/media/gstreamer/GStreamerLoader.cpp
@@ -2,17 +2,16 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include <dlfcn.h>
 #include <stdio.h>
 
 #include "nsDebug.h"
-#include "mozilla/NullPtr.h"
 
 #include "GStreamerLoader.h"
 
 #define LIBGSTREAMER 0
 #define LIBGSTAPP 1
 #define LIBGSTVIDEO 2
 
 #ifdef __OpenBSD__
--- a/dom/media/omx/mediaresourcemanager/MediaResourceHandler.cpp
+++ b/dom/media/omx/mediaresourcemanager/MediaResourceHandler.cpp
@@ -1,16 +1,15 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim:set ts=2 sw=2 sts=2 et cindent: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "MediaResourceHandler.h"
-#include "mozilla/NullPtr.h"
 
 namespace android {
 
 MediaResourceHandler::MediaResourceHandler(const wp<ResourceListener> &aListener)
   : mListener(aListener)
   , mType(IMediaResourceManagerService::INVALID_RESOURCE_TYPE)
   , mWaitingResource(false)
 {
--- a/dom/media/systemservices/OSXRunLoopSingleton.cpp
+++ b/dom/media/systemservices/OSXRunLoopSingleton.cpp
@@ -1,16 +1,15 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-*/
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "OSXRunLoopSingleton.h"
 #include <mozilla/StaticMutex.h>
-#include <mozilla/NullPtr.h>
 
 #include <AudioUnit/AudioUnit.h>
 #include <CoreAudio/AudioHardware.h>
 #include <CoreAudio/HostTime.h>
 #include <CoreFoundation/CoreFoundation.h>
 
 static bool gRunLoopSet = false;
 static mozilla::StaticMutex gMutex;
--- a/dom/media/systemservices/OpenSLESProvider.cpp
+++ b/dom/media/systemservices/OpenSLESProvider.cpp
@@ -1,17 +1,16 @@
 /* -*- Mode: C++; tab-width: 50; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "OpenSLESProvider.h"
 #include "prlog.h"
 #include "nsDebug.h"
-#include "mozilla/NullPtr.h"
 
 #include <dlfcn.h>
 #include <SLES/OpenSLES_Android.h>
 #include <SLES/OpenSLES_AndroidConfiguration.h>
 
 // NSPR_LOG_MODULES=OpenSLESProvider:5
 #undef LOG
 #undef LOG_ENABLED
--- a/dom/plugins/test/testplugin/nptest.cpp
+++ b/dom/plugins/test/testplugin/nptest.cpp
@@ -53,18 +53,16 @@
 #include <windows.h>
 #define getpid _getpid
 #define strcasecmp _stricmp
 #else
 #include <unistd.h>
 #include <pthread.h>
 #endif
 
-#include "mozilla/NullPtr.h"
-
 using namespace std;
 
 #define PLUGIN_VERSION     "1.0.0.0"
 #define ARRAY_LENGTH(a) (sizeof(a)/sizeof(a[0]))
 #define STATIC_ASSERT(condition)                                \
     extern void np_static_assert(int arg[(condition) ? 1 : -1])
 
 extern const char *sPluginName;
--- a/dom/plugins/test/testplugin/nptest_gtk2.cpp
+++ b/dom/plugins/test/testplugin/nptest_gtk2.cpp
@@ -40,17 +40,16 @@
 #ifdef MOZ_X11
 #include <gdk/gdkx.h>
 #include <X11/extensions/shape.h>
 #endif
 #include <glib.h>
 #include <gtk/gtk.h>
 #include <unistd.h>
 
-#include "mozilla/NullPtr.h"
 #include "mozilla/IntentionalCrash.h"
 
  using namespace std;
 
 struct _PlatformData {
 #ifdef MOZ_X11
   Display* display;
   Visual* visual;
--- a/dom/plugins/test/testplugin/nptest_utils.cpp
+++ b/dom/plugins/test/testplugin/nptest_utils.cpp
@@ -28,17 +28,16 @@
  * 
  * ***** END LICENSE BLOCK ***** */
 
 #include "nptest_utils.h"
 
 #include <stdlib.h>
 #include <string.h>
 #include <assert.h>
-#include "mozilla/NullPtr.h"
 
 NPUTF8*
 createCStringFromNPVariant(const NPVariant* variant)
 {
   size_t length = NPVARIANT_TO_STRING(*variant).UTF8Length;
   NPUTF8* result = (NPUTF8*)malloc(length + 1);
   memcpy(result, NPVARIANT_TO_STRING(*variant).UTF8Characters, length);
   result[length] = '\0';
--- a/gfx/2d/Types.h
+++ b/gfx/2d/Types.h
@@ -1,17 +1,16 @@
 /* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef MOZILLA_GFX_TYPES_H_
 #define MOZILLA_GFX_TYPES_H_
 
-#include "mozilla/NullPtr.h"
 #include "mozilla/TypedEnum.h"
 
 #include <stddef.h>
 #include <stdint.h>
 
 namespace mozilla {
 namespace gfx {
 
--- a/gfx/layers/AtomicRefCountedWithFinalize.h
+++ b/gfx/layers/AtomicRefCountedWithFinalize.h
@@ -2,17 +2,16 @@
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef MOZILLA_ATOMICREFCOUNTEDWITHFINALIZE_H_
 #define MOZILLA_ATOMICREFCOUNTEDWITHFINALIZE_H_
 
 #include "mozilla/RefPtr.h"
-#include "mozilla/NullPtr.h"
 #include "mozilla/Likely.h"
 #include "MainThreadUtils.h"
 #include "base/message_loop.h"
 #include "base/task.h"
 
 namespace mozilla {
 
 template<typename T>
--- a/gfx/thebes/nsUnicodeRange.cpp
+++ b/gfx/thebes/nsUnicodeRange.cpp
@@ -1,16 +1,15 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsUnicodeRange.h"
 #include "nsGkAtoms.h"
-#include "mozilla/NullPtr.h"
 
 // This table depends on unicode range definitions. 
 // Each item's index must correspond unicode range value
 // eg. x-cyrillic = LangGroupTable[kRangeCyrillic]
 static nsIAtom **gUnicodeRangeToLangGroupAtomTable[] =
 {
   &nsGkAtoms::x_cyrillic,
   &nsGkAtoms::el_,
--- a/ipc/chromium/src/chrome/common/child_process_host.cc
+++ b/ipc/chromium/src/chrome/common/child_process_host.cc
@@ -48,17 +48,17 @@ class ChildNotificationTask : public Tas
 
 
 
 ChildProcessHost::ChildProcessHost(ProcessType type)
     :
       ChildProcessInfo(type),
       ALLOW_THIS_IN_INITIALIZER_LIST(listener_(this)),
       opening_channel_(false),
-      process_event_(NULL) {
+      process_event_(nullptr) {
   Singleton<ChildProcessList>::get()->push_back(this);
 }
 
 
 ChildProcessHost::~ChildProcessHost() {
   Singleton<ChildProcessList>::get()->remove(this);
 
   if (handle()) {
--- a/js/public/CharacterEncoding.h
+++ b/js/public/CharacterEncoding.h
@@ -2,17 +2,16 @@
  * vim: set ts=8 sts=4 et sw=4 tw=99:
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef js_CharacterEncoding_h
 #define js_CharacterEncoding_h
 
-#include "mozilla/NullPtr.h"
 #include "mozilla/Range.h"
 
 #include "js/TypeDecls.h"
 #include "js/Utility.h"
 
 namespace js {
 class ExclusiveContext;
 }
--- a/js/public/Class.h
+++ b/js/public/Class.h
@@ -5,17 +5,16 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /* JSClass definition and its component types, plus related interfaces. */
 
 #ifndef js_Class_h
 #define js_Class_h
 
 #include "mozilla/DebugOnly.h"
-#include "mozilla/NullPtr.h"
 
 #include "jstypes.h"
 
 #include "js/CallArgs.h"
 #include "js/Id.h"
 #include "js/TypeDecls.h"
 
 /*
--- a/js/public/GCAPI.h
+++ b/js/public/GCAPI.h
@@ -2,18 +2,16 @@
  * vim: set ts=8 sts=4 et sw=4 tw=99:
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef js_GCAPI_h
 #define js_GCAPI_h
 
-#include "mozilla/NullPtr.h"
-
 #include "js/HeapAPI.h"
 
 namespace js {
 namespace gc {
 class GCRuntime;
 }
 }
 
--- a/js/public/HashTable.h
+++ b/js/public/HashTable.h
@@ -8,17 +8,16 @@
 #define js_HashTable_h
 
 #include "mozilla/Alignment.h"
 #include "mozilla/Assertions.h"
 #include "mozilla/Attributes.h"
 #include "mozilla/Casting.h"
 #include "mozilla/MemoryReporting.h"
 #include "mozilla/Move.h"
-#include "mozilla/NullPtr.h"
 #include "mozilla/PodOperations.h"
 #include "mozilla/ReentrancyGuard.h"
 #include "mozilla/TemplateLib.h"
 #include "mozilla/TypeTraits.h"
 
 #include "js/Utility.h"
 
 namespace js {
--- a/js/public/Id.h
+++ b/js/public/Id.h
@@ -15,18 +15,16 @@
 // jsid is not a valid id and only arises as an exceptional API return value,
 // such as in JS_NextProperty. Embeddings must not pass JSID_VOID into JSAPI
 // entry points expecting a jsid and do not need to handle JSID_VOID in hooks
 // receiving a jsid except when explicitly noted in the API contract.
 //
 // A jsid is not implicitly convertible to or from a jsval; JS_ValueToId or
 // JS_IdToValue must be used instead.
 
-#include "mozilla/NullPtr.h"
-
 #include "jstypes.h"
 
 #include "js/HeapAPI.h"
 #include "js/RootingAPI.h"
 #include "js/TypeDecls.h"
 #include "js/Utility.h"
 
 struct jsid
--- a/js/public/MemoryMetrics.h
+++ b/js/public/MemoryMetrics.h
@@ -6,17 +6,16 @@
 
 #ifndef js_MemoryMetrics_h
 #define js_MemoryMetrics_h
 
 // These declarations are highly likely to change in the future. Depend on them
 // at your own risk.
 
 #include "mozilla/MemoryReporting.h"
-#include "mozilla/NullPtr.h"
 #include "mozilla/PodOperations.h"
 
 #include <string.h>
 
 #include "jsalloc.h"
 #include "jspubtd.h"
 
 #include "js/HashTable.h"
--- a/js/public/ProfilingStack.h
+++ b/js/public/ProfilingStack.h
@@ -2,17 +2,16 @@
  * vim: set ts=8 sts=4 et sw=4 tw=99:
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef js_ProfilingStack_h
 #define js_ProfilingStack_h
 
-#include "mozilla/NullPtr.h"
 #include "mozilla/TypedEnum.h"
 
 #include "jsbytecode.h"
 #include "jstypes.h"
 
 #include "js/Utility.h"
 
 struct JSRuntime;
--- a/js/public/StructuredClone.h
+++ b/js/public/StructuredClone.h
@@ -2,18 +2,16 @@
  * vim: set ts=8 sts=4 et sw=4 tw=99:
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef js_StructuredClone_h
 #define js_StructuredClone_h
 
-#include "mozilla/NullPtr.h"
-
 #include <stdint.h>
 
 #include "jstypes.h"
 
 #include "js/RootingAPI.h"
 #include "js/TypeDecls.h"
 #include "js/Value.h"
 
--- a/js/public/TracingAPI.h
+++ b/js/public/TracingAPI.h
@@ -2,18 +2,16 @@
  * vim: set ts=8 sts=4 et sw=4 tw=99:
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef js_TracingAPI_h
 #define js_TracingAPI_h
 
-#include "mozilla/NullPtr.h"
-
 #include "jsalloc.h"
 #include "jspubtd.h"
 
 #include "js/HashTable.h"
 
 class JS_PUBLIC_API(JSTracer);
 
 namespace JS {
--- a/js/public/Utility.h
+++ b/js/public/Utility.h
@@ -6,17 +6,16 @@
 
 #ifndef js_Utility_h
 #define js_Utility_h
 
 #include "mozilla/Assertions.h"
 #include "mozilla/Attributes.h"
 #include "mozilla/Compiler.h"
 #include "mozilla/Move.h"
-#include "mozilla/NullPtr.h"
 #include "mozilla/Scoped.h"
 #include "mozilla/TemplateLib.h"
 #include "mozilla/UniquePtr.h"
 
 #include <stdlib.h>
 #include <string.h>
 
 #ifdef JS_OOM_DO_BACKTRACES
--- a/js/src/asmjs/AsmJSFrameIterator.h
+++ b/js/src/asmjs/AsmJSFrameIterator.h
@@ -14,18 +14,16 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
 
 #ifndef asmjs_AsmJSFrameIterator_h
 #define asmjs_AsmJSFrameIterator_h
 
-#include "mozilla/NullPtr.h"
-
 #include <stdint.h>
 
 #include "js/ProfilingFrameIterator.h"
 
 class JSAtom;
 struct JSContext;
 
 namespace js {
--- a/js/src/jit/JSONSpewer.h
+++ b/js/src/jit/JSONSpewer.h
@@ -2,18 +2,16 @@
  * vim: set ts=8 sts=4 et sw=4 tw=99:
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef jit_JSONSpewer_h
 #define jit_JSONSpewer_h
 
-#include "mozilla/NullPtr.h"
-
 #include <stdio.h>
 
 #include "js/TypeDecls.h"
 
 namespace js {
 namespace jit {
 
 class MDefinition;
--- a/js/src/jspubtd.h
+++ b/js/src/jspubtd.h
@@ -8,17 +8,16 @@
 #define jspubtd_h
 
 /*
  * JS public API typedefs.
  */
 
 #include "mozilla/Assertions.h"
 #include "mozilla/LinkedList.h"
-#include "mozilla/NullPtr.h"
 #include "mozilla/PodOperations.h"
 
 #include "jsprototypes.h"
 #include "jstypes.h"
 
 #include "js/TypeDecls.h"
 
 #if (defined(JS_GC_ZEAL)) || \
--- a/js/xpconnect/src/XPCLog.cpp
+++ b/js/xpconnect/src/XPCLog.cpp
@@ -5,17 +5,16 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /* Debug Logging support. */
 
 #include "XPCLog.h"
 #include "prlog.h"
 #include "prprf.h"
 #include "mozilla/mozalloc.h"
-#include "mozilla/NullPtr.h"
 #include <string.h>
 #include <stdarg.h>
 
 // this all only works for DEBUG...
 #ifdef DEBUG
 
 #define SPACE_COUNT     200
 #define LINE_LEN        200
--- a/layout/base/StackArena.h
+++ b/layout/base/StackArena.h
@@ -3,17 +3,16 @@
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef StackArena_h
 #define StackArena_h
 
 #include "nsError.h"
 #include "mozilla/Assertions.h"
 #include "mozilla/MemoryReporting.h"
-#include "mozilla/NullPtr.h"
 
 namespace mozilla {
 
 struct StackBlock;
 struct StackMark;
 class AutoStackArena;
 
 // Private helper class for AutoStackArena.
--- a/layout/style/CounterStyleManager.h
+++ b/layout/style/CounterStyleManager.h
@@ -7,17 +7,16 @@
 #define mozilla_CounterStyleManager_h_
 
 #include "nsStringFwd.h"
 #include "nsRefPtrHashtable.h"
 #include "nsHashKeys.h"
 
 #include "nsStyleConsts.h"
 
-#include "mozilla/NullPtr.h"
 #include "mozilla/Attributes.h"
 
 #include "nsCSSValue.h"
 
 class nsPresContext;
 class nsCSSCounterStyleRule;
 
 namespace mozilla {
--- a/media/gmp-clearkey/0.1/ClearKeyDecryptionManager.cpp
+++ b/media/gmp-clearkey/0.1/ClearKeyDecryptionManager.cpp
@@ -7,17 +7,16 @@
 
 #include "ClearKeyDecryptionManager.h"
 #include "ClearKeyUtils.h"
 #include "ClearKeyStorage.h"
 #include "ClearKeyPersistence.h"
 #include "gmp-task-utils.h"
 
 #include "mozilla/Assertions.h"
-#include "mozilla/NullPtr.h"
 
 using namespace mozilla;
 using namespace std;
 
 class ClearKeyDecryptor
 {
 public:
   ClearKeyDecryptor(GMPDecryptorCallback* aCallback, const Key& aKey);
--- a/media/gmp-clearkey/0.1/ClearKeyStorage.cpp
+++ b/media/gmp-clearkey/0.1/ClearKeyStorage.cpp
@@ -3,17 +3,16 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "ClearKeyStorage.h"
 #include "ClearKeyUtils.h"
 
 #include "gmp-task-utils.h"
 
 #include "mozilla/Assertions.h"
-#include "mozilla/NullPtr.h"
 #include "mozilla/ArrayUtils.h"
 
 #include <vector>
 
 static GMPErr
 RunOnMainThread(GMPTask* aTask)
 {
   return GetPlatform()->runonmainthread(aTask);
--- a/media/gmp-clearkey/0.1/ClearKeyUtils.cpp
+++ b/media/gmp-clearkey/0.1/ClearKeyUtils.cpp
@@ -7,17 +7,16 @@
 #include <stdarg.h>
 #include <stdint.h>
 #include <vector>
 
 #include "ClearKeyUtils.h"
 #include "mozilla/ArrayUtils.h"
 #include "mozilla/Assertions.h"
 #include "mozilla/Endian.h"
-#include "mozilla/NullPtr.h"
 #include "openaes/oaes_lib.h"
 
 using namespace std;
 
 #define FOURCC(a,b,c,d) ((a << 24) + (b << 16) + (c << 8) + d)
 
 // System ID identifying the cenc v2 pssh box format; specified at:
 // https://dvcs.w3.org/hg/html-media/raw-file/tip/encrypted-media/cenc-format.html
--- a/media/gmp-clearkey/0.1/gmp-clearkey.cpp
+++ b/media/gmp-clearkey/0.1/gmp-clearkey.cpp
@@ -5,17 +5,16 @@
 #include <stdio.h>
 #include <string.h>
 
 #include "ClearKeyDecryptionManager.h"
 
 #include "gmp-api/gmp-decryption.h"
 #include "gmp-api/gmp-platform.h"
 #include "mozilla/Attributes.h"
-#include "mozilla/NullPtr.h"
 
 static GMPPlatformAPI* sPlatform = nullptr;
 GMPPlatformAPI*
 GetPlatform()
 {
   return sPlatform;
 }
 
--- a/media/mtransport/nriceresolverfake.h
+++ b/media/mtransport/nriceresolverfake.h
@@ -44,17 +44,16 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 #ifndef nriceresolverfake_h__
 #define nriceresolverfake_h__
 
 #include <map>
 #include <string>
 
 #include "nspr.h"
 #include "prnetdb.h"
-#include "mozilla/NullPtr.h"
 
 typedef struct nr_resolver_ nr_resolver;
 typedef struct nr_resolver_vtbl_ nr_resolver_vtbl;
 typedef struct nr_transport_addr_ nr_transport_addr;
 typedef struct nr_resolver_resource_ nr_resolver_resource;
 
 namespace mozilla {
 
--- a/media/mtransport/rlogringbuffer.cpp
+++ b/media/mtransport/rlogringbuffer.cpp
@@ -11,17 +11,16 @@
 
 #include "rlogringbuffer.h"
 
 #include <deque>
 #include <string>
 #include "mozilla/Assertions.h"
 #include "mozilla/Move.h" // Pinch hitting for <utility> and std::move
 #include "mozilla/Mutex.h"
-#include "mozilla/NullPtr.h"
 #include <vector>
 
 extern "C" {
 #include <csi_platform.h>
 #include "r_log.h"
 }
 
 /* Matches r_dest_vlog type defined in r_log.h */
--- a/memory/build/replace_malloc_bridge.h
+++ b/memory/build/replace_malloc_bridge.h
@@ -45,17 +45,16 @@
  * bridge are hidden when REPLACE_MALLOC_IMPL is not defined, which is
  * the case when including replace_malloc.h.
  */
 
 struct ReplaceMallocBridge;
 
 #ifdef __cplusplus
 
-#include "mozilla/NullPtr.h"
 #include "mozilla/Types.h"
 
 #ifndef REPLACE_MALLOC_IMPL
 /* Returns the replace-malloc bridge if there is one to be returned. */
 extern "C" MFBT_API ReplaceMallocBridge* get_bridge();
 #endif
 
 namespace mozilla {
--- a/memory/mozalloc/VolatileBuffer.h
+++ b/memory/mozalloc/VolatileBuffer.h
@@ -3,17 +3,16 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozalloc_VolatileBuffer_h
 #define mozalloc_VolatileBuffer_h
 
 #include "mozilla/mozalloc.h"
 #include "mozilla/RefPtr.h"
 #include "mozilla/MemoryReporting.h"
-#include "mozilla/NullPtr.h"
 
 /* VolatileBuffer
  *
  * This class represents a piece of memory that can potentially be reclaimed
  * by the OS when not in use. As long as there are one or more
  * VolatileBufferPtrs holding on to a VolatileBuffer, the memory will remain
  * available. However, when there are no VolatileBufferPtrs holding a
  * VolatileBuffer, the OS can purge the pages if it wants to. The OS can make
--- a/memory/mozalloc/VolatileBufferAshmem.cpp
+++ b/memory/mozalloc/VolatileBufferAshmem.cpp
@@ -1,15 +1,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "VolatileBuffer.h"
 #include "mozilla/Assertions.h"
-#include "mozilla/NullPtr.h"
 #include "mozilla/mozalloc.h"
 
 #include <fcntl.h>
 #include <linux/ashmem.h>
 #include <sys/mman.h>
 #include <sys/stat.h>
 #include <sys/types.h>
 #include <unistd.h>
--- a/memory/mozalloc/VolatileBufferFallback.cpp
+++ b/memory/mozalloc/VolatileBufferFallback.cpp
@@ -1,15 +1,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "VolatileBuffer.h"
 #include "mozilla/Assertions.h"
-#include "mozilla/NullPtr.h"
 #include "mozilla/mozalloc.h"
 
 #ifdef MOZ_MEMORY
 int posix_memalign(void** memptr, size_t alignment, size_t size);
 #endif
 
 namespace mozilla {
 
--- a/memory/mozalloc/mozalloc.h
+++ b/memory/mozalloc/mozalloc.h
@@ -16,17 +16,16 @@
 #include <string.h>
 #if defined(__cplusplus)
 #  include <new>
 #endif
 #include "xpcom-config.h"
 
 #if defined(__cplusplus)
 #include "mozilla/fallible.h"
-#include "mozilla/NullPtr.h"
 #include "mozilla/TemplateLib.h"
 #endif
 #include "mozilla/Attributes.h"
 
 #define MOZALLOC_HAVE_XMALLOC
 
 #if defined(MOZALLOC_EXPORT)
 /* do nothing: it's been defined to __declspec(dllexport) by
--- a/memory/mozalloc/tests/TestVolatileBuffer.cpp
+++ b/memory/mozalloc/tests/TestVolatileBuffer.cpp
@@ -1,15 +1,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "TestHarness.h"
 #include "mozilla/VolatileBuffer.h"
-#include "mozilla/NullPtr.h"
 #include <string.h>
 
 #if defined(ANDROID)
 #include <fcntl.h>
 #include <linux/ashmem.h>
 #include <sys/ioctl.h>
 #include <sys/stat.h>
 #include <sys/types.h>
--- a/memory/replace/logalloc/FdPrintf.cpp
+++ b/memory/replace/logalloc/FdPrintf.cpp
@@ -8,17 +8,16 @@
 
 #ifdef _WIN32
 #include <windows.h>
 #else
 #include <unistd.h>
 #endif
 #include <cstring>
 #include "mozilla/Assertions.h"
-#include "mozilla/NullPtr.h"
 
 /* Template class allowing a limited number of increments on a value */
 template <typename T>
 class CheckedIncrement
 {
 public:
   CheckedIncrement(T aValue, size_t aMaxIncrement)
     : mValue(aValue), mMaxIncrement(aMaxIncrement)
--- a/memory/replace/logalloc/LogAlloc.cpp
+++ b/memory/replace/logalloc/LogAlloc.cpp
@@ -14,17 +14,16 @@
 #include <process.h>
 #else
 #include <unistd.h>
 #include <pthread.h>
 #endif
 
 #include "replace_malloc.h"
 #include "FdPrintf.h"
-#include "mozilla/NullPtr.h"
 
 #include "base/lock.h"
 
 static const malloc_table_t* sFuncs = nullptr;
 static intptr_t sFd = 0;
 static bool sStdoutOrStderr = false;
 
 static Lock sLock;
--- a/memory/replace/logalloc/replay/Replay.cpp
+++ b/memory/replace/logalloc/replay/Replay.cpp
@@ -18,17 +18,16 @@ typedef int ssize_t;
 #include <sys/mman.h>
 #include <unistd.h>
 #endif
 #include <algorithm>
 #include <cstdio>
 #include <cstring>
 
 #include "mozilla/Assertions.h"
-#include "mozilla/NullPtr.h"
 #include "FdPrintf.h"
 
 static void
 die(const char* message)
 {
   /* Here, it doesn't matter that fprintf may allocate memory. */
   fprintf(stderr, "%s\n", message);
   exit(1);
--- a/mfbt/AllocPolicy.h
+++ b/mfbt/AllocPolicy.h
@@ -7,17 +7,16 @@
 /*
  * An allocation policy concept, usable for structures and algorithms to
  * control how memory is allocated and how failures are handled.
  */
 
 #ifndef mozilla_AllocPolicy_h
 #define mozilla_AllocPolicy_h
 
-#include "mozilla/NullPtr.h"
 #include "mozilla/TemplateLib.h"
 
 #include <stddef.h>
 #include <stdlib.h>
 
 namespace mozilla {
 
 /*
--- a/mfbt/AlreadyAddRefed.h
+++ b/mfbt/AlreadyAddRefed.h
@@ -7,17 +7,16 @@
 /* Typed temporary pointers for reference-counted smart pointers. */
 
 #ifndef AlreadyAddRefed_h
 #define AlreadyAddRefed_h
 
 #include "mozilla/Assertions.h"
 #include "mozilla/Attributes.h"
 #include "mozilla/Move.h"
-#include "mozilla/NullPtr.h"
 
 namespace mozilla {
 
 struct unused_t;
 
 } // namespace mozilla
 
 /**
--- a/mfbt/GuardObjects.h
+++ b/mfbt/GuardObjects.h
@@ -5,17 +5,16 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /* Implementation of macros to ensure correct use of RAII Auto* objects. */
 
 #ifndef mozilla_GuardObjects_h
 #define mozilla_GuardObjects_h
 
 #include "mozilla/Assertions.h"
-#include "mozilla/NullPtr.h"
 #include "mozilla/Types.h"
 
 #ifdef __cplusplus
 
 #ifdef DEBUG
 
 namespace mozilla {
 namespace detail {
--- a/mfbt/LinkedList.h
+++ b/mfbt/LinkedList.h
@@ -59,17 +59,16 @@
 
 #ifndef mozilla_LinkedList_h
 #define mozilla_LinkedList_h
 
 #include "mozilla/Assertions.h"
 #include "mozilla/Attributes.h"
 #include "mozilla/MemoryReporting.h"
 #include "mozilla/Move.h"
-#include "mozilla/NullPtr.h"
 
 #ifdef __cplusplus
 
 namespace mozilla {
 
 template<typename T>
 class LinkedList;
 
--- a/mfbt/Range.h
+++ b/mfbt/Range.h
@@ -2,17 +2,16 @@
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_Range_h
 #define mozilla_Range_h
 
-#include "mozilla/NullPtr.h"
 #include "mozilla/RangedPtr.h"
 
 #include <stddef.h>
 
 namespace mozilla {
 
 // Range<T> is a tuple containing a pointer and a length.
 template <typename T>
--- a/mfbt/RangedPtr.h
+++ b/mfbt/RangedPtr.h
@@ -10,17 +10,16 @@
  */
 
 #ifndef mozilla_RangedPtr_h
 #define mozilla_RangedPtr_h
 
 #include "mozilla/ArrayUtils.h"
 #include "mozilla/Assertions.h"
 #include "mozilla/Attributes.h"
-#include "mozilla/NullPtr.h"
 
 #include <stdint.h>
 
 namespace mozilla {
 
 /*
  * RangedPtr is a smart pointer restricted to an address range specified at
  * creation.  The pointer (and any smart pointers derived from it) must remain
--- a/mfbt/RefPtr.h
+++ b/mfbt/RefPtr.h
@@ -7,17 +7,16 @@
 /* Helpers for defining and using refcounted objects. */
 
 #ifndef mozilla_RefPtr_h
 #define mozilla_RefPtr_h
 
 #include "mozilla/Assertions.h"
 #include "mozilla/Atomics.h"
 #include "mozilla/Attributes.h"
-#include "mozilla/NullPtr.h"
 #include "mozilla/RefCountType.h"
 #include "mozilla/TypeTraits.h"
 #if defined(MOZILLA_INTERNAL_API)
 #include "nsXPCOM.h"
 #endif
 
 #if defined(MOZILLA_INTERNAL_API) && \
     (defined(DEBUG) || defined(FORCE_BUILD_REFCNT_LOGGING))
--- a/mfbt/Scoped.h
+++ b/mfbt/Scoped.h
@@ -53,17 +53,16 @@
  * automatically close file descriptors/file handles when reaching the end of
  * the scope, graphics contexts, etc.
  */
 
 #include "mozilla/Assertions.h"
 #include "mozilla/Attributes.h"
 #include "mozilla/GuardObjects.h"
 #include "mozilla/Move.h"
-#include "mozilla/NullPtr.h"
 
 namespace mozilla {
 
 /*
  * Scoped is a helper to create RAII wrappers
  * Type argument |Traits| is expected to have the following structure:
  *
  *   struct Traits
--- a/mfbt/SplayTree.h
+++ b/mfbt/SplayTree.h
@@ -8,17 +8,16 @@
  * A sorted tree with optimal access times, where recently-accessed elements
  * are faster to access again.
  */
 
 #ifndef mozilla_SplayTree_h
 #define mozilla_SplayTree_h
 
 #include "mozilla/Assertions.h"
-#include "mozilla/NullPtr.h"
 
 namespace mozilla {
 
 template<class T, class C>
 class SplayTree;
 
 template<typename T>
 class SplayTreeNode
--- a/mfbt/TaggedAnonymousMemory.cpp
+++ b/mfbt/TaggedAnonymousMemory.cpp
@@ -10,17 +10,16 @@
 
 #include <sys/types.h>
 #include <sys/mman.h>
 #include <sys/prctl.h>
 #include <sys/syscall.h>
 #include <unistd.h>
 
 #include "mozilla/Assertions.h"
-#include "mozilla/NullPtr.h"
 
 // These constants are copied from <sys/prctl.h>, because the headers
 // used for building may not have them even though the running kernel
 // supports them.
 #ifndef PR_SET_VMA
 #define PR_SET_VMA		0x53564d41
 #endif
 #ifndef PR_SET_VMA_ANON_NAME
--- a/mfbt/ThreadLocal.h
+++ b/mfbt/ThreadLocal.h
@@ -24,17 +24,16 @@ extern "C" {
 }
 #else
 #  include <pthread.h>
 #  include <signal.h>
 #endif
 
 #include "mozilla/Assertions.h"
 #include "mozilla/Attributes.h"
-#include "mozilla/NullPtr.h"
 #include "mozilla/TypeTraits.h"
 
 namespace mozilla {
 
 // sig_safe_t denotes an atomic type which can be read or stored in a single
 // instruction.  This means that data of this type is safe to be manipulated
 // from a signal handler, or other similar asynchronous execution contexts.
 #if defined(XP_WIN)
--- a/mfbt/Vector.h
+++ b/mfbt/Vector.h
@@ -12,17 +12,16 @@
 #include "mozilla/Alignment.h"
 #include "mozilla/AllocPolicy.h"
 #include "mozilla/ArrayUtils.h" // for PointerRangeSize
 #include "mozilla/Assertions.h"
 #include "mozilla/Attributes.h"
 #include "mozilla/MathAlgorithms.h"
 #include "mozilla/MemoryReporting.h"
 #include "mozilla/Move.h"
-#include "mozilla/NullPtr.h"
 #include "mozilla/ReentrancyGuard.h"
 #include "mozilla/TemplateLib.h"
 #include "mozilla/TypeTraits.h"
 
 #include <new> // for placement new
 
 /* Silence dire "bugs in previous versions of MSVC have been fixed" warnings */
 #ifdef _MSC_VER
--- a/mfbt/WeakPtr.h
+++ b/mfbt/WeakPtr.h
@@ -65,17 +65,16 @@
  */
 
 #ifndef mozilla_WeakPtr_h
 #define mozilla_WeakPtr_h
 
 #include "mozilla/ArrayUtils.h"
 #include "mozilla/Assertions.h"
 #include "mozilla/Attributes.h"
-#include "mozilla/NullPtr.h"
 #include "mozilla/RefPtr.h"
 #include "mozilla/TypeTraits.h"
 
 #include <string.h>
 
 namespace mozilla {
 
 template <typename T> class WeakPtr;
--- a/mfbt/decimal/moz-decimal-utils.h
+++ b/mfbt/decimal/moz-decimal-utils.h
@@ -9,17 +9,16 @@
 // This file contains extra includes, defines and typedefs to allow compilation
 // of Decimal.cpp under the Mozilla source without blink core dependencies. Do
 // not include it into any file other than Decimal.cpp.
 
 #include "../double-conversion/double-conversion.h"
 #include "mozilla/ArrayUtils.h"
 #include "mozilla/Casting.h"
 #include "mozilla/FloatingPoint.h"
-#include "mozilla/NullPtr.h"
 
 #include <cmath>
 #include <cstring>
 #include <iomanip>
 #include <limits>
 #include <sstream>
 
 #ifndef UINT64_C
--- a/mfbt/tests/TestArrayUtils.cpp
+++ b/mfbt/tests/TestArrayUtils.cpp
@@ -1,17 +1,16 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "mozilla/ArrayUtils.h"
 #include "mozilla/Assertions.h"
-#include "mozilla/NullPtr.h"
 
 using mozilla::IsInRange;
 
 static void
 TestIsInRangeNonClass()
 {
   void* nul = nullptr;
   int* intBegin = nullptr;
--- a/mfbt/tests/TestPoisonArea.cpp
+++ b/mfbt/tests/TestPoisonArea.cpp
@@ -75,17 +75,16 @@
  *    64-bit processes.
  *
  * 4. VirtualQuery() does not produce any useful information if
  *    applied to kernel memory - in fact, it doesn't write its output
  *    at all.  Thus, it is not used here.
  */
 
 #include "mozilla/IntegerPrintfMacros.h"
-#include "mozilla/NullPtr.h"
 
 // MAP_ANON(YMOUS) is not in any standard.  Add defines as necessary.
 #define _GNU_SOURCE 1
 #define _DARWIN_C_SOURCE 1
 
 #include <stddef.h>
 
 #include <errno.h>
--- a/mozglue/build/arm.cpp
+++ b/mozglue/build/arm.cpp
@@ -1,16 +1,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /* compile-time and runtime tests for whether to use various ARM extensions */
 
-#include "mozilla/NullPtr.h"
-
 #include "arm.h"
 
 #if defined(MOZILLA_ARM_HAVE_CPUID_DETECTION)
 
 // arm.h has parallel #ifs which declare MOZILLA_ARM_HAVE_CPUID_DETECTION.
 // We don't check it here so that we get compile errors if it's defined, but
 // we don't compile one of these detection methods. The detection code here is
 // based on the CPU detection in libtheora.
--- a/netwerk/protocol/rtsp/rtsp/ARTPConnection.cpp
+++ b/netwerk/protocol/rtsp/rtsp/ARTPConnection.cpp
@@ -25,17 +25,16 @@
 #include <media/stagefright/foundation/ABuffer.h>
 #include <media/stagefright/foundation/ADebug.h>
 #include <media/stagefright/foundation/AMessage.h>
 #include <media/stagefright/foundation/AString.h>
 #include <media/stagefright/foundation/hexdump.h>
 
 #include <arpa/inet.h>
 
-#include "mozilla/NullPtr.h"
 #include "mozilla/mozalloc.h"
 #include "nsTArray.h"
 #include "prnetdb.h"
 #include "prerr.h"
 #include "prerror.h"
 #include "NetworkActivityMonitor.h"
 
 using namespace mozilla::net;
--- a/netwerk/protocol/rtsp/rtsp/ARTPWriter.cpp
+++ b/netwerk/protocol/rtsp/rtsp/ARTPWriter.cpp
@@ -26,17 +26,16 @@
 #include <media/stagefright/foundation/AMessage.h>
 #include <media/stagefright/foundation/hexdump.h>
 #include <media/stagefright/MediaBuffer.h>
 #include <media/stagefright/MediaDefs.h>
 #include <media/stagefright/MediaSource.h>
 #include <media/stagefright/MetaData.h>
 #include <utils/ByteOrder.h>
 
-#include "mozilla/NullPtr.h"
 #include "NetworkActivityMonitor.h"
 
 using namespace mozilla::net;
 
 #define PT      97
 #define PT_STR  "97"
 
 namespace android {
--- a/netwerk/protocol/rtsp/rtsp/RTSPTransmitter.h
+++ b/netwerk/protocol/rtsp/rtsp/RTSPTransmitter.h
@@ -31,17 +31,16 @@
 
 #ifdef ANDROID
 #include "VideoSource.h"
 
 #include <media/stagefright/OMXClient.h>
 #include <media/stagefright/OMXCodec.h>
 #endif
 
-#include "mozilla/NullPtr.h"
 #include "prnetdb.h"
 #include "prerr.h"
 
 namespace android {
 
 #define TRACK_SUFFIX    "trackid=1"
 #define PT              96
 #define PT_STR          "96"
--- a/netwerk/protocol/rtsp/rtsp/UDPPusher.cpp
+++ b/netwerk/protocol/rtsp/rtsp/UDPPusher.cpp
@@ -19,17 +19,16 @@
 
 #include "UDPPusher.h"
 
 #include <media/stagefright/foundation/ABuffer.h>
 #include <media/stagefright/foundation/ADebug.h>
 #include <media/stagefright/foundation/AMessage.h>
 #include <utils/ByteOrder.h>
 
-#include "mozilla/NullPtr.h"
 #include "prnetdb.h"
 #include "prerr.h"
 #include "NetworkActivityMonitor.h"
 
 using namespace mozilla::net;
 
 namespace android {
 
--- a/parser/html/jArray.h
+++ b/parser/html/jArray.h
@@ -20,17 +20,16 @@
  * DEALINGS IN THE SOFTWARE.
  */
 
 #ifndef jArray_h
 #define jArray_h
 
 #include "mozilla/Attributes.h"
 #include "mozilla/BinarySearch.h"
-#include "mozilla/NullPtr.h"
 #include "nsDebug.h"
 
 template<class T, class L>
 struct staticJArray {
   const T* arr;
   const L length;
   operator T*() { return arr; }
   T& operator[] (L const index) { return ((T*)arr)[index]; }
@@ -87,17 +86,17 @@ class autoJArray {
       jArray<T,L> newArray = { arr, length };
       return newArray;
     }
     void operator=(const jArray<T,L>& other) {
       delete[] arr;
       arr = other.arr;
       length = other.length;
     }
-    void operator=(mozilla::NullptrT n) {
+    void operator=(decltype(nullptr) n) {
       // Make assigning null to an array in Java delete the buffer in C++
       MOZ_ASSERT(n == nullptr);
       delete[] arr;
       arr = nullptr;
       length = 0;
     }
 };
 
--- a/security/sandbox/linux/Sandbox.cpp
+++ b/security/sandbox/linux/Sandbox.cpp
@@ -20,17 +20,16 @@
 #include <sys/time.h>
 #include <dirent.h>
 #include <stdlib.h>
 #include <pthread.h>
 #include <errno.h>
 #include <fcntl.h>
 
 #include "mozilla/Atomics.h"
-#include "mozilla/NullPtr.h"
 #include "mozilla/SandboxInfo.h"
 #include "mozilla/unused.h"
 #include "sandbox/linux/seccomp-bpf/linux_seccomp.h"
 #if defined(ANDROID)
 #include "sandbox/linux/services/android_ucontext.h"
 #endif
 
 #ifdef MOZ_ASAN
--- a/security/sandbox/linux/SandboxAssembler.cpp
+++ b/security/sandbox/linux/SandboxAssembler.cpp
@@ -4,17 +4,16 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "SandboxAssembler.h"
 
 #include <errno.h>
 #include <utility>
 
-#include "mozilla/NullPtr.h"
 #include "sandbox/linux/seccomp-bpf/codegen.h"
 #include "sandbox/linux/seccomp-bpf/linux_seccomp.h"
 
 // Currently included only for struct arch_seccomp_data; newer
 // chromiums define it in sandbox/linux/bpf_dsl/trap_registry.h
 #include "sandbox/linux/seccomp-bpf/sandbox_bpf.h"
 
 namespace mozilla {
--- a/security/sandbox/linux/SandboxFilter.cpp
+++ b/security/sandbox/linux/SandboxFilter.cpp
@@ -12,17 +12,16 @@
 #include <linux/net.h>
 #include <linux/prctl.h>
 #include <linux/sched.h>
 #include <sys/mman.h>
 #include <time.h>
 #include <unistd.h>
 
 #include "mozilla/ArrayUtils.h"
-#include "mozilla/NullPtr.h"
 #include "sandbox/linux/seccomp-bpf/linux_seccomp.h"
 #include "sandbox/linux/services/linux_syscalls.h"
 
 namespace mozilla {
 
 class SandboxFilterImpl : public SandboxAssembler
 {
 public:
--- a/security/sandbox/linux/common/SandboxInfo.cpp
+++ b/security/sandbox/linux/common/SandboxInfo.cpp
@@ -7,17 +7,16 @@
 #include "SandboxInfo.h"
 
 #include <errno.h>
 #include <stdlib.h>
 #include <sys/prctl.h>
 
 #include "sandbox/linux/seccomp-bpf/linux_seccomp.h"
 #include "mozilla/Assertions.h"
-#include "mozilla/NullPtr.h"
 
 namespace mozilla {
 
 /* static */
 const SandboxInfo SandboxInfo::sSingleton = SandboxInfo();
 
 SandboxInfo::SandboxInfo() {
   int flags = 0;
--- a/security/sandbox/linux/glue/SandboxCrash.cpp
+++ b/security/sandbox/linux/glue/SandboxCrash.cpp
@@ -10,17 +10,16 @@
 // to be able to isolate sandbox/chromium from ipc/chromium.
 
 #include "SandboxInternal.h"
 #include "SandboxLogging.h"
 
 #include <unistd.h>
 #include <sys/syscall.h>
 
-#include "mozilla/NullPtr.h"
 #include "mozilla/unused.h"
 #include "mozilla/dom/Exceptions.h"
 #include "nsContentUtils.h"
 #ifdef MOZ_CRASHREPORTER
 #include "nsExceptionHandler.h"
 #endif
 #include "nsStackWalk.h"
 #include "nsString.h"
--- a/testing/gtest/mozilla/GTestRunner.cpp
+++ b/testing/gtest/mozilla/GTestRunner.cpp
@@ -1,17 +1,16 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  * * This Source Code Form is subject to the terms of the Mozilla Public
  * * License, v. 2.0. If a copy of the MPL was not distributed with this
  * * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "GTestRunner.h"
 #include "gtest/gtest.h"
 #include "mozilla/Attributes.h"
-#include "mozilla/NullPtr.h"
 #ifdef MOZ_CRASHREPORTER
 #include "nsICrashReporter.h"
 #endif
 #include "testing/TestHarness.h"
 #include "prenv.h"
 
 using ::testing::EmptyTestEventListener;
 using ::testing::InitGoogleTest;
--- a/testing/tools/screenshot/gdk-screenshot.cpp
+++ b/testing/tools/screenshot/gdk-screenshot.cpp
@@ -37,17 +37,16 @@
 #include <gdk/gdk.h>
 #include <gdk/gdkx.h>
 #ifdef HAVE_LIBXSS
 #include <X11/extensions/scrnsaver.h>
 #endif
 
 #include <errno.h>
 #include <stdio.h>
-#include "mozilla/NullPtr.h"
 
 gboolean save_to_stdout(const gchar *buf, gsize count,
                         GError **error, gpointer data)
 {
   size_t written = fwrite(buf, 1, count, stdout);
   if (written != count) {
     g_set_error(error, G_FILE_ERROR, g_file_error_from_errno(errno),
                 "Write to stdout failed: %s", g_strerror(errno));
--- a/toolkit/components/finalizationwitness/FinalizationWitnessService.cpp
+++ b/toolkit/components/finalizationwitness/FinalizationWitnessService.cpp
@@ -7,17 +7,16 @@
 #include "nsString.h"
 #include "jsapi.h"
 #include "js/CallNonGenericMethod.h"
 #include "mozJSComponentLoader.h"
 #include "nsZipArchive.h"
 
 #include "mozilla/Scoped.h"
 #include "mozilla/Services.h"
-#include "mozilla/NullPtr.h"
 #include "nsIObserverService.h"
 #include "nsThreadUtils.h"
 
 
 // Implementation of nsIFinalizationWitnessService
 
 namespace mozilla {
 
--- a/toolkit/crashreporter/client/crashreporter.cpp
+++ b/toolkit/crashreporter/client/crashreporter.cpp
@@ -11,17 +11,16 @@
 #endif
 
 #include <fstream>
 #include <sstream>
 #include <memory>
 #include <time.h>
 #include <stdlib.h>
 #include <string.h>
-#include "mozilla/NullPtr.h"
 
 using std::string;
 using std::istream;
 using std::ifstream;
 using std::istringstream;
 using std::ostringstream;
 using std::ostream;
 using std::ofstream;
--- a/toolkit/crashreporter/client/crashreporter_gtk_common.cpp
+++ b/toolkit/crashreporter/client/crashreporter_gtk_common.cpp
@@ -18,17 +18,16 @@
 #include <sys/types.h>
 #include <sys/wait.h>
 #include <gdk/gdkkeysyms.h>
 
 #include <algorithm>
 #include <string>
 #include <vector>
 
-#include "mozilla/NullPtr.h"
 #include "common/linux/http_upload.h"
 #include "crashreporter.h"
 #include "crashreporter_gtk_common.h"
 
 #ifndef GDK_KEY_Escape
 #define GDK_KEY_Escape GDK_Escape
 #endif
 
--- a/toolkit/crashreporter/client/crashreporter_linux.cpp
+++ b/toolkit/crashreporter/client/crashreporter_linux.cpp
@@ -6,17 +6,16 @@
 #include <dlfcn.h>
 #include <fcntl.h>
 #include <glib.h>
 #include <gtk/gtk.h>
 #include <string.h>
 
 #include <cctype>
 
-#include "mozilla/NullPtr.h"
 #include "crashreporter.h"
 #include "crashreporter_gtk_common.h"
 
 using std::string;
 using std::vector;
 
 using namespace CrashReporter;
 
--- a/toolkit/crashreporter/client/crashreporter_win.cpp
+++ b/toolkit/crashreporter/client/crashreporter_win.cpp
@@ -18,17 +18,16 @@
 #include <shlobj.h>
 #include <shlwapi.h>
 #include <math.h>
 #include <set>
 #include <algorithm>
 #include "resource.h"
 #include "client/windows/sender/crash_report_sender.h"
 #include "common/windows/string_utils-inl.h"
-#include "mozilla/NullPtr.h"
 
 #define CRASH_REPORTER_VALUE L"Enabled"
 #define SUBMIT_REPORT_VALUE  L"SubmitCrashReport"
 #define SUBMIT_REPORT_OLD    L"SubmitReport"
 #define INCLUDE_URL_VALUE    L"IncludeURL"
 #define EMAIL_ME_VALUE       L"EmailMe"
 #define EMAIL_VALUE          L"Email"
 #define MAX_EMAIL_LENGTH     1024
--- a/toolkit/library/StaticXULComponentsEnd/StaticXULComponentsEnd.cpp
+++ b/toolkit/library/StaticXULComponentsEnd/StaticXULComponentsEnd.cpp
@@ -1,10 +1,9 @@
 #include "mozilla/Module.h"
-#include "mozilla/NullPtr.h"
 
 /* Ensure end_kPStaticModules is at the end of the .kPStaticModules section
  * on Windows. Somehow, placing the object last is not enough with PGO/LTCG. */
 #ifdef _MSC_VER
 /* Sections on Windows are in two parts, separated with $. When linking,
  * sections with the same first part are all grouped, and ordered
  * alphabetically with the second part as sort key. */
 #  pragma section(".kPStaticModules$Z", read)
--- a/toolkit/library/StaticXULComponentsStart.cpp
+++ b/toolkit/library/StaticXULComponentsStart.cpp
@@ -1,4 +1,3 @@
 #include "mozilla/Module.h"
-#include "mozilla/NullPtr.h"
 
 NSMODULE_DEFN(start_kPStaticModules) = nullptr;
--- a/toolkit/mozapps/update/common/readstrings.h
+++ b/toolkit/mozapps/update/common/readstrings.h
@@ -2,18 +2,16 @@
 /* vim:set ts=2 sw=2 sts=2 et cindent: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef READSTRINGS_H__
 #define READSTRINGS_H__
 
-#include "mozilla/NullPtr.h"
-
 #define MAX_TEXT_LEN 600
 
 #ifdef XP_WIN
 # include <windows.h>
   typedef WCHAR NS_tchar;
 #else
   typedef char NS_tchar;
 #endif
--- a/toolkit/mozapps/update/tests/TestAUSHelper.cpp
+++ b/toolkit/mozapps/update/tests/TestAUSHelper.cpp
@@ -45,17 +45,16 @@
 # define NS_tstrcmp strcmp
 # define NS_ttoi atoi
 # define NS_tstat stat
 # define NS_tgetcwd getcwd
 # define NS_tfputs fputs
 # define LOG_S "%s"
 #endif
 
-#include "mozilla/NullPtr.h"
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 
 #ifndef MAXPATHLEN
 # ifdef PATH_MAX
--- a/toolkit/mozapps/update/updater/archivereader.h
+++ b/toolkit/mozapps/update/updater/archivereader.h
@@ -2,17 +2,16 @@
 /* vim:set ts=2 sw=2 sts=2 et cindent: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef ArchiveReader_h__
 #define ArchiveReader_h__
 
-#include "mozilla/NullPtr.h"
 #include <stdio.h>
 #include "mar.h"
 
 #ifdef XP_WIN
   typedef WCHAR NS_tchar;
 #else
   typedef char NS_tchar;
 #endif
--- a/tools/profiler/AutoObjectMapper.cpp
+++ b/tools/profiler/AutoObjectMapper.cpp
@@ -6,17 +6,16 @@
 
 #include <sys/mman.h>
 #include <unistd.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
 
 #include "mozilla/Assertions.h"
-#include "mozilla/NullPtr.h"
 
 #include "PlatformMacros.h"
 #include "AutoObjectMapper.h"
 
 #if defined(SPS_OS_android) && !defined(MOZ_WIDGET_GONK)
 # include <dlfcn.h>
 # include "mozilla/Types.h"
   // FIXME move these out of mozglue/linker/ElfLoader.h into their
--- a/tools/profiler/GeckoProfiler.h
+++ b/tools/profiler/GeckoProfiler.h
@@ -44,17 +44,16 @@
  *          application is responding to the event loop. Lower is better.
  * 't' - Elapse time since recording started.
  *
  */
 
 #ifndef SAMPLER_H
 #define SAMPLER_H
 
-#include "mozilla/NullPtr.h"
 #include "js/TypeDecls.h"
 
 namespace mozilla {
 class TimeStamp;
 }
 
 enum TracingMetadata {
   TRACING_DEFAULT,
--- a/tools/profiler/GeckoProfilerFunc.h
+++ b/tools/profiler/GeckoProfilerFunc.h
@@ -1,17 +1,16 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef PROFILER_FUNCS_H
 #define PROFILER_FUNCS_H
 
-#include "mozilla/NullPtr.h"
 #include "js/TypeDecls.h"
 #include "js/ProfilingStack.h"
 #include <stdint.h>
 
 namespace mozilla {
 class TimeStamp;
 }
 
--- a/tools/profiler/LulCommonExt.h
+++ b/tools/profiler/LulCommonExt.h
@@ -65,17 +65,16 @@
 #include <stdint.h>
 
 #include <string>
 #include <map>
 #include <vector>
 #include <cstddef>            // for std::ptrdiff_t
 
 #include "mozilla/Assertions.h"
-#include "mozilla/NullPtr.h"
 
 namespace lul {
 
 ////////////////////////////////////////////////////////////////
 // UniqueString
 //
 
 // Abstract type
--- a/tools/profiler/LulExidx.cpp
+++ b/tools/profiler/LulExidx.cpp
@@ -90,17 +90,16 @@ WITH THE SOFTWARE OR THE USE OR OTHER DE
 //   records that Breakpad stores.
 
 // This file is derived from the following files in
 // toolkit/crashreporter/google-breakpad:
 //   src/common/arm_ex_to_module.cc
 //   src/common/arm_ex_reader.cc
 
 #include "mozilla/Assertions.h"
-#include "mozilla/NullPtr.h"
 
 #include "LulExidxExt.h"
 
 
 #define ARM_EXBUF_START(x) (((x) >> 4) & 0x0f)
 #define ARM_EXBUF_COUNT(x) ((x) & 0x0f)
 #define ARM_EXBUF_END(x)   (ARM_EXBUF_START(x) + ARM_EXBUF_COUNT(x))
 
--- a/tools/profiler/LulRWLock.cpp
+++ b/tools/profiler/LulRWLock.cpp
@@ -1,17 +1,16 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "mozilla/Assertions.h"
 #include "mozilla/DebugOnly.h"
-#include "mozilla/NullPtr.h"
 
 #include "LulRWLock.h"
 
 
 namespace lul {
 
 // An implementation for targets where libpthread does provide
 // pthread_rwlock_t.  These are straight wrappers around the
--- a/tools/profiler/PseudoStack.h
+++ b/tools/profiler/PseudoStack.h
@@ -2,17 +2,16 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef PROFILER_PSEUDO_STACK_H_
 #define PROFILER_PSEUDO_STACK_H_
 
 #include "mozilla/ArrayUtils.h"
-#include "mozilla/NullPtr.h"
 #include <stdint.h>
 #include "js/ProfilingStack.h"
 #include <stdlib.h>
 #include "mozilla/Atomics.h"
 #include "nsISupportsImpl.h"
 
 /* we duplicate this code here to avoid header dependencies
  * which make it more difficult to include in other places */
--- a/widget/gonk/libdisplay/BootAnimation.cpp
+++ b/widget/gonk/libdisplay/BootAnimation.cpp
@@ -16,17 +16,16 @@
 #include <algorithm>
 #include <endian.h>
 #include <fcntl.h>
 #include <string>
 #include <sys/mman.h>
 #include <sys/stat.h>
 #include <vector>
 #include "mozilla/FileUtils.h"
-#include "mozilla/NullPtr.h"
 #include "png.h"
 
 #include "android/log.h"
 #include "GonkDisplay.h"
 #include "hardware/gralloc.h"
 
 #define LOG(args...)  __android_log_print(ANDROID_LOG_INFO, "Gonk" , ## args)
 #define LOGW(args...) __android_log_print(ANDROID_LOG_WARN, "Gonk", ## args)
--- a/widget/gonk/libdisplay/GonkDisplayICS.cpp
+++ b/widget/gonk/libdisplay/GonkDisplayICS.cpp
@@ -19,17 +19,16 @@
 #include <hardware/hardware.h>
 #include <hardware/gralloc.h>
 #include <hardware/hwcomposer.h>
 #include <hardware_legacy/power.h>
 #include <cutils/log.h>
 #include <fcntl.h>
 
 #include "mozilla/FileUtils.h"
-#include "mozilla/NullPtr.h"
 #include "mozilla/FileUtils.h"
 
 #include "BootAnimation.h"
 
 using namespace android;
 
 
 namespace {
--- a/xpcom/base/StaticPtr.h
+++ b/xpcom/base/StaticPtr.h
@@ -4,17 +4,16 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_StaticPtr_h
 #define mozilla_StaticPtr_h
 
 #include "mozilla/Assertions.h"
 #include "mozilla/Attributes.h"
-#include "mozilla/NullPtr.h"
 
 namespace mozilla {
 
 /**
  * StaticAutoPtr and StaticRefPtr are like nsAutoPtr and nsRefPtr, except they
  * are suitable for use as global variables.
  *
  * In particular, a global instance of Static{Auto,Ref}Ptr doesn't cause the
--- a/xpcom/base/nscore.h
+++ b/xpcom/base/nscore.h
@@ -21,20 +21,16 @@
 #endif
 
 /**
  * Incorporate the integer data types which XPCOM uses.
  */
 #include <stddef.h>
 #include <stdint.h>
 
-#ifdef __cplusplus
-#  include "mozilla/NullPtr.h"
-#endif
-
 #include "mozilla/RefCountType.h"
 
 /* Core XPCOM declarations. */
 
 /*----------------------------------------------------------------------*/
 /* Import/export defines */
 
 #ifdef HAVE_VISIBILITY_HIDDEN_ATTRIBUTE
--- a/xpcom/glue/nsCOMPtr.h
+++ b/xpcom/glue/nsCOMPtr.h
@@ -19,17 +19,16 @@
  * for owning objects
  *                      -- scc
  */
 
 #include "mozilla/AlreadyAddRefed.h"
 #include "mozilla/Assertions.h"
 #include "mozilla/Attributes.h"
 #include "mozilla/Move.h"
-#include "mozilla/NullPtr.h"
 #include "mozilla/TypeTraits.h"
 
 #include "nsDebug.h" // for |NS_ABORT_IF_FALSE|, |NS_ASSERTION|
 #include "nsISupportsUtils.h" // for |nsresult|, |NS_ADDREF|, |NS_GET_TEMPLATE_IID| et al
 
 #include "nsCycleCollectionNoteChild.h"