Bug 1401813 - Rename Null[C]String() as Void[C]String(). r=erahm.
authorNicholas Nethercote <nnethercote@mozilla.com>
Fri, 22 Sep 2017 14:35:46 +1000
changeset 668892 10cfc563ec9dc126f4667d1d6952fbd2a703ab9a
parent 668891 e2b1cd9fd4a66fc932d8f74cfe2b38c55b9a7a1e
child 668893 cfb739b281f8640bcb4a4ec4515e8a6dd7c22040
child 669013 ad2acefd8ad209e1d25dc3458c75dedc51049839
push id81146
push userbmo:topwu.tw@gmail.com
push dateFri, 22 Sep 2017 05:24:51 +0000
reviewerserahm
bugs1401813
milestone58.0a1
Bug 1401813 - Rename Null[C]String() as Void[C]String(). r=erahm. XPCOM's string API doesn't have the notion of a "null string". But it does have the notion of a "void string" (or "voided string"), and that's what these functions are returning. So the names should reflect that.
docshell/base/nsDocShell.cpp
docshell/shistory/nsSHEntry.cpp
dom/base/CustomElementRegistry.cpp
dom/base/DOMImplementation.cpp
dom/base/Element.cpp
dom/base/nsDOMMutationObserver.h
dom/base/nsDocument.cpp
dom/console/Console.cpp
dom/file/ipc/PendingIPCBlobChild.cpp
dom/file/ipc/PendingIPCBlobParent.cpp
dom/html/HTMLFormElement.cpp
dom/html/HTMLImageElement.cpp
dom/indexedDB/ActorsParent.cpp
dom/indexedDB/IDBFileHandle.h
dom/indexedDB/IDBObjectStore.cpp
dom/ipc/ContentChild.h
dom/ipc/ContentParent.cpp
dom/media/MediaManager.cpp
dom/plugins/base/nsPluginInstanceOwner.cpp
dom/plugins/ipc/PluginMessageUtils.h
dom/presentation/PresentationRequest.cpp
dom/quota/ActorsParent.cpp
dom/storage/LocalStorage.cpp
dom/storage/SessionStorage.cpp
dom/workers/RuntimeService.cpp
dom/workers/ServiceWorkerPrivate.cpp
dom/workers/WorkerPrivate.cpp
dom/xhr/XMLHttpRequestMainThread.cpp
dom/xhr/XMLHttpRequestWorker.cpp
dom/xslt/xslt/txMozillaXMLOutput.cpp
dom/xul/templates/nsXULTemplateBuilder.cpp
gfx/angle/src/tests/preprocessor_tests/input_test.cpp
js/xpconnect/loader/URLPreloader.h
js/xpconnect/loader/mozJSSubScriptLoader.cpp
parser/html/nsHtml5TreeOperation.cpp
toolkit/components/backgroundhangmonitor/HangDetails.h
xpcom/string/nsReadableUtils.cpp
xpcom/string/nsReadableUtils.h
xpcom/string/nsTString.h
xpfe/components/directory/nsDirectoryViewer.cpp
--- a/docshell/base/nsDocShell.cpp
+++ b/docshell/base/nsDocShell.cpp
@@ -1604,17 +1604,17 @@ nsDocShell::LoadURI(nsIURI* aURI,
                       loadReplace,
                       referrer,
                       referrerPolicy,
                       triggeringPrincipal,
                       principalToInherit,
                       flags,
                       target,
                       nullptr,      // No type hint
-                      NullString(), // No forced download
+                      VoidString(), // No forced download
                       postStream,
                       headersStream,
                       loadType,
                       nullptr, // No SHEntry
                       aFirstParty,
                       srcdoc,
                       sourceDocShell,
                       baseURI,
@@ -5483,18 +5483,18 @@ nsDocShell::LoadErrorPage(nsIURI* aURI, 
   nsCOMPtr<nsIURI> errorPageURI;
   nsresult rv = NS_NewURI(getter_AddRefs(errorPageURI), errorPageUrl);
   NS_ENSURE_SUCCESS(rv, rv);
 
   return InternalLoad(errorPageURI, nullptr, Nothing(), false, nullptr,
                       mozilla::net::RP_Unset,
                       nsContentUtils::GetSystemPrincipal(), nullptr,
                       INTERNAL_LOAD_FLAGS_NONE, EmptyString(),
-                      nullptr, NullString(), nullptr, nullptr, LOAD_ERROR_PAGE,
-                      nullptr, true, NullString(), this, nullptr, false,
+                      nullptr, VoidString(), nullptr, nullptr, LOAD_ERROR_PAGE,
+                      nullptr, true, VoidString(), this, nullptr, false,
                       nullptr, nullptr);
 }
 
 NS_IMETHODIMP
 nsDocShell::Reload(uint32_t aReloadFlags)
 {
   if (!IsNavigationAllowed()) {
     return NS_OK; // JS may not handle returning of an error code
@@ -5584,17 +5584,17 @@ nsDocShell::Reload(uint32_t aReloadFlags
                       loadReplace,
                       referrerURI,
                       referrerPolicy,
                       triggeringPrincipal,
                       triggeringPrincipal,
                       flags,
                       EmptyString(),   // No window target
                       NS_LossyConvertUTF16toASCII(contentTypeHint).get(),
-                      NullString(),    // No forced download
+                      VoidString(),    // No forced download
                       nullptr,         // No post data
                       nullptr,         // No headers data
                       loadType,        // Load type
                       nullptr,         // No SHEntry
                       true,
                       srcdoc,          // srcdoc argument for iframe
                       this,            // For reloads we are the source
                       baseURI,
@@ -9752,17 +9752,17 @@ public:
     return mDocShell->InternalLoad(mURI, mOriginalURI, mResultPrincipalURI,
                                    mLoadReplace,
                                    mReferrer,
                                    mReferrerPolicy,
                                    mTriggeringPrincipal, mPrincipalToInherit,
                                    mFlags, EmptyString(),
                                    mTypeHint.IsVoid() ? nullptr
                                                       : mTypeHint.get(),
-                                   NullString(), mPostData, mHeadersData,
+                                   VoidString(), mPostData, mHeadersData,
                                    mLoadType, mSHEntry, mFirstParty,
                                    mSrcdoc, mSourceDocShell, mBaseURI,
                                    mCheckForPrerender, nullptr, nullptr);
   }
 
 private:
   nsCString mTypeHint;
   nsString mSrcdoc;
@@ -10221,17 +10221,17 @@ nsDocShell::InternalLoad(nsIURI* aURI,
                                         aLoadReplace,
                                         aReferrer,
                                         aReferrerPolicy,
                                         aTriggeringPrincipal,
                                         principalToInherit,
                                         aFlags,
                                         EmptyString(),   // No window target
                                         aTypeHint,
-                                        NullString(),    // No forced download
+                                        VoidString(),    // No forced download
                                         aPostData,
                                         aHeadersData,
                                         aLoadType,
                                         aSHEntry,
                                         aFirstParty,
                                         aSrcdoc,
                                         aSourceDocShell,
                                         aBaseURI,
@@ -10832,17 +10832,17 @@ nsDocShell::InternalLoad(nsIURI* aURI,
       aSHEntry->SyncPresentationState();
     }
   }
 
   nsAutoString srcdoc;
   if (aFlags & INTERNAL_LOAD_FLAGS_IS_SRCDOC) {
     srcdoc = aSrcdoc;
   } else {
-    srcdoc = NullString();
+    srcdoc = VoidString();
   }
 
   bool isTopLevelDoc = mItemType == typeContent &&
                        (isTargetTopLevelDocShell ||
                         GetIsMozBrowser());
 
   OriginAttributes attrs = GetOriginAttributes();
   attrs.SetFirstPartyDomain(isTopLevelDoc, aURI);
@@ -12855,17 +12855,17 @@ nsDocShell::LoadHistoryEntry(nsISHEntry*
   bool isSrcdoc;
   nsCOMPtr<nsIURI> baseURI;
   aEntry->GetIsSrcdocEntry(&isSrcdoc);
   if (isSrcdoc) {
     aEntry->GetSrcdocData(srcdoc);
     aEntry->GetBaseURI(getter_AddRefs(baseURI));
     flags |= INTERNAL_LOAD_FLAGS_IS_SRCDOC;
   } else {
-    srcdoc = NullString();
+    srcdoc = VoidString();
   }
 
   if (!triggeringPrincipal) {
     triggeringPrincipal = nsContentUtils::GetSystemPrincipal();
   }
 
   // Passing nullptr as aSourceDocShell gives the same behaviour as before
   // aSourceDocShell was introduced. According to spec we should be passing
@@ -12879,17 +12879,17 @@ nsDocShell::LoadHistoryEntry(nsISHEntry*
                     loadReplace,
                     referrerURI,
                     referrerPolicy,
                     triggeringPrincipal,
                     principalToInherit,
                     flags,
                     EmptyString(),      // No window target
                     contentType.get(),  // Type hint
-                    NullString(),       // No forced file download
+                    VoidString(),       // No forced file download
                     postData,           // Post data stream
                     nullptr,            // No headers stream
                     aLoadType,          // Load type
                     aEntry,             // SHEntry
                     true,
                     srcdoc,
                     nullptr,            // Source docshell, see comment above
                     baseURI,
@@ -14449,17 +14449,17 @@ nsDocShell::OnLinkClickSync(nsIContent* 
                              target,                    // Window target
                              NS_LossyConvertUTF16toASCII(typeHint).get(),
                              aFileName,                 // Download as file
                              aPostDataStream,           // Post data stream
                              aHeadersDataStream,        // Headers stream
                              LOAD_LINK,                 // Load type
                              nullptr,                   // No SHEntry
                              true,                      // first party site
-                             NullString(),              // No srcdoc
+                             VoidString(),              // No srcdoc
                              this,                      // We are the source
                              nullptr,                   // baseURI not needed
                              true,                      // Check for prerendered doc
                              aDocShell,                 // DocShell out-param
                              aRequest);                 // Request out-param
   if (NS_SUCCEEDED(rv)) {
     DispatchPings(this, aContent, aURI, referer, refererPolicy);
   }
--- a/docshell/shistory/nsSHEntry.cpp
+++ b/docshell/shistory/nsSHEntry.cpp
@@ -471,17 +471,17 @@ nsSHEntry::Create(nsIURI* aURI, const ns
   // By default we save LayoutHistoryState
   mShared->mSaveLayoutState = true;
   mShared->mLayoutHistoryState = aLayoutHistoryState;
 
   // By default the page is not expired
   mShared->mExpired = false;
 
   mIsSrcdocEntry = false;
-  mSrcdocData = NullString();
+  mSrcdocData = VoidString();
 
   mLoadedInThisProcess = true;
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsSHEntry::Clone(nsISHEntry** aResult)
--- a/dom/base/CustomElementRegistry.cpp
+++ b/dom/base/CustomElementRegistry.cpp
@@ -968,19 +968,19 @@ CustomElementRegistry::Upgrade(Element* 
         int32_t namespaceID = name->NamespaceID();
         nsAutoString attrValue, namespaceURI;
         info.mValue->ToString(attrValue);
         nsContentUtils::NameSpaceManager()->GetNameSpaceURI(namespaceID,
                                                             namespaceURI);
 
         LifecycleCallbackArgs args = {
           nsDependentAtomString(attrName),
-          NullString(),
-          (attrValue.IsEmpty() ? NullString() : attrValue),
-          (namespaceURI.IsEmpty() ? NullString() : namespaceURI)
+          VoidString(),
+          (attrValue.IsEmpty() ? VoidString() : attrValue),
+          (namespaceURI.IsEmpty() ? VoidString() : namespaceURI)
         };
         EnqueueLifecycleCallback(nsIDocument::eAttributeChanged, aElement,
                                  &args, aDefinition);
       }
     }
   }
 
   // Step 4.
--- a/dom/base/DOMImplementation.cpp
+++ b/dom/base/DOMImplementation.cpp
@@ -65,17 +65,17 @@ DOMImplementation::CreateDocumentType(co
   if (!name) {
     aRv.Throw(NS_ERROR_OUT_OF_MEMORY);
     return nullptr;
   }
 
   // Indicate that there is no internal subset (not just an empty one)
   RefPtr<DocumentType> docType =
     NS_NewDOMDocumentType(mOwner->NodeInfoManager(), name, aPublicId,
-                          aSystemId, NullString(), aRv);
+                          aSystemId, VoidString(), aRv);
   return docType.forget();
 }
 
 NS_IMETHODIMP
 DOMImplementation::CreateDocumentType(const nsAString& aQualifiedName,
                                       const nsAString& aPublicId,
                                       const nsAString& aSystemId,
                                       nsIDOMDocumentType** aReturn)
@@ -183,17 +183,17 @@ DOMImplementation::CreateHTMLDocument(co
 
   nsCOMPtr<nsIDOMDocumentType> doctype;
   // Indicate that there is no internal subset (not just an empty one)
   nsresult rv = NS_NewDOMDocumentType(getter_AddRefs(doctype),
                                       mOwner->NodeInfoManager(),
                                       nsGkAtoms::html, // aName
                                       EmptyString(), // aPublicId
                                       EmptyString(), // aSystemId
-                                      NullString()); // aInternalSubset
+                                      VoidString()); // aInternalSubset
   NS_ENSURE_SUCCESS(rv, rv);
 
 
   nsCOMPtr<nsIGlobalObject> scriptHandlingObject =
     do_QueryReferent(mScriptObject);
 
   NS_ENSURE_STATE(!mScriptObject || scriptHandlingObject);
 
@@ -244,18 +244,17 @@ DOMImplementation::CreateHTMLDocument(co
 }
 
 already_AddRefed<nsIDocument>
 DOMImplementation::CreateHTMLDocument(const Optional<nsAString>& aTitle,
                                       ErrorResult& aRv)
 {
   nsCOMPtr<nsIDocument> document;
   nsCOMPtr<nsIDOMDocument> domDocument;
-  aRv = CreateHTMLDocument(aTitle.WasPassed() ? aTitle.Value()
-                                              : NullString(),
+  aRv = CreateHTMLDocument(aTitle.WasPassed() ? aTitle.Value() : VoidString(),
                            getter_AddRefs(document),
                            getter_AddRefs(domDocument));
   return document.forget();
 }
 
 NS_IMETHODIMP
 DOMImplementation::CreateHTMLDocument(const nsAString& aTitle,
                                       nsIDOMDocument** aReturn)
--- a/dom/base/Element.cpp
+++ b/dom/base/Element.cpp
@@ -2637,19 +2637,19 @@ Element::SetAttrAndNotify(int32_t aNames
         }
         nsCOMPtr<nsIAtom> newValueAtom = valueForAfterSetAttr.GetAsAtom();
         nsAutoString ns;
         nsContentUtils::NameSpaceManager()->GetNameSpaceURI(aNamespaceID, ns);
 
         LifecycleCallbackArgs args = {
           nsDependentAtomString(aName),
           aModType == nsIDOMMutationEvent::ADDITION ?
-            NullString() : nsDependentAtomString(oldValueAtom),
+            VoidString() : nsDependentAtomString(oldValueAtom),
           nsDependentAtomString(newValueAtom),
-          (ns.IsEmpty() ? NullString() : ns)
+          (ns.IsEmpty() ? VoidString() : ns)
         };
 
         nsContentUtils::EnqueueLifecycleCallback(
           OwnerDoc(), nsIDocument::eAttributeChanged, this, &args, definition);
       }
     }
   }
 
@@ -2933,18 +2933,18 @@ Element::UnsetAttr(int32_t aNameSpaceID,
                                                                 aName)) {
         nsAutoString ns;
         nsContentUtils::NameSpaceManager()->GetNameSpaceURI(aNameSpaceID, ns);
 
         nsCOMPtr<nsIAtom> oldValueAtom = oldValue.GetAsAtom();
         LifecycleCallbackArgs args = {
           nsDependentAtomString(aName),
           nsDependentAtomString(oldValueAtom),
-          NullString(),
-          (ns.IsEmpty() ? NullString() : ns)
+          VoidString(),
+          (ns.IsEmpty() ? VoidString() : ns)
         };
 
         nsContentUtils::EnqueueLifecycleCallback(
           OwnerDoc(), nsIDocument::eAttributeChanged, this, &args, definition);
       }
     }
   }
 
--- a/dom/base/nsDOMMutationObserver.h
+++ b/dom/base/nsDOMMutationObserver.h
@@ -34,17 +34,17 @@ class nsDOMMutationRecord final : public
                                   public nsWrapperCache
 {
   virtual ~nsDOMMutationRecord() {}
 
 public:
   typedef nsTArray<RefPtr<mozilla::dom::Animation>> AnimationArray;
 
   nsDOMMutationRecord(nsIAtom* aType, nsISupports* aOwner)
-  : mType(aType), mAttrNamespace(NullString()), mPrevValue(NullString()), mOwner(aOwner)
+  : mType(aType), mAttrNamespace(VoidString()), mPrevValue(VoidString()), mOwner(aOwner)
   {
   }
 
   nsISupports* GetParentObject() const
   {
     return mOwner;
   }
 
--- a/dom/base/nsDocument.cpp
+++ b/dom/base/nsDocument.cpp
@@ -3579,17 +3579,17 @@ nsresult
 nsIDocument::GetSrcdocData(nsAString &aSrcdocData)
 {
   if (mIsSrcdocDocument) {
     nsCOMPtr<nsIInputStreamChannel> inStrmChan = do_QueryInterface(mChannel);
     if (inStrmChan) {
       return inStrmChan->GetSrcdocData(aSrcdocData);
     }
   }
-  aSrcdocData = NullString();
+  aSrcdocData = VoidString();
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsDocument::GetActiveElement(nsIDOMElement **aElement)
 {
   nsCOMPtr<nsIDOMElement> el(do_QueryInterface(nsIDocument::GetActiveElement()));
   el.forget(aElement);
@@ -9791,17 +9791,17 @@ nsDocument::PreloadPictureImageSource(co
 {
   // Nested pictures are not valid syntax, so while we'll eventually load them,
   // it's not worth tracking sources mixed between nesting levels to preload
   // them effectively.
   if (mPreloadPictureDepth == 1 && mPreloadPictureFoundSource.IsVoid()) {
     // <picture> selects the first matching source, so if this returns a URI we
     // needn't consider new sources until a new <picture> is encountered.
     bool found =
-      HTMLImageElement::SelectSourceForTagWithAttrs(this, true, NullString(),
+      HTMLImageElement::SelectSourceForTagWithAttrs(this, true, VoidString(),
                                                     aSrcsetAttr, aSizesAttr,
                                                     aTypeAttr, aMediaAttr,
                                                     mPreloadPictureFoundSource);
     if (found && mPreloadPictureFoundSource.IsVoid()) {
       // Found an empty source, which counts
       mPreloadPictureFoundSource.SetIsVoid(false);
     }
   }
@@ -9820,17 +9820,17 @@ nsDocument::ResolvePreloadImage(nsIURI *
     // We're in a <picture> element and found a URI from a source previous to
     // this image, use it.
     sourceURL = mPreloadPictureFoundSource;
     isImgSet = true;
   } else {
     // Otherwise try to use this <img> as a source
     HTMLImageElement::SelectSourceForTagWithAttrs(this, false, aSrcAttr,
                                                   aSrcsetAttr, aSizesAttr,
-                                                  NullString(), NullString(),
+                                                  VoidString(), VoidString(),
                                                   sourceURL);
     isImgSet = !aSrcsetAttr.IsEmpty();
   }
 
   // Empty sources are not loaded by <img> (i.e. not resolved to the baseURI)
   if (sourceURL.IsEmpty()) {
     return nullptr;
   }
@@ -12799,17 +12799,17 @@ nsIDocument::Constructor(const GlobalObj
   if (!uri) {
     rv.Throw(NS_ERROR_OUT_OF_MEMORY);
     return nullptr;
   }
 
   nsCOMPtr<nsIDOMDocument> document;
   nsresult res =
     NS_NewDOMDocument(getter_AddRefs(document),
-                      NullString(),
+                      VoidString(),
                       EmptyString(),
                       nullptr,
                       uri,
                       uri,
                       prin->GetPrincipal(),
                       true,
                       global,
                       DocumentFlavorPlain,
--- a/dom/console/Console.cpp
+++ b/dom/console/Console.cpp
@@ -1839,17 +1839,17 @@ Console::ProcessArguments(JSContext* aCx
           JS::Rooted<JSString*> jsString(aCx, JS::ToString(aCx, v));
           if (NS_WARN_IF(!jsString)) {
             return false;
           }
 
           int32_t diff = aSequence.Length() - aStyles.Length();
           if (diff > 0) {
             for (int32_t i = 0; i < diff; i++) {
-              if (NS_WARN_IF(!aStyles.AppendElement(NullString(), fallible))) {
+              if (NS_WARN_IF(!aStyles.AppendElement(VoidString(), fallible))) {
                 return false;
               }
             }
           }
 
           nsAutoJSString string;
           if (NS_WARN_IF(!string.init(aCx, jsString))) {
             return false;
--- a/dom/file/ipc/PendingIPCBlobChild.cpp
+++ b/dom/file/ipc/PendingIPCBlobChild.cpp
@@ -38,17 +38,17 @@ PendingIPCBlobChild::SetPendingInfoAndDe
 
 already_AddRefed<BlobImpl>
 PendingIPCBlobChild::SetPendingInfoAndDeleteActor(const nsString& aContentType,
                                                   uint64_t aLength)
 {
   RefPtr<BlobImpl> blobImpl;
   blobImpl.swap(mBlobImpl);
 
-  blobImpl->SetLazyData(NullString(), aContentType, aLength, INT64_MAX);
+  blobImpl->SetLazyData(VoidString(), aContentType, aLength, INT64_MAX);
 
   PendingIPCBlobData data(nsString(aContentType), aLength, void_t());
   Unused << Send__delete__(this, data);
 
   return blobImpl.forget();
 }
 
 } // namespace dom
--- a/dom/file/ipc/PendingIPCBlobParent.cpp
+++ b/dom/file/ipc/PendingIPCBlobParent.cpp
@@ -39,17 +39,17 @@ PendingIPCBlobParent::Create(PBackground
 PendingIPCBlobParent::PendingIPCBlobParent(BlobImpl* aBlobImpl)
   : mBlobImpl(aBlobImpl)
 {}
 
 IPCResult
 PendingIPCBlobParent::Recv__delete__(const PendingIPCBlobData& aData)
 {
   if (aData.file().type() == PendingIPCFileUnion::Tvoid_t) {
-    mBlobImpl->SetLazyData(NullString(), aData.type(), aData.size(), INT64_MAX);
+    mBlobImpl->SetLazyData(VoidString(), aData.type(), aData.size(), INT64_MAX);
   } else {
     const PendingIPCFileData& fileData =
       aData.file().get_PendingIPCFileData();
     mBlobImpl->SetLazyData(fileData.name(), aData.type(), aData.size(),
                            fileData.lastModified());
   }
 
   return IPC_OK();
--- a/dom/html/HTMLFormElement.cpp
+++ b/dom/html/HTMLFormElement.cpp
@@ -797,17 +797,17 @@ HTMLFormElement::SubmitSubmission(HTMLFo
 
     nsCOMPtr<nsIInputStream> postDataStream;
     rv = aFormSubmission->GetEncodedSubmission(actionURI,
                                                getter_AddRefs(postDataStream));
     NS_ENSURE_SUBMIT_SUCCESS(rv);
 
     rv = linkHandler->OnLinkClickSync(this, actionURI,
                                       target.get(),
-                                      NullString(),
+                                      VoidString(),
                                       postDataStream, nullptr, false,
                                       getter_AddRefs(docShell),
                                       getter_AddRefs(mSubmittingRequest));
     NS_ENSURE_SUBMIT_SUCCESS(rv);
   }
 
   // Even if the submit succeeds, it's possible for there to be no docshell
   // or request; for example, if it's to a named anchor within the same page
--- a/dom/html/HTMLImageElement.cpp
+++ b/dom/html/HTMLImageElement.cpp
@@ -348,17 +348,17 @@ HTMLImageElement::AfterSetAttr(int32_t a
     // initaiated by a user interaction.
     mUseUrgentStartForChannel = EventStateManager::IsHandlingUserInput();
 
     // SetAttr handles setting src since it needs to catch img.src =
     // img.src, so we only need to handle the unset case
     if (InResponsiveMode()) {
       if (mResponsiveSelector &&
           mResponsiveSelector->Content() == this) {
-        mResponsiveSelector->SetDefaultSource(NullString());
+        mResponsiveSelector->SetDefaultSource(VoidString());
       }
       QueueImageLoadTask(true);
     } else {
       // Bug 1076583 - We still behave synchronously in the non-responsive case
       CancelImageRequests(aNotify);
     }
   } else if (aName == nsGkAtoms::srcset &&
              aNameSpaceID == kNameSpaceID_None) {
--- a/dom/indexedDB/ActorsParent.cpp
+++ b/dom/indexedDB/ActorsParent.cpp
@@ -17373,17 +17373,17 @@ FileManager::InitDirectory(nsIFile* aDir
     if (NS_WARN_IF(NS_FAILED(rv))) {
       return rv;
     }
 
     if (hasElements) {
       nsCOMPtr<mozIStorageConnection> connection;
       rv = CreateStorageConnection(aDatabaseFile,
                                    aDirectory,
-                                   NullString(),
+                                   VoidString(),
                                    aPersistenceType,
                                    aGroup,
                                    aOrigin,
                                    aTelemetryId,
                                    getter_AddRefs(connection));
       if (NS_WARN_IF(NS_FAILED(rv))) {
         return rv;
       }
--- a/dom/indexedDB/IDBFileHandle.h
+++ b/dom/indexedDB/IDBFileHandle.h
@@ -198,17 +198,17 @@ public:
 
   already_AddRefed<IDBFileRequest>
   GetMetadata(const IDBFileMetadataParameters& aParameters, ErrorResult& aRv);
 
   already_AddRefed<IDBFileRequest>
   ReadAsArrayBuffer(uint64_t aSize, ErrorResult& aRv)
   {
     AssertIsOnOwningThread();
-    return Read(aSize, false, NullString(), aRv);
+    return Read(aSize, false, VoidString(), aRv);
   }
 
   already_AddRefed<IDBFileRequest>
   ReadAsText(uint64_t aSize, const nsAString& aEncoding, ErrorResult& aRv)
   {
     AssertIsOnOwningThread();
     return Read(aSize, true, aEncoding, aRv);
   }
--- a/dom/indexedDB/IDBObjectStore.cpp
+++ b/dom/indexedDB/IDBObjectStore.cpp
@@ -920,17 +920,17 @@ public:
 
       parent = do_QueryObject(globalScope);
     }
 
     MOZ_ASSERT(parent);
 
     if (aData.tag == SCTAG_DOM_BLOB) {
       aFile.mBlob->Impl()->SetLazyData(
-        NullString(), aData.type, aData.size, INT64_MAX);
+        VoidString(), aData.type, aData.size, INT64_MAX);
       MOZ_ASSERT(!aFile.mBlob->IsFile());
 
       // ActorsParent sends here a kind of half blob and half file wrapped into
       // a DOM File object. DOM File and DOM Blob are a WebIDL wrapper around a
       // BlobImpl object. SetLazyData() has just changed the BlobImpl to be a
       // Blob (see the previous assert), but 'aFile.mBlob' still has the WebIDL
       // DOM File wrapping.
       // Before exposing it to content, we must recreate a DOM Blob object.
--- a/dom/ipc/ContentChild.h
+++ b/dom/ipc/ContentChild.h
@@ -763,17 +763,17 @@ private:
    * generated by the chrome process.
    */
   uint32_t mMsaaID;
 #endif
 
   AppInfo mAppInfo;
 
   bool mIsForBrowser;
-  nsString mRemoteType = NullString();
+  nsString mRemoteType = VoidString();
   bool mIsAlive;
   nsString mProcessName;
 
   static ContentChild* sSingleton;
 
   class ShutdownCanary;
   static StaticAutoPtr<ShutdownCanary> sShutdownCanary;
 
--- a/dom/ipc/ContentParent.cpp
+++ b/dom/ipc/ContentParent.cpp
@@ -4691,17 +4691,17 @@ ContentParent::RecvCreateWindow(PBrowser
   const uint64_t nextTabParentId = ++sNextTabParentId;
   sNextTabParents.Put(nextTabParentId, newTab);
 
   nsCOMPtr<nsITabParent> newRemoteTab;
   mozilla::ipc::IPCResult ipcResult =
     CommonCreateWindow(aThisTab, /* aSetOpener = */ true, aChromeFlags,
                        aCalledFromJS, aPositionSpecified, aSizeSpecified,
                        nullptr, aFeatures, aBaseURI, aFullZoom,
-                       nextTabParentId, NullString(), rv,
+                       nextTabParentId, VoidString(), rv,
                        newRemoteTab, &cwi.windowOpened(),
                        aTriggeringPrincipal);
   if (!ipcResult) {
     return ipcResult;
   }
 
   if (NS_WARN_IF(NS_FAILED(rv))) {
     return IPC_OK();
--- a/dom/media/MediaManager.cpp
+++ b/dom/media/MediaManager.cpp
@@ -421,17 +421,17 @@ public:
       mgr->GetWindowListener(mWindowID);
 
     if (!windowListener) {
       nsCOMPtr<nsIObserverService> obs = services::GetObserverService();
       auto* globalWindow = nsGlobalWindow::GetInnerWindowWithId(mWindowID);
       if (globalWindow) {
         RefPtr<GetUserMediaRequest> req =
           new GetUserMediaRequest(globalWindow->AsInner(),
-                                  NullString(), NullString());
+                                  VoidString(), VoidString());
         obs->NotifyObservers(req, "recording-device-stopped", nullptr);
       }
       return;
     }
 
     MOZ_ASSERT(windowListener == this,
                "There should only be one window listener per window ID");
 
--- a/dom/plugins/base/nsPluginInstanceOwner.cpp
+++ b/dom/plugins/base/nsPluginInstanceOwner.cpp
@@ -486,17 +486,17 @@ NS_IMETHODIMP nsPluginInstanceOwner::Get
   // bypass ContentPolicy checks which should still be enforced.
   nsCOMPtr<nsIPrincipal> triggeringPrincipal;
   if (!aDoCheckLoadURIChecks) {
     mozilla::OriginAttributes attrs =
       BasePrincipal::Cast(content->NodePrincipal())->OriginAttributesRef();
     triggeringPrincipal = BasePrincipal::CreateCodebasePrincipal(uri, attrs);
   }
 
-  rv = lh->OnLinkClick(content, uri, unitarget.get(), NullString(),
+  rv = lh->OnLinkClick(content, uri, unitarget.get(), VoidString(),
                        aPostStream, headersDataStream, true, triggeringPrincipal);
 
   return rv;
 }
 
 NS_IMETHODIMP nsPluginInstanceOwner::GetDocument(nsIDocument* *aDocument)
 {
   nsCOMPtr<nsIContent> content = do_QueryReferent(mContent);
--- a/dom/plugins/ipc/PluginMessageUtils.h
+++ b/dom/plugins/ipc/PluginMessageUtils.h
@@ -302,17 +302,17 @@ inline bool IsDrawingModelDirect(int16_t
 }
 
 // in NPAPI, char* == nullptr is sometimes meaningful.  the following is
 // helper code for dealing with nullable nsCString's
 inline nsCString
 NullableString(const char* aString)
 {
     if (!aString) {
-        return NullCString();
+        return VoidCString();
     }
     return nsCString(aString);
 }
 
 inline const char*
 NullableStringGet(const nsCString& str)
 {
   if (str.IsVoid())
--- a/dom/presentation/PresentationRequest.cpp
+++ b/dom/presentation/PresentationRequest.cpp
@@ -135,17 +135,17 @@ PresentationRequest::WrapObject(JSContex
                                 JS::Handle<JSObject*> aGivenProto)
 {
   return PresentationRequestBinding::Wrap(aCx, this, aGivenProto);
 }
 
 already_AddRefed<Promise>
 PresentationRequest::Start(ErrorResult& aRv)
 {
-  return StartWithDevice(NullString(), aRv);
+  return StartWithDevice(VoidString(), aRv);
 }
 
 already_AddRefed<Promise>
 PresentationRequest::StartWithDevice(const nsAString& aDeviceId,
                                      ErrorResult& aRv)
 {
   nsCOMPtr<nsIGlobalObject> global = do_QueryInterface(GetOwner());
   if (NS_WARN_IF(!global)) {
--- a/dom/quota/ActorsParent.cpp
+++ b/dom/quota/ActorsParent.cpp
@@ -5838,17 +5838,17 @@ QuotaManager::ShutdownTimerCallback(nsIT
   auto quotaManager = static_cast<QuotaManager*>(aClosure);
   MOZ_ASSERT(quotaManager);
 
   NS_WARNING("Some storage operations are taking longer than expected "
              "during shutdown and will be aborted!");
 
   // Abort all operations.
   for (RefPtr<Client>& client : quotaManager->mClients) {
-    client->AbortOperations(NullCString());
+    client->AbortOperations(VoidCString());
   }
 }
 
 auto
 QuotaManager::GetDirectoryLockTable(PersistenceType aPersistenceType)
   -> DirectoryLockTable&
 {
   switch (aPersistenceType) {
--- a/dom/storage/LocalStorage.cpp
+++ b/dom/storage/LocalStorage.cpp
@@ -149,17 +149,17 @@ LocalStorage::RemoveItem(const nsAString
 
   nsAutoString old;
   aRv = mCache->RemoveItem(this, aKey, old);
   if (aRv.Failed()) {
     return;
   }
 
   if (!aRv.ErrorCodeIs(NS_SUCCESS_DOM_NO_OPERATION)) {
-    BroadcastChangeNotification(aKey, old, NullString());
+    BroadcastChangeNotification(aKey, old, VoidString());
   }
 }
 
 void
 LocalStorage::Clear(nsIPrincipal& aSubjectPrincipal, ErrorResult& aRv)
 {
   if (!CanUseStorage(aSubjectPrincipal)) {
     aRv.Throw(NS_ERROR_DOM_SECURITY_ERR);
@@ -167,17 +167,17 @@ LocalStorage::Clear(nsIPrincipal& aSubje
   }
 
   aRv = mCache->Clear(this);
   if (NS_WARN_IF(aRv.Failed())) {
     return;
   }
 
   if (!aRv.ErrorCodeIs(NS_SUCCESS_DOM_NO_OPERATION)) {
-    BroadcastChangeNotification(NullString(), NullString(), NullString());
+    BroadcastChangeNotification(VoidString(), VoidString(), VoidString());
   }
 }
 
 void
 LocalStorage::BroadcastChangeNotification(const nsAString& aKey,
                                           const nsAString& aOldValue,
                                           const nsAString& aNewValue)
 {
--- a/dom/storage/SessionStorage.cpp
+++ b/dom/storage/SessionStorage.cpp
@@ -150,30 +150,30 @@ SessionStorage::RemoveItem(const nsAStri
   nsString oldValue;
   nsresult rv = mCache->RemoveItem(DATASET, aKey, oldValue);
   MOZ_ASSERT(NS_SUCCEEDED(rv));
 
   if (rv == NS_SUCCESS_DOM_NO_OPERATION) {
     return;
   }
 
-  BroadcastChangeNotification(aKey, oldValue, NullString());
+  BroadcastChangeNotification(aKey, oldValue, VoidString());
 }
 
 void
 SessionStorage::Clear(nsIPrincipal& aSubjectPrincipal,
                       ErrorResult& aRv)
 {
   uint32_t length = GetLength(aSubjectPrincipal, aRv);
   if (!length) {
     return;
   }
 
   mCache->Clear(DATASET);
-  BroadcastChangeNotification(NullString(), NullString(), NullString());
+  BroadcastChangeNotification(VoidString(), VoidString(), VoidString());
 }
 
 void
 SessionStorage::BroadcastChangeNotification(const nsAString& aKey,
                                             const nsAString& aOldValue,
                                             const nsAString& aNewValue)
 {
   NotifyChange(this, Principal(), aKey, aOldValue, aNewValue, u"sessionStorage",
--- a/dom/workers/RuntimeService.cpp
+++ b/dom/workers/RuntimeService.cpp
@@ -2416,17 +2416,17 @@ RuntimeService::CreateSharedWorkerFromLo
   // WorkerPrivate already exists and its secure context state doesn't match
   // what we want for the new SharedWorker.
   bool shouldAttachToWorkerPrivate = true;
   bool created = false;
   ErrorResult rv;
   if (!workerPrivate) {
     workerPrivate =
       WorkerPrivate::Constructor(aCx, aScriptURL, false,
-                                 WorkerTypeShared, aName, NullCString(),
+                                 WorkerTypeShared, aName, VoidCString(),
                                  aLoadInfo, rv);
     NS_ENSURE_TRUE(workerPrivate, rv.StealNSResult());
 
     created = true;
   } else {
     // Check whether the secure context state matches.  The current compartment
     // of aCx is the compartment of the SharedWorker constructor that was
     // invoked, which is the compartment of the document that will be hooked up
--- a/dom/workers/ServiceWorkerPrivate.cpp
+++ b/dom/workers/ServiceWorkerPrivate.cpp
@@ -1873,17 +1873,17 @@ ServiceWorkerPrivate::SpawnWorkerIfNeede
   AutoJSAPI jsapi;
   jsapi.Init();
   ErrorResult error;
   NS_ConvertUTF8toUTF16 scriptSpec(mInfo->ScriptSpec());
 
   mWorkerPrivate = WorkerPrivate::Constructor(jsapi.cx(),
                                               scriptSpec,
                                               false, WorkerTypeService,
-                                              NullString(),
+                                              VoidString(),
                                               mInfo->Scope(),
                                               &info, error);
   if (NS_WARN_IF(error.Failed())) {
     return error.StealNSResult();
   }
 
   RenewKeepAliveToken(aWhy);
 
--- a/dom/workers/WorkerPrivate.cpp
+++ b/dom/workers/WorkerPrivate.cpp
@@ -4641,17 +4641,17 @@ already_AddRefed<WorkerPrivate>
 WorkerPrivate::Constructor(const GlobalObject& aGlobal,
                            const nsAString& aScriptURL,
                            bool aIsChromeWorker, WorkerType aWorkerType,
                            const nsAString& aWorkerName,
                            WorkerLoadInfo* aLoadInfo, ErrorResult& aRv)
 {
   JSContext* cx = aGlobal.Context();
   return Constructor(cx, aScriptURL, aIsChromeWorker, aWorkerType,
-                     aWorkerName, NullCString(), aLoadInfo, aRv);
+                     aWorkerName, VoidCString(), aLoadInfo, aRv);
 }
 
 // static
 already_AddRefed<WorkerPrivate>
 WorkerPrivate::Constructor(JSContext* aCx,
                            const nsAString& aScriptURL,
                            bool aIsChromeWorker, WorkerType aWorkerType,
                            const nsAString& aWorkerName,
--- a/dom/xhr/XMLHttpRequestMainThread.cpp
+++ b/dom/xhr/XMLHttpRequestMainThread.cpp
@@ -1525,17 +1525,17 @@ XMLHttpRequestMainThread::Open(const nsA
 }
 
 // This case is hit when the async parameter is outright omitted, which
 // should set it to true (and the username and password to null).
 void
 XMLHttpRequestMainThread::Open(const nsACString& aMethod, const nsAString& aUrl,
                                ErrorResult& aRv)
 {
-  Open(aMethod, aUrl, true, NullString(), NullString(), aRv);
+  Open(aMethod, aUrl, true, VoidString(), VoidString(), aRv);
 }
 
 // This case is hit when the async parameter is specified, even if the
 // JS value was "undefined" (which due to legacy reasons should be
 // treated as true, which is how it will already be passed in here).
 void
 XMLHttpRequestMainThread::Open(const nsACString& aMethod,
                                const nsAString& aUrl,
--- a/dom/xhr/XMLHttpRequestWorker.cpp
+++ b/dom/xhr/XMLHttpRequestWorker.cpp
@@ -1424,18 +1424,18 @@ OpenRunnable::MainThreadRunInternal()
     NS_ENSURE_SUCCESS(rv, rv);
   }
 
   MOZ_ASSERT(!mProxy->mInOpen);
   mProxy->mInOpen = true;
 
   ErrorResult rv2;
   mProxy->mXHR->Open(mMethod, mURL, true,
-                     mUser.WasPassed() ? mUser.Value() : NullString(),
-                     mPassword.WasPassed() ? mPassword.Value() : NullString(),
+                     mUser.WasPassed() ? mUser.Value() : VoidString(),
+                     mPassword.WasPassed() ? mPassword.Value() : VoidString(),
                      rv2);
 
   MOZ_ASSERT(mProxy->mInOpen);
   mProxy->mInOpen = false;
 
   if (rv2.Failed()) {
     return rv2.StealNSResult();
   }
@@ -2041,17 +2041,17 @@ XMLHttpRequestWorker::Send(JSContext* aC
   if (!mProxy) {
     aRv.Throw(NS_ERROR_DOM_INVALID_STATE_ERR);
     return;
   }
 
   RefPtr<SendRunnable> sendRunnable;
 
   if (aData.IsNull()) {
-    sendRunnable = new SendRunnable(mWorkerPrivate, mProxy, NullString());
+    sendRunnable = new SendRunnable(mWorkerPrivate, mProxy, VoidString());
     // Nothing to clone.
   }
 
   else if (aData.Value().IsDocument()) {
     MOZ_CRASH("Documents are not exposed to workers.");
   }
 
   else if (aData.Value().IsBlob()) {
--- a/dom/xslt/xslt/txMozillaXMLOutput.cpp
+++ b/dom/xslt/xslt/txMozillaXMLOutput.cpp
@@ -899,17 +899,17 @@ txMozillaXMLOutput::createResultDocument
             }
 
             // Indicate that there is no internal subset (not just an empty one)
             rv = NS_NewDOMDocumentType(getter_AddRefs(documentType),
                                        mNodeInfoManager,
                                        doctypeName,
                                        mOutputFormat.mPublicId,
                                        mOutputFormat.mSystemId,
-                                       NullString());
+                                       VoidString());
             NS_ENSURE_SUCCESS(rv, rv);
 
             nsCOMPtr<nsIContent> docType = do_QueryInterface(documentType);
             rv = mDocument->AppendChildTo(docType, true);
             NS_ENSURE_SUCCESS(rv, rv);
         }
     }
 
--- a/dom/xul/templates/nsXULTemplateBuilder.cpp
+++ b/dom/xul/templates/nsXULTemplateBuilder.cpp
@@ -482,17 +482,17 @@ nsXULTemplateBuilder::CreateContents(nsI
 }
 
 NS_IMETHODIMP
 nsXULTemplateBuilder::HasGeneratedContent(nsIRDFResource* aResource,
                                           nsIAtom* aTag,
                                           bool* aGenerated)
 {
     ErrorResult rv;
-    const nsAString& tag = aTag ? nsDependentAtomString(aTag) : NullString();
+    const nsAString& tag = aTag ? nsDependentAtomString(aTag) : VoidString();
     *aGenerated = HasGeneratedContent(aResource, tag, rv);
     return rv.StealNSResult();
 }
 
 void
 nsXULTemplateBuilder::AddResult(nsIXULTemplateResult* aResult,
                                 nsINode& aQueryNode,
                                 ErrorResult& aError)
--- a/gfx/angle/src/tests/preprocessor_tests/input_test.cpp
+++ b/gfx/angle/src/tests/preprocessor_tests/input_test.cpp
@@ -16,17 +16,17 @@ TEST_F(InitTest, ZeroCount)
 {
     EXPECT_TRUE(mPreprocessor.init(0, NULL, NULL));
 
     pp::Token token;
     mPreprocessor.lex(&token);
     EXPECT_EQ(pp::Token::LAST, token.type);
 }
 
-TEST_F(InitTest, NullString)
+TEST_F(InitTest, VoidString)
 {
     EXPECT_FALSE(mPreprocessor.init(1, NULL, NULL));
 }
 
 TEST(InputTest, DefaultConstructor)
 {
     pp::Input input;
     EXPECT_EQ(0u, input.count());
--- a/js/xpconnect/loader/URLPreloader.h
+++ b/js/xpconnect/loader/URLPreloader.h
@@ -219,17 +219,17 @@ private:
     };
 
     // Represents an entry in the URI cache.
     struct URLEntry final : public CacheKey
                           , public LinkedListElement<URLEntry>
     {
         MOZ_IMPLICIT URLEntry(const CacheKey& key)
             : CacheKey(key)
-            , mData(NullCString())
+            , mData(VoidCString())
         {}
 
         explicit URLEntry(nsIFile* file)
           : CacheKey(file)
         {}
 
         // For use with nsTArray::Sort.
         //
--- a/js/xpconnect/loader/mozJSSubScriptLoader.cpp
+++ b/js/xpconnect/loader/mozJSSubScriptLoader.cpp
@@ -41,17 +41,17 @@ using namespace mozilla;
 using namespace mozilla::dom;
 
 class MOZ_STACK_CLASS LoadSubScriptOptions : public OptionsBase {
 public:
     explicit LoadSubScriptOptions(JSContext* cx = xpc_GetSafeJSContext(),
                                   JSObject* options = nullptr)
         : OptionsBase(cx, options)
         , target(cx)
-        , charset(NullString())
+        , charset(VoidString())
         , ignoreCache(false)
         , async(false)
         , wantReturnValue(false)
     { }
 
     virtual bool Parse() {
       return ParseObject("target", &target) &&
              ParseString("charset", charset) &&
--- a/parser/html/nsHtml5TreeOperation.cpp
+++ b/parser/html/nsHtml5TreeOperation.cpp
@@ -679,17 +679,17 @@ nsHtml5TreeOperation::AppendDoctypeToDoc
   // Adapted from nsXMLContentSink
   // Create a new doctype node
   nsCOMPtr<nsIDOMDocumentType> docType;
   NS_NewDOMDocumentType(getter_AddRefs(docType),
                         aBuilder->GetNodeInfoManager(),
                         aName,
                         aPublicId,
                         aSystemId,
-                        NullString());
+                        VoidString());
   NS_ASSERTION(docType, "Doctype creation failed.");
   nsCOMPtr<nsIContent> asContent = do_QueryInterface(docType);
   return AppendToDocument(asContent, aBuilder);
 }
 
 nsIContent*
 nsHtml5TreeOperation::GetDocumentFragmentForTemplate(nsIContent* aNode)
 {
--- a/toolkit/components/backgroundhangmonitor/HangDetails.h
+++ b/toolkit/components/backgroundhangmonitor/HangDetails.h
@@ -27,30 +27,30 @@ namespace mozilla {
  * XPCOM interface which is harder to serialize over IPC.
  */
 class HangDetails
 {
 public:
   HangDetails()
     : mDuration(0)
     , mProcess(GeckoProcessType_Invalid)
-    , mRemoteType(NullString())
+    , mRemoteType(VoidString())
   {}
 
   HangDetails(const HangDetails& aOther) = default;
   HangDetails(HangDetails&& aOther) = default;
   HangDetails(uint32_t aDuration,
               GeckoProcessType aProcess,
               const nsACString& aThreadName,
               const nsACString& aRunnableName,
               HangStack&& aStack,
               HangMonitor::HangAnnotations&& aAnnotations)
     : mDuration(aDuration)
     , mProcess(aProcess)
-    , mRemoteType(NullString())
+    , mRemoteType(VoidString())
     , mThreadName(aThreadName)
     , mRunnableName(aRunnableName)
     , mStack(Move(aStack))
     , mAnnotations(Move(aAnnotations))
   {}
 
   uint32_t mDuration;
   GeckoProcessType mProcess;
--- a/xpcom/string/nsReadableUtils.cpp
+++ b/xpcom/string/nsReadableUtils.cpp
@@ -1161,25 +1161,25 @@ const nsCString&
 EmptyCString()
 {
   static const nsDependentCString sEmpty((const char*)empty_buffer);
 
   return sEmpty;
 }
 
 const nsString&
-NullString()
+VoidString()
 {
   static const nsString sNull(mozilla::detail::StringDataFlags::VOIDED);
 
   return sNull;
 }
 
 const nsCString&
-NullCString()
+VoidCString()
 {
   static const nsCString sNull(mozilla::detail::StringDataFlags::VOIDED);
 
   return sNull;
 }
 
 int32_t
 CompareUTF8toUTF16(const nsACString& aUTF8String,
--- a/xpcom/string/nsReadableUtils.h
+++ b/xpcom/string/nsReadableUtils.h
@@ -421,18 +421,18 @@ bool StringEndsWith(const nsAString& aSo
                     const nsStringComparator& aComparator);
 bool StringEndsWith(const nsACString& aSource, const nsACString& aSubstring);
 bool StringEndsWith(const nsACString& aSource, const nsACString& aSubstring,
                     const nsCStringComparator& aComparator);
 
 const nsString& EmptyString();
 const nsCString& EmptyCString();
 
-const nsString& NullString();
-const nsCString& NullCString();
+const nsString& VoidString();
+const nsCString& VoidCString();
 
 /**
 * Compare a UTF-8 string to an UTF-16 string.
 *
 * Returns 0 if the strings are equal, -1 if aUTF8String is less
 * than aUTF16Count, and 1 in the reverse case.  In case of fatal
 * error (eg the strings are not valid UTF8 and UTF16 respectively),
 * this method will return INT32_MIN.
--- a/xpcom/string/nsTString.h
+++ b/xpcom/string/nsTString.h
@@ -496,18 +496,18 @@ protected:
   // allow subclasses to initialize fields directly
   nsTString(char_type* aData, size_type aLength, DataFlags aDataFlags,
             ClassFlags aClassFlags)
     : substring_type(aData, aLength, aDataFlags,
                      aClassFlags | ClassFlags::NULL_TERMINATED)
   {
   }
 
-  friend const nsTString<char>& NullCString();
-  friend const nsTString<char16_t>& NullString();
+  friend const nsTString<char>& VoidCString();
+  friend const nsTString<char16_t>& VoidString();
 
   // Used by Null[C]String.
   explicit nsTString(DataFlags aDataFlags)
     : substring_type(char_traits::sEmptyBuffer, 0,
                      aDataFlags | DataFlags::TERMINATED,
                      ClassFlags::NULL_TERMINATED)
   {}
 
--- a/xpfe/components/directory/nsDirectoryViewer.cpp
+++ b/xpfe/components/directory/nsDirectoryViewer.cpp
@@ -926,17 +926,17 @@ nsHTTPIndex::FireTimer(nsITimer* aTimer,
   {
     httpIndex->mConnectionList->GetLength(&numItems);
     if (numItems > 0)
     {
       nsCOMPtr<nsIRDFResource> source =
           do_QueryElementAt(httpIndex->mConnectionList, 0);
       httpIndex->mConnectionList->RemoveElementAt(0);
 
-      nsCString uri = NullCString();
+      nsCString uri = VoidCString();
       if (source) {
         httpIndex->GetDestination(source, uri);
       }
 
       if (uri.IsVoid()) {
         NS_ERROR("Could not reconstruct uri");
         return;
       }