Bug 1260871 - Remove do_GetAtom() and rename NS_NewAtom() as NS_Atomize(). r=erahm.
authorNicholas Nethercote <nnethercote@mozilla.com>
Tue, 29 Mar 2016 10:09:43 +1100
changeset 328985 9146977af0d77727c5f81a75943b1c4dd7a2f38d
parent 328984 2724b036ed2b3a3bab2987a563ccc7fc64488618
child 328986 2344e8a7c4b7849778c4df45bc67a510aae8c218
push id6048
push userkmoir@mozilla.com
push dateMon, 06 Jun 2016 19:02:08 +0000
treeherdermozilla-beta@46d72a56c57d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerserahm
bugs1260871
milestone48.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1260871 - Remove do_GetAtom() and rename NS_NewAtom() as NS_Atomize(). r=erahm. do_GetAtom() is currently just a synonym for NS_NewAtom().
docshell/base/nsDocShell.cpp
dom/base/AnonymousContent.cpp
dom/base/DOMImplementation.cpp
dom/base/Element.cpp
dom/base/FragmentOrElement.cpp
dom/base/nsAttrValue.cpp
dom/base/nsContentList.cpp
dom/base/nsContentSink.cpp
dom/base/nsContentUtils.cpp
dom/base/nsDOMMutationObserver.cpp
dom/base/nsDOMWindowUtils.cpp
dom/base/nsDocument.cpp
dom/base/nsGenericDOMDataNode.cpp
dom/base/nsINode.cpp
dom/base/nsNodeInfoManager.cpp
dom/base/nsReferencedElement.cpp
dom/events/CommandEvent.cpp
dom/events/DataTransfer.cpp
dom/events/EventListenerManager.cpp
dom/events/EventTarget.cpp
dom/events/EventTarget.h
dom/events/MutationEvent.cpp
dom/html/HTMLAllCollection.cpp
dom/html/nsDOMStringMap.cpp
dom/html/nsGenericHTMLElement.cpp
dom/html/nsHTMLDocument.cpp
dom/smil/nsSMILMappedAttribute.cpp
dom/smil/nsSMILParserUtils.cpp
dom/svg/nsSVGElement.cpp
dom/xbl/XBLChildrenElement.cpp
dom/xbl/nsXBLPrototypeBinding.cpp
dom/xbl/nsXBLPrototypeHandler.cpp
dom/xbl/nsXBLWindowKeyHandler.cpp
dom/xml/ProcessingInstruction.cpp
dom/xml/nsXMLContentSink.cpp
dom/xslt/base/txExpandedName.cpp
dom/xslt/base/txNamespaceMap.cpp
dom/xslt/base/txStringUtils.h
dom/xslt/xml/txXMLUtils.cpp
dom/xslt/xpath/txExpr.h
dom/xslt/xpath/txExprParser.cpp
dom/xslt/xpath/txMozillaXPathTreeWalker.cpp
dom/xslt/xslt/txInstructions.cpp
dom/xslt/xslt/txMozillaXMLOutput.cpp
dom/xslt/xslt/txMozillaXSLTProcessor.cpp
dom/xslt/xslt/txPatternParser.cpp
dom/xslt/xslt/txStylesheetCompileHandlers.cpp
dom/xslt/xslt/txXSLTPatterns.cpp
dom/xul/XULDocument.cpp
dom/xul/nsXULElement.cpp
dom/xul/nsXULPrototypeDocument.cpp
dom/xul/templates/nsXULContentBuilder.cpp
dom/xul/templates/nsXULSortService.cpp
dom/xul/templates/nsXULTemplateBuilder.cpp
dom/xul/templates/nsXULTemplateQueryProcessorRDF.cpp
dom/xul/templates/nsXULTemplateQueryProcessorStorage.cpp
dom/xul/templates/nsXULTemplateQueryProcessorXML.cpp
dom/xul/templates/nsXULTreeBuilder.cpp
editor/composer/nsComposerCommands.cpp
editor/libeditor/nsEditor.cpp
editor/libeditor/nsHTMLAnonymousUtils.cpp
editor/libeditor/nsHTMLCSSUtils.cpp
editor/libeditor/nsHTMLEditRules.cpp
editor/libeditor/nsHTMLEditor.cpp
editor/libeditor/nsHTMLEditorStyle.cpp
embedding/browser/nsDocShellTreeOwner.cpp
gfx/src/nsDeviceContext.cpp
gfx/src/nsThebesFontEnumerator.cpp
gfx/tests/gtest/gfxFontSelectionTests.h
gfx/tests/gtest/gfxTextRunPerfTest.cpp
gfx/tests/gtest/gfxWordCacheTest.cpp
gfx/thebes/gfxFontconfigFonts.cpp
intl/hyphenation/glue/nsHyphenationManager.cpp
intl/locale/nsLanguageAtomService.cpp
js/xpconnect/src/XPCConvert.cpp
layout/base/nsCSSFrameConstructor.cpp
layout/base/nsPresContext.cpp
layout/forms/nsComboboxControlFrame.cpp
layout/generic/nsTextRunTransformations.cpp
layout/inspector/inDOMUtils.cpp
layout/style/StyleRule.cpp
layout/style/nsCSSParser.cpp
layout/style/nsCSSRuleProcessor.cpp
layout/style/nsComputedDOMStyle.cpp
layout/style/nsRuleNode.cpp
layout/style/nsStyleStruct.cpp
layout/xul/tree/nsTreeColumns.cpp
layout/xul/tree/nsTreeUtils.cpp
netwerk/streamconv/nsStreamConverterService.cpp
parser/html/nsHtml5TreeOperation.h
parser/htmlparser/nsHTMLTags.cpp
rdf/base/nsRDFContentSink.cpp
rdf/base/nsRDFXMLSerializer.cpp
toolkit/components/typeaheadfind/nsTypeAheadFind.cpp
xpcom/ds/nsAtomService.cpp
xpcom/ds/nsAtomTable.cpp
xpcom/ds/nsIAtom.idl
xpcom/ds/nsIAtomService.idl
xpcom/io/nsDirectoryService.cpp
xpcom/tests/TestStaticAtoms.cpp
xpcom/tests/gtest/TestAtoms.cpp
--- a/docshell/base/nsDocShell.cpp
+++ b/docshell/base/nsDocShell.cpp
@@ -345,17 +345,17 @@ ForEachPing(nsIContent* aContent, ForEac
   //       implemented an interface that exposed an enumeration of nsIURIs.
 
   // Make sure we are dealing with either an <A> or <AREA> element in the HTML
   // or XHTML namespace.
   if (!IsElementAnchor(aContent)) {
     return;
   }
 
-  nsCOMPtr<nsIAtom> pingAtom = do_GetAtom("ping");
+  nsCOMPtr<nsIAtom> pingAtom = NS_Atomize("ping");
   if (!pingAtom) {
     return;
   }
 
   nsAutoString value;
   aContent->GetAttr(kNameSpaceID_None, pingAtom, value);
   if (value.IsEmpty()) {
     return;
--- a/dom/base/AnonymousContent.cpp
+++ b/dom/base/AnonymousContent.cpp
@@ -136,17 +136,17 @@ AnonymousContent::GetCanvasContext(const
 
   return context.forget();
 }
 
 Element*
 AnonymousContent::GetElementById(const nsAString& aElementId)
 {
   // This can be made faster in the future if needed.
-  nsCOMPtr<nsIAtom> elementId = do_GetAtom(aElementId);
+  nsCOMPtr<nsIAtom> elementId = NS_Atomize(aElementId);
   for (nsIContent* kid = mContentNode->GetFirstChild(); kid;
        kid = kid->GetNextNode(mContentNode)) {
     if (!kid->IsElement()) {
       continue;
     }
     nsIAtom* id = kid->AsElement()->GetID();
     if (id && id == elementId) {
       return kid->AsElement();
--- a/dom/base/DOMImplementation.cpp
+++ b/dom/base/DOMImplementation.cpp
@@ -65,17 +65,17 @@ DOMImplementation::CreateDocumentType(co
     return nullptr;
   }
 
   aRv = nsContentUtils::CheckQName(aQualifiedName);
   if (aRv.Failed()) {
     return nullptr;
   }
 
-  nsCOMPtr<nsIAtom> name = do_GetAtom(aQualifiedName);
+  nsCOMPtr<nsIAtom> name = NS_Atomize(aQualifiedName);
   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,
--- a/dom/base/Element.cpp
+++ b/dom/base/Element.cpp
@@ -1184,20 +1184,20 @@ Element::SetAttribute(const nsAString& a
     if (aError.Failed()) {
       return;
     }
 
     nsCOMPtr<nsIAtom> nameAtom;
     if (IsHTMLElement() && IsInHTMLDocument()) {
       nsAutoString lower;
       nsContentUtils::ASCIIToLower(aName, lower);
-      nameAtom = do_GetAtom(lower);
+      nameAtom = NS_Atomize(lower);
     }
     else {
-      nameAtom = do_GetAtom(aName);
+      nameAtom = NS_Atomize(aName);
     }
     if (!nameAtom) {
       aError.Throw(NS_ERROR_OUT_OF_MEMORY);
       return;
     }
     aError = SetAttr(kNameSpaceID_None, nameAtom, aValue, true);
     return;
   }
@@ -1269,17 +1269,17 @@ Element::GetAttributeNS(const nsAString&
     nsContentUtils::NameSpaceManager()->GetNameSpaceID(aNamespaceURI);
 
   if (nsid == kNameSpaceID_Unknown) {
     // Unknown namespace means no attribute.
     SetDOMStringToNull(aReturn);
     return;
   }
 
-  nsCOMPtr<nsIAtom> name = do_GetAtom(aLocalName);
+  nsCOMPtr<nsIAtom> name = NS_Atomize(aLocalName);
   bool hasAttr = GetAttr(nsid, name, aReturn);
   if (!hasAttr) {
     SetDOMStringToNull(aReturn);
   }
 }
 
 void
 Element::SetAttributeNS(const nsAString& aNamespaceURI,
@@ -1301,17 +1301,17 @@ Element::SetAttributeNS(const nsAString&
                    aValue, true);
 }
 
 void
 Element::RemoveAttributeNS(const nsAString& aNamespaceURI,
                            const nsAString& aLocalName,
                            ErrorResult& aError)
 {
-  nsCOMPtr<nsIAtom> name = do_GetAtom(aLocalName);
+  nsCOMPtr<nsIAtom> name = NS_Atomize(aLocalName);
   int32_t nsid =
     nsContentUtils::NameSpaceManager()->GetNameSpaceID(aNamespaceURI);
 
   if (nsid == kNameSpaceID_Unknown) {
     // If the namespace ID is unknown, it means there can't possibly be an
     // existing attribute. We would need a known namespace ID to pass into
     // UnsetAttr, so we return early if we don't have one.
     return;
@@ -1387,17 +1387,17 @@ Element::HasAttributeNS(const nsAString&
   int32_t nsid =
     nsContentUtils::NameSpaceManager()->GetNameSpaceID(aNamespaceURI);
 
   if (nsid == kNameSpaceID_Unknown) {
     // Unknown namespace means no attr...
     return false;
   }
 
-  nsCOMPtr<nsIAtom> name = do_GetAtom(aLocalName);
+  nsCOMPtr<nsIAtom> name = NS_Atomize(aLocalName);
   return HasAttr(nsid, name);
 }
 
 already_AddRefed<nsIHTMLCollection>
 Element::GetElementsByClassName(const nsAString& aClassNames)
 {
   return nsContentUtils::GetElementsByClassName(this, aClassNames);
 }
@@ -2441,17 +2441,17 @@ Element::SetAttrAndNotify(int32_t aNames
     Attr* attrNode =
       GetAttributeNodeNSInternal(ns, nsDependentAtomString(aName));
     mutation.mRelatedNode = attrNode;
 
     mutation.mAttrName = aName;
     nsAutoString newValue;
     GetAttr(aNamespaceID, aName, newValue);
     if (!newValue.IsEmpty()) {
-      mutation.mNewAttrValue = do_GetAtom(newValue);
+      mutation.mNewAttrValue = NS_Atomize(newValue);
     }
     if (!oldValue->IsEmptyString()) {
       mutation.mPrevAttrValue = oldValue->GetAsAtom();
     }
     mutation.mAttrChange = aModType;
 
     mozAutoSubtreeModified subtree(OwnerDoc(), this);
     (new AsyncEventDispatcher(this, mutation))->RunDOMEventWhenSafe();
@@ -2679,17 +2679,17 @@ Element::UnsetAttr(int32_t aNameSpaceID,
     InternalMutationEvent mutation(true, eLegacyAttrModified);
 
     mutation.mRelatedNode = attrNode;
     mutation.mAttrName = aName;
 
     nsAutoString value;
     oldValue.ToString(value);
     if (!value.IsEmpty())
-      mutation.mPrevAttrValue = do_GetAtom(value);
+      mutation.mPrevAttrValue = NS_Atomize(value);
     mutation.mAttrChange = nsIDOMMutationEvent::REMOVAL;
 
     mozAutoSubtreeModified subtree(OwnerDoc(), this);
     (new AsyncEventDispatcher(this, mutation))->RunDOMEventWhenSafe();
   }
 
   return NS_OK;
 }
--- a/dom/base/FragmentOrElement.cpp
+++ b/dom/base/FragmentOrElement.cpp
@@ -275,17 +275,17 @@ nsIContent::LookupNamespaceURIInternal(c
   if (aNamespacePrefix.EqualsLiteral("xmlns")) {
     // Special-case for xmlns prefix
     aNamespaceURI.AssignLiteral("http://www.w3.org/2000/xmlns/");
     return NS_OK;
   }
 
   nsCOMPtr<nsIAtom> name;
   if (!aNamespacePrefix.IsEmpty()) {
-    name = do_GetAtom(aNamespacePrefix);
+    name = NS_Atomize(aNamespacePrefix);
     NS_ENSURE_TRUE(name, NS_ERROR_OUT_OF_MEMORY);
   }
   else {
     name = nsGkAtoms::xmlns;
   }
   // Trace up the content parent chain looking for the namespace
   // declaration that declares aNamespacePrefix.
   const nsIContent* content = this;
--- a/dom/base/nsAttrValue.cpp
+++ b/dom/base/nsAttrValue.cpp
@@ -730,29 +730,29 @@ nsAttrValue::ToString(nsAString& aResult
   }
 }
 
 already_AddRefed<nsIAtom>
 nsAttrValue::GetAsAtom() const
 {
   switch (Type()) {
     case eString:
-      return do_GetAtom(GetStringValue());
+      return NS_Atomize(GetStringValue());
 
     case eAtom:
       {
         nsCOMPtr<nsIAtom> atom = GetAtomValue();
         return atom.forget();
       }
 
     default:
       {
         nsAutoString val;
         ToString(val);
-        return do_GetAtom(val);
+        return NS_Atomize(val);
       }
   }
 }
 
 const nsCheapString
 nsAttrValue::GetStringValue() const
 {
   NS_PRECONDITION(Type() == eString, "wrong type");
@@ -1223,17 +1223,17 @@ nsAttrValue::Contains(const nsAString& a
   return false;
 }
 
 void
 nsAttrValue::ParseAtom(const nsAString& aValue)
 {
   ResetIfSet();
 
-  nsCOMPtr<nsIAtom> atom = NS_NewAtom(aValue);
+  nsCOMPtr<nsIAtom> atom = NS_Atomize(aValue);
   if (atom) {
     SetPtrValueAndType(atom.forget().take(), eAtomBase);
   }
 }
 
 void
 nsAttrValue::ParseAtomArray(const nsAString& aValue)
 {
@@ -1255,17 +1255,17 @@ nsAttrValue::ParseAtomArray(const nsAStr
 
   nsAString::const_iterator start(iter);
 
   // get first - and often only - atom
   do {
     ++iter;
   } while (iter != end && !nsContentUtils::IsHTMLWhitespace(*iter));
 
-  nsCOMPtr<nsIAtom> classAtom = do_GetAtom(Substring(start, iter));
+  nsCOMPtr<nsIAtom> classAtom = NS_Atomize(Substring(start, iter));
   if (!classAtom) {
     Reset();
     return;
   }
 
   // skip whitespace
   while (iter != end && nsContentUtils::IsHTMLWhitespace(*iter)) {
     hasSpace = true;
@@ -1296,17 +1296,17 @@ nsAttrValue::ParseAtomArray(const nsAStr
   // parse the rest of the classnames
   while (iter != end) {
     start = iter;
 
     do {
       ++iter;
     } while (iter != end && !nsContentUtils::IsHTMLWhitespace(*iter));
 
-    classAtom = do_GetAtom(Substring(start, iter));
+    classAtom = NS_Atomize(Substring(start, iter));
 
     if (!array->AppendElement(classAtom)) {
       Reset();
       return;
     }
 
     // skip whitespace
     while (iter != end && nsContentUtils::IsHTMLWhitespace(*iter)) {
@@ -1713,17 +1713,17 @@ nsAttrValue::SetMiscAtomOrString(const n
     // * We're allowing enumerated values because sometimes the empty
     //   string corresponds to a particular enumerated value, especially
     //   for enumerated values that are not limited enumerated.
     // Add other types as needed.
     NS_ASSERTION(len || Type() == eCSSDeclaration || Type() == eEnum,
                  "Empty string?");
     MiscContainer* cont = GetMiscContainer();
     if (len <= NS_ATTRVALUE_MAX_STRINGLENGTH_ATOM) {
-      nsCOMPtr<nsIAtom> atom = NS_NewAtom(*aValue);
+      nsCOMPtr<nsIAtom> atom = NS_Atomize(*aValue);
       if (atom) {
         cont->mStringBits =
           reinterpret_cast<uintptr_t>(atom.forget().take()) | eAtomBase;
       }
     } else {
       nsStringBuffer* buf = GetStringBuffer(*aValue).take();
       if (buf) {
         cont->mStringBits = reinterpret_cast<uintptr_t>(buf) | eStringBase;
--- a/dom/base/nsContentList.cpp
+++ b/dom/base/nsContentList.cpp
@@ -223,22 +223,22 @@ NS_GetContentList(nsINode* aRootNode,
   auto entry = static_cast<ContentListHashEntry*>
                           (gContentListHashTable->Add(&hashKey, fallible));
   if (entry)
     list = entry->mContentList;
 
   if (!list) {
     // We need to create a ContentList and add it to our new entry, if
     // we have an entry
-    nsCOMPtr<nsIAtom> xmlAtom = do_GetAtom(aTagname);
+    nsCOMPtr<nsIAtom> xmlAtom = NS_Atomize(aTagname);
     nsCOMPtr<nsIAtom> htmlAtom;
     if (aMatchNameSpaceId == kNameSpaceID_Unknown) {
       nsAutoString lowercaseName;
       nsContentUtils::ASCIIToLower(aTagname, lowercaseName);
-      htmlAtom = do_GetAtom(lowercaseName);
+      htmlAtom = NS_Atomize(lowercaseName);
     } else {
       htmlAtom = xmlAtom;
     }
     list = new nsContentList(aRootNode, aMatchNameSpaceId, htmlAtom, xmlAtom);
     if (entry) {
       entry->mContentList = list;
     }
   }
@@ -512,17 +512,17 @@ nsContentList::NamedItem(const nsAString
     return nullptr;
   }
 
   BringSelfUpToDate(aDoFlush);
 
   uint32_t i, count = mElements.Length();
 
   // Typically IDs and names are atomized
-  nsCOMPtr<nsIAtom> name = do_GetAtom(aName);
+  nsCOMPtr<nsIAtom> name = NS_Atomize(aName);
   NS_ENSURE_TRUE(name, nullptr);
 
   for (i = 0; i < count; i++) {
     nsIContent *content = mElements[i];
     // XXX Should this pass eIgnoreCase?
     if (content &&
         ((content->IsHTMLElement() &&
           content->AttrValueIs(kNameSpaceID_None, nsGkAtoms::name,
--- a/dom/base/nsContentSink.cpp
+++ b/dom/base/nsContentSink.cpp
@@ -801,17 +801,17 @@ nsContentSink::ProcessMETATag(nsIContent
     if (nsGkAtoms::refresh->Equals(header) &&
         (mDocument->GetSandboxFlags() & SANDBOXED_AUTOMATIC_FEATURES)) {
       return NS_OK;
     }
 
     nsAutoString result;
     aContent->GetAttr(kNameSpaceID_None, nsGkAtoms::content, result);
     if (!result.IsEmpty()) {
-      nsCOMPtr<nsIAtom> fieldAtom(do_GetAtom(header));
+      nsCOMPtr<nsIAtom> fieldAtom(NS_Atomize(header));
       rv = ProcessHeaderData(fieldAtom, result, aContent); 
     }
   }
   NS_ENSURE_SUCCESS(rv, rv);
 
   if (aContent->AttrValueIs(kNameSpaceID_None, nsGkAtoms::name,
                             nsGkAtoms::handheldFriendly, eIgnoreCase)) {
     nsAutoString result;
--- a/dom/base/nsContentUtils.cpp
+++ b/dom/base/nsContentUtils.cpp
@@ -2854,21 +2854,21 @@ nsContentUtils::SplitQName(const nsICont
                                                                   colon),
                                                         nameSpace);
     NS_ENSURE_SUCCESS(rv, rv);
 
     *aNamespace = NameSpaceManager()->GetNameSpaceID(nameSpace);
     if (*aNamespace == kNameSpaceID_Unknown)
       return NS_ERROR_FAILURE;
 
-    *aLocalName = NS_NewAtom(Substring(colon + 1, end)).take();
+    *aLocalName = NS_Atomize(Substring(colon + 1, end)).take();
   }
   else {
     *aNamespace = kNameSpaceID_None;
-    *aLocalName = NS_NewAtom(aQName).take();
+    *aLocalName = NS_Atomize(aQName).take();
   }
   NS_ENSURE_TRUE(aLocalName, NS_ERROR_OUT_OF_MEMORY);
   return NS_OK;
 }
 
 // static
 nsresult
 nsContentUtils::GetNodeInfoFromQName(const nsAString& aNamespaceURI,
@@ -2883,17 +2883,17 @@ nsContentUtils::GetNodeInfoFromQName(con
   NS_ENSURE_SUCCESS(rv, rv);
 
   int32_t nsID;
   sNameSpaceManager->RegisterNameSpace(aNamespaceURI, nsID);
   if (colon) {
     const char16_t* end;
     qName.EndReading(end);
 
-    nsCOMPtr<nsIAtom> prefix = do_GetAtom(Substring(qName.get(), colon));
+    nsCOMPtr<nsIAtom> prefix = NS_Atomize(Substring(qName.get(), colon));
 
     rv = aNodeInfoManager->GetNodeInfo(Substring(colon + 1, end), prefix,
                                        nsID, aNodeType, aNodeInfo);
   }
   else {
     rv = aNodeInfoManager->GetNodeInfo(aQualifiedName, nullptr, nsID,
                                        aNodeType, aNodeInfo);
   }
@@ -2943,30 +2943,30 @@ nsContentUtils::SplitExpatName(const cha
     }
     else {
       *aNameSpaceID = kNameSpaceID_Unknown;
     }
 
     nameStart = (uriEnd + 1);
     if (nameEnd)  {
       const char16_t *prefixStart = nameEnd + 1;
-      *aPrefix = NS_NewAtom(Substring(prefixStart, pos)).take();
+      *aPrefix = NS_Atomize(Substring(prefixStart, pos)).take();
     }
     else {
       nameEnd = pos;
       *aPrefix = nullptr;
     }
   }
   else {
     *aNameSpaceID = kNameSpaceID_None;
     nameStart = aExpatName;
     nameEnd = pos;
     *aPrefix = nullptr;
   }
-  *aLocalName = NS_NewAtom(Substring(nameStart, nameEnd)).take();
+  *aLocalName = NS_Atomize(Substring(nameStart, nameEnd)).take();
 }
 
 // static
 nsPresContext*
 nsContentUtils::GetContextForContent(const nsIContent* aContent)
 {
   nsIDocument* doc = aContent->GetComposedDoc();
   if (doc) {
@@ -3714,17 +3714,17 @@ nsContentUtils::GetEventMessageAndAtom(c
     while (sUserDefinedEvents->Count() > 64) {
       nsIAtom* first = sUserDefinedEvents->ObjectAt(0);
       sStringEventTable->Remove(Substring(nsDependentAtomString(first), 2));
       sUserDefinedEvents->RemoveObjectAt(0);
     }
   }
 
   *aEventMessage = eUnidentifiedEvent;
-  nsCOMPtr<nsIAtom> atom = do_GetAtom(NS_LITERAL_STRING("on") + aName);
+  nsCOMPtr<nsIAtom> atom = NS_Atomize(NS_LITERAL_STRING("on") + aName);
   sUserDefinedEvents->AppendObject(atom);
   mapping.mAtom = atom;
   mapping.mMessage = eUnidentifiedEvent;
   mapping.mType = EventNameType_None;
   mapping.mEventClassID = eBasicEventClass;
   sStringEventTable->Put(aName, mapping);
   return mapping.mAtom;
 }
@@ -3857,17 +3857,17 @@ nsContentUtils::MatchElementId(nsIConten
 
 /* static */
 Element *
 nsContentUtils::MatchElementId(nsIContent *aContent, const nsAString& aId)
 {
   NS_PRECONDITION(!aId.IsEmpty(), "Will match random elements");
   
   // ID attrs are generally stored as atoms, so just atomize this up front
-  nsCOMPtr<nsIAtom> id(do_GetAtom(aId));
+  nsCOMPtr<nsIAtom> id(NS_Atomize(aId));
   if (!id) {
     // OOM, so just bail
     return nullptr;
   }
 
   return MatchElementId(aContent, id);
 }
 
@@ -5130,17 +5130,17 @@ static void ProcessViewportToken(nsIDocu
     nsContentUtils::TrimWhitespace<nsCRT::IsAsciiSpace>(Substring(tail, tip),
                                                         true);
   const nsAString &value =
     nsContentUtils::TrimWhitespace<nsCRT::IsAsciiSpace>(Substring(++tip, end),
                                                         true);
 
   /* Check for known keys. If we find a match, insert the appropriate
    * information into the document header. */
-  nsCOMPtr<nsIAtom> key_atom = do_GetAtom(key);
+  nsCOMPtr<nsIAtom> key_atom = NS_Atomize(key);
   if (key_atom == nsGkAtoms::height)
     aDocument->SetHeaderData(nsGkAtoms::viewport_height, value);
   else if (key_atom == nsGkAtoms::width)
     aDocument->SetHeaderData(nsGkAtoms::viewport_width, value);
   else if (key_atom == nsGkAtoms::initial_scale)
     aDocument->SetHeaderData(nsGkAtoms::viewport_initial_scale, value);
   else if (key_atom == nsGkAtoms::minimum_scale)
     aDocument->SetHeaderData(nsGkAtoms::viewport_minimum_scale, value);
--- a/dom/base/nsDOMMutationObserver.cpp
+++ b/dom/base/nsDOMMutationObserver.cpp
@@ -678,17 +678,17 @@ nsDOMMutationObserver::Observe(nsINode& 
   if (aOptions.mAttributeFilter.WasPassed()) {
     allAttrs = false;
     const mozilla::dom::Sequence<nsString>& filtersAsString =
       aOptions.mAttributeFilter.Value();
     uint32_t len = filtersAsString.Length();
     filters.SetCapacity(len);
 
     for (uint32_t i = 0; i < len; ++i) {
-      nsCOMPtr<nsIAtom> a = do_GetAtom(filtersAsString[i]);
+      nsCOMPtr<nsIAtom> a = NS_Atomize(filtersAsString[i]);
       filters.AppendObject(a);
     }
   }
 
   nsMutationReceiver* r = GetReceiverFor(&aTarget, true, animations);
   r->SetChildList(childList);
   r->SetAttributes(attributes);
   r->SetCharacterData(characterData);
--- a/dom/base/nsDOMWindowUtils.cpp
+++ b/dom/base/nsDOMWindowUtils.cpp
@@ -234,17 +234,17 @@ nsDOMWindowUtils::GetDocCharsetIsForced(
 }
 
 NS_IMETHODIMP
 nsDOMWindowUtils::GetDocumentMetadata(const nsAString& aName,
                                       nsAString& aValue)
 {
   nsIDocument* doc = GetDocument();
   if (doc) {
-    nsCOMPtr<nsIAtom> name = do_GetAtom(aName);
+    nsCOMPtr<nsIAtom> name = NS_Atomize(aName);
     doc->GetHeaderData(name, aValue);
     return NS_OK;
   }
 
   aValue.Truncate();
   return NS_OK;
 }
 
--- a/dom/base/nsDocument.cpp
+++ b/dom/base/nsDocument.cpp
@@ -5507,17 +5507,17 @@ nsDocument::SetupCustomElement(Element* 
                                const nsAString* aTypeExtension)
 {
   if (!mRegistry) {
     return;
   }
 
   nsCOMPtr<nsIAtom> tagAtom = aElement->NodeInfo()->NameAtom();
   nsCOMPtr<nsIAtom> typeAtom = aTypeExtension ?
-    do_GetAtom(*aTypeExtension) : tagAtom;
+    NS_Atomize(*aTypeExtension) : tagAtom;
 
   if (aTypeExtension && !aElement->HasAttr(kNameSpaceID_None, nsGkAtoms::is)) {
     // Custom element setup in the parser happens after the "is"
     // attribute is added.
     aElement->SetAttr(kNameSpaceID_None, nsGkAtoms::is, *aTypeExtension, true);
   }
 
   CustomElementDefinition* data;
@@ -5834,17 +5834,17 @@ nsDocument::CustomElementConstructor(JSC
   // Function name is the type of the custom element.
   JSString* jsFunName =
     JS_GetFunctionId(JS_ValueToFunction(aCx, args.calleev()));
   nsAutoJSString elemName;
   if (!elemName.init(aCx, jsFunName)) {
     return true;
   }
 
-  nsCOMPtr<nsIAtom> typeAtom(do_GetAtom(elemName));
+  nsCOMPtr<nsIAtom> typeAtom(NS_Atomize(elemName));
   CustomElementHashKey key(kNameSpaceID_Unknown, typeAtom);
   CustomElementDefinition* definition;
   if (!document->mRegistry ||
       !document->mRegistry->mCustomDefinitions.Get(&key, &definition)) {
     return true;
   }
 
   nsDependentAtomString localName(definition->mLocalName);
@@ -6128,17 +6128,17 @@ nsDocument::RegisterElement(JSContext* a
   // options.extends.
   nsAutoString lcName;
   if (IsHTMLDocument()) {
     nsContentUtils::ASCIIToLower(aOptions.mExtends, lcName);
   } else {
     lcName.Assign(aOptions.mExtends);
   }
 
-  nsCOMPtr<nsIAtom> typeAtom(do_GetAtom(lcType));
+  nsCOMPtr<nsIAtom> typeAtom(NS_Atomize(lcType));
   if (!nsContentUtils::IsCustomElementName(typeAtom)) {
     rv.Throw(NS_ERROR_DOM_SYNTAX_ERR);
     return;
   }
 
   // If there already exists a definition with the same TYPE, set ERROR to
   // DuplicateDefinition and stop.
   // Note that we need to find existing custom elements from either namespace.
@@ -6249,17 +6249,17 @@ nsDocument::RegisterElement(JSContext* a
         }
       }
     } // Done with the checks, leave prototype's compartment.
 
     // If name was provided and not null...
     if (!lcName.IsEmpty()) {
       // Let BASE be the element interface for NAME and NAMESPACE.
       bool known = false;
-      nameAtom = do_GetAtom(lcName);
+      nameAtom = NS_Atomize(lcName);
       if (namespaceID == kNameSpaceID_XHTML) {
         nsIParserService* ps = nsContentUtils::GetParserService();
         if (!ps) {
           rv.Throw(NS_ERROR_UNEXPECTED);
           return;
         }
 
         known =
@@ -6866,17 +6866,17 @@ nsDocument::GetAnonymousElementByAttribu
   return NS_OK;
 }
 
 Element*
 nsIDocument::GetAnonymousElementByAttribute(Element& aElement,
                                             const nsAString& aAttrName,
                                             const nsAString& aAttrValue)
 {
-  nsCOMPtr<nsIAtom> attribute = do_GetAtom(aAttrName);
+  nsCOMPtr<nsIAtom> attribute = NS_Atomize(aAttrName);
 
   return GetAnonymousElementByAttribute(&aElement, attribute, aAttrValue);
 }
 
 
 NS_IMETHODIMP
 nsDocument::GetAnonymousNodes(nsIDOMElement* aElement,
                               nsIDOMNodeList** aResult)
@@ -8615,17 +8615,17 @@ nsDocument::RetrieveRelevantHeaders(nsIC
     };
 
     nsAutoCString headerVal;
     const char *const *name = headers;
     while (*name) {
       rv =
         httpChannel->GetResponseHeader(nsDependentCString(*name), headerVal);
       if (NS_SUCCEEDED(rv) && !headerVal.IsEmpty()) {
-        nsCOMPtr<nsIAtom> key = do_GetAtom(*name);
+        nsCOMPtr<nsIAtom> key = NS_Atomize(*name);
         SetHeaderData(key, NS_ConvertASCIItoUTF16(headerVal));
       }
       ++name;
     }
   } else {
     nsCOMPtr<nsIFileChannel> fileChannel = do_QueryInterface(aChannel);
     if (fileChannel) {
       nsCOMPtr<nsIFile> file;
--- a/dom/base/nsGenericDOMDataNode.cpp
+++ b/dom/base/nsGenericDOMDataNode.cpp
@@ -390,17 +390,17 @@ nsGenericDOMDataNode::SetTextInternal(ui
 
     if (haveMutationListeners) {
       InternalMutationEvent mutation(true, eLegacyCharacterDataModified);
 
       mutation.mPrevAttrValue = oldValue;
       if (aLength > 0) {
         nsAutoString val;
         mText.AppendTo(val);
-        mutation.mNewAttrValue = do_GetAtom(val);
+        mutation.mNewAttrValue = NS_Atomize(val);
       }
 
       mozAutoSubtreeModified subtree(OwnerDoc(), this);
       (new AsyncEventDispatcher(this, mutation))->RunDOMEventWhenSafe();
     }
   }
 
   return NS_OK;
@@ -1095,17 +1095,17 @@ nsGenericDOMDataNode::AppendTextTo(nsASt
   return mText.AppendTo(aResult, aFallible);
 }
 
 already_AddRefed<nsIAtom>
 nsGenericDOMDataNode::GetCurrentValueAtom()
 {
   nsAutoString val;
   GetData(val);
-  return NS_NewAtom(val);
+  return NS_Atomize(val);
 }
 
 NS_IMETHODIMP
 nsGenericDOMDataNode::WalkContentStyleRules(nsRuleWalker* aRuleWalker)
 {
   return NS_OK;
 }
 
--- a/dom/base/nsINode.cpp
+++ b/dom/base/nsINode.cpp
@@ -775,17 +775,17 @@ SetUserDataProperty(uint16_t aCategory, 
 }
 
 nsresult
 nsINode::SetUserData(const nsAString &aKey, nsIVariant *aData, nsIVariant **aResult)
 {
   OwnerDoc()->WarnOnceAbout(nsIDocument::eGetSetUserData);
   *aResult = nullptr;
 
-  nsCOMPtr<nsIAtom> key = do_GetAtom(aKey);
+  nsCOMPtr<nsIAtom> key = NS_Atomize(aKey);
   if (!key) {
     return NS_ERROR_OUT_OF_MEMORY;
   }
 
   nsresult rv;
   void *data;
   if (aData) {
     rv = SetUserDataProperty(DOM_USER_DATA, this, key, aData, &data);
@@ -828,17 +828,17 @@ nsINode::SetUserData(JSContext* aCx, con
   aError = nsContentUtils::XPConnect()->VariantToJS(aCx, GetWrapper(), oldData,
                                                     aRetval);
 }
 
 nsIVariant*
 nsINode::GetUserData(const nsAString& aKey)
 {
   OwnerDoc()->WarnOnceAbout(nsIDocument::eGetSetUserData);
-  nsCOMPtr<nsIAtom> key = do_GetAtom(aKey);
+  nsCOMPtr<nsIAtom> key = NS_Atomize(aKey);
   if (!key) {
     return nullptr;
   }
 
   return static_cast<nsIVariant*>(GetProperty(DOM_USER_DATA, key));
 }
 
 void
--- a/dom/base/nsNodeInfoManager.cpp
+++ b/dom/base/nsNodeInfoManager.cpp
@@ -260,34 +260,34 @@ nsNodeInfoManager::GetNodeInfo(nsIAtom *
 
 nsresult
 nsNodeInfoManager::GetNodeInfo(const nsAString& aName, nsIAtom *aPrefix,
                                int32_t aNamespaceID, uint16_t aNodeType,
                                NodeInfo** aNodeInfo)
 {
 #ifdef DEBUG
   {
-    nsCOMPtr<nsIAtom> nameAtom = do_GetAtom(aName);
+    nsCOMPtr<nsIAtom> nameAtom = NS_Atomize(aName);
     CheckValidNodeInfo(aNodeType, nameAtom, aNamespaceID, nullptr);
   }
 #endif
 
   NodeInfo::NodeInfoInner tmpKey(aName, aPrefix, aNamespaceID, aNodeType);
 
   void *node = PL_HashTableLookup(mNodeInfoHash, &tmpKey);
 
   if (node) {
     NodeInfo* nodeInfo = static_cast<NodeInfo *>(node);
 
     NS_ADDREF(*aNodeInfo = nodeInfo);
 
     return NS_OK;
   }
 
-  nsCOMPtr<nsIAtom> nameAtom = do_GetAtom(aName);
+  nsCOMPtr<nsIAtom> nameAtom = NS_Atomize(aName);
   NS_ENSURE_TRUE(nameAtom, NS_ERROR_OUT_OF_MEMORY);
 
   RefPtr<NodeInfo> newNodeInfo =
     new NodeInfo(nameAtom, aPrefix, aNamespaceID, aNodeType, nullptr, this);
   NS_ENSURE_TRUE(newNodeInfo, NS_ERROR_OUT_OF_MEMORY);
 
   PLHashEntry *he;
   he = PL_HashTableAdd(mNodeInfoHash, &newNodeInfo->mInner, newNodeInfo);
--- a/dom/base/nsReferencedElement.cpp
+++ b/dom/base/nsReferencedElement.cpp
@@ -104,17 +104,17 @@ nsReferencedElement::Reset(nsIContent* a
       if (observer) {
         load->AddObserver(observer);
       }
       // Keep going so we set up our watching stuff a bit
     }
   }
 
   if (aWatch) {
-    nsCOMPtr<nsIAtom> atom = do_GetAtom(ref);
+    nsCOMPtr<nsIAtom> atom = NS_Atomize(ref);
     if (!atom)
       return;
     atom.swap(mWatchID);
   }
 
   mReferencingImage = aReferenceImage;
 
   HaveNewDocument(doc, aWatch, ref);
@@ -126,17 +126,17 @@ nsReferencedElement::ResetWithID(nsICont
 {
   nsIDocument *doc = aFromContent->OwnerDoc();
   if (!doc)
     return;
 
   // XXX Need to take care of XBL/XBL2
 
   if (aWatch) {
-    nsCOMPtr<nsIAtom> atom = do_GetAtom(aID);
+    nsCOMPtr<nsIAtom> atom = NS_Atomize(aID);
     if (!atom)
       return;
     atom.swap(mWatchID);
   }
 
   mReferencingImage = false;
 
   HaveNewDocument(doc, aWatch, aID);
--- a/dom/events/CommandEvent.cpp
+++ b/dom/events/CommandEvent.cpp
@@ -48,17 +48,17 @@ CommandEvent::GetCommand(nsAString& aCom
 NS_IMETHODIMP
 CommandEvent::InitCommandEvent(const nsAString& aTypeArg,
                                bool aCanBubbleArg,
                                bool aCancelableArg,
                                const nsAString& aCommand)
 {
   Event::InitEvent(aTypeArg, aCanBubbleArg, aCancelableArg);
 
-  mEvent->AsCommandEvent()->command = do_GetAtom(aCommand);
+  mEvent->AsCommandEvent()->command = NS_Atomize(aCommand);
   return NS_OK;
 }
 
 } // namespace dom
 } // namespace mozilla
 
 using namespace mozilla;
 using namespace mozilla::dom;
--- a/dom/events/DataTransfer.cpp
+++ b/dom/events/DataTransfer.cpp
@@ -157,17 +157,17 @@ DataTransfer::~DataTransfer()
 // static
 already_AddRefed<DataTransfer>
 DataTransfer::Constructor(const GlobalObject& aGlobal,
                           const nsAString& aEventType, bool aIsExternal,
                           ErrorResult& aRv)
 {
   nsAutoCString onEventType("on");
   AppendUTF16toUTF8(aEventType, onEventType);
-  nsCOMPtr<nsIAtom> eventTypeAtom = do_GetAtom(onEventType);
+  nsCOMPtr<nsIAtom> eventTypeAtom = NS_Atomize(onEventType);
   if (!eventTypeAtom) {
     aRv.Throw(NS_ERROR_OUT_OF_MEMORY);
     return nullptr;
   }
 
   EventMessage eventMessage = nsContentUtils::GetEventMessage(eventTypeAtom);
   RefPtr<DataTransfer> transfer = new DataTransfer(aGlobal.GetAsSupports(),
                                                      eventMessage, aIsExternal,
--- a/dom/events/EventListenerManager.cpp
+++ b/dom/events/EventListenerManager.cpp
@@ -684,29 +684,29 @@ EventListenerManager::ListenerCanHandle(
 
 void
 EventListenerManager::AddEventListenerByType(
                         const EventListenerHolder& aListenerHolder,
                         const nsAString& aType,
                         const EventListenerFlags& aFlags)
 {
   nsCOMPtr<nsIAtom> atom =
-    mIsMainThreadELM ? do_GetAtom(NS_LITERAL_STRING("on") + aType) : nullptr;
+    mIsMainThreadELM ? NS_Atomize(NS_LITERAL_STRING("on") + aType) : nullptr;
   EventMessage message = nsContentUtils::GetEventMessage(atom);
   AddEventListenerInternal(aListenerHolder, message, atom, aType, aFlags);
 }
 
 void
 EventListenerManager::RemoveEventListenerByType(
                         const EventListenerHolder& aListenerHolder,
                         const nsAString& aType,
                         const EventListenerFlags& aFlags)
 {
   nsCOMPtr<nsIAtom> atom =
-    mIsMainThreadELM ? do_GetAtom(NS_LITERAL_STRING("on") + aType) : nullptr;
+    mIsMainThreadELM ? NS_Atomize(NS_LITERAL_STRING("on") + aType) : nullptr;
   EventMessage message = nsContentUtils::GetEventMessage(atom);
   RemoveEventListenerInternal(aListenerHolder, message, atom, aType, aFlags);
 }
 
 EventListenerManager::Listener*
 EventListenerManager::FindEventHandler(EventMessage aEventMessage,
                                        nsIAtom* aTypeAtom,
                                        const nsAString& aTypeString)
@@ -1408,17 +1408,17 @@ EventListenerManager::MutationListenerBi
   }
   return bits;
 }
 
 bool
 EventListenerManager::HasListenersFor(const nsAString& aEventName)
 {
   if (mIsMainThreadELM) {
-    nsCOMPtr<nsIAtom> atom = do_GetAtom(NS_LITERAL_STRING("on") + aEventName);
+    nsCOMPtr<nsIAtom> atom = NS_Atomize(NS_LITERAL_STRING("on") + aEventName);
     return HasListenersFor(atom);
   }
 
   uint32_t count = mListeners.Length();
   for (uint32_t i = 0; i < count; ++i) {
     Listener* listener = &mListeners.ElementAt(i);
     if (listener->mTypeString == aEventName) {
       return true;
--- a/dom/events/EventTarget.cpp
+++ b/dom/events/EventTarget.cpp
@@ -35,17 +35,17 @@ EventTarget::SetEventHandler(const nsASt
                              EventHandlerNonNull* aHandler,
                              ErrorResult& aRv)
 {
   if (!StringBeginsWith(aType, NS_LITERAL_STRING("on"))) {
     aRv.Throw(NS_ERROR_INVALID_ARG);
     return;
   }
   if (NS_IsMainThread()) {
-    nsCOMPtr<nsIAtom> type = do_GetAtom(aType);
+    nsCOMPtr<nsIAtom> type = NS_Atomize(aType);
     SetEventHandler(type, EmptyString(), aHandler);
     return;
   }
   SetEventHandler(nullptr,
                   Substring(aType, 2), // Remove "on"
                   aHandler);
 }
 
--- a/dom/events/EventTarget.h
+++ b/dom/events/EventTarget.h
@@ -50,17 +50,17 @@ public:
                                    EventListener* aCallback,
                                    bool aCapture,
                                    ErrorResult& aRv);
   bool DispatchEvent(Event& aEvent, ErrorResult& aRv);
 
   // Note, this takes the type in onfoo form!
   EventHandlerNonNull* GetEventHandler(const nsAString& aType)
   {
-    nsCOMPtr<nsIAtom> type = do_GetAtom(aType);
+    nsCOMPtr<nsIAtom> type = NS_Atomize(aType);
     return GetEventHandler(type, EmptyString());
   }
 
   // Note, this takes the type in onfoo form!
   void SetEventHandler(const nsAString& aType, EventHandlerNonNull* aHandler,
                        ErrorResult& rv);
 
   // Note, for an event 'foo' aType will be 'onfoo'.
--- a/dom/events/MutationEvent.cpp
+++ b/dom/events/MutationEvent.cpp
@@ -96,21 +96,21 @@ MutationEvent::InitMutationEvent(const n
                                  const nsAString& aAttrNameArg,
                                  uint16_t aAttrChangeArg)
 {
   Event::InitEvent(aTypeArg, aCanBubbleArg, aCancelableArg);
 
   InternalMutationEvent* mutation = mEvent->AsMutationEvent();
   mutation->mRelatedNode = aRelatedNodeArg;
   if (!aPrevValueArg.IsEmpty())
-    mutation->mPrevAttrValue = do_GetAtom(aPrevValueArg);
+    mutation->mPrevAttrValue = NS_Atomize(aPrevValueArg);
   if (!aNewValueArg.IsEmpty())
-    mutation->mNewAttrValue = do_GetAtom(aNewValueArg);
+    mutation->mNewAttrValue = NS_Atomize(aNewValueArg);
   if (!aAttrNameArg.IsEmpty()) {
-    mutation->mAttrName = do_GetAtom(aAttrNameArg);
+    mutation->mAttrName = NS_Atomize(aAttrNameArg);
   }
   mutation->mAttrChange = aAttrChangeArg;
     
   return NS_OK;
 }
 
 } // namespace dom
 } // namespace mozilla
--- a/dom/html/HTMLAllCollection.cpp
+++ b/dom/html/HTMLAllCollection.cpp
@@ -109,17 +109,17 @@ DocAllResultMatch(nsIContent* aContent, 
 
 nsContentList*
 HTMLAllCollection::GetDocumentAllList(const nsAString& aID)
 {
   if (nsContentList* docAllList = mNamedMap.GetWeak(aID)) {
     return docAllList;
   }
 
-  nsCOMPtr<nsIAtom> id = do_GetAtom(aID);
+  nsCOMPtr<nsIAtom> id = NS_Atomize(aID);
   RefPtr<nsContentList> docAllList =
     new nsContentList(mDocument, DocAllResultMatch, nullptr, nullptr, true, id);
   mNamedMap.Put(aID, docAllList);
   return docAllList;
 }
 
 void
 HTMLAllCollection::NamedGetter(const nsAString& aID,
--- a/dom/html/nsDOMStringMap.cpp
+++ b/dom/html/nsDOMStringMap.cpp
@@ -107,17 +107,17 @@ nsDOMStringMap::NamedSetter(const nsAStr
   }
 
   nsresult res = nsContentUtils::CheckQName(attr, false);
   if (NS_FAILED(res)) {
     rv.Throw(res);
     return;
   }
 
-  nsCOMPtr<nsIAtom> attrAtom = do_GetAtom(attr);
+  nsCOMPtr<nsIAtom> attrAtom = NS_Atomize(attr);
   MOZ_ASSERT(attrAtom, "Should be infallible");
 
   res = mElement->SetAttr(kNameSpaceID_None, attrAtom, aValue, true);
   if (NS_FAILED(res)) {
     rv.Throw(res);
   }
 }
 
@@ -131,17 +131,17 @@ nsDOMStringMap::NamedDeleter(const nsASt
   }
   
   nsAutoString attr;
   if (!DataPropToAttr(aProp, attr)) {
     found = false;
     return;
   }
 
-  nsCOMPtr<nsIAtom> attrAtom = do_GetAtom(attr);
+  nsCOMPtr<nsIAtom> attrAtom = NS_Atomize(attr);
   MOZ_ASSERT(attrAtom, "Should be infallible");
 
   found = mElement->HasAttr(kNameSpaceID_None, attrAtom);
 
   if (found) {
     mRemovingProp = true;
     mElement->UnsetAttr(kNameSpaceID_None, attrAtom, true);
     mRemovingProp = false;
--- a/dom/html/nsGenericHTMLElement.cpp
+++ b/dom/html/nsGenericHTMLElement.cpp
@@ -2421,17 +2421,17 @@ nsGenericHTMLFormElement::AddFormIdObser
   NS_ASSERTION(GetUncomposedDoc(), "When adding a form id observer, "
                                    "we should be in a document!");
 
   nsAutoString formId;
   nsIDocument* doc = OwnerDoc();
   GetAttr(kNameSpaceID_None, nsGkAtoms::form, formId);
   NS_ASSERTION(!formId.IsEmpty(),
                "@form value should not be the empty string!");
-  nsCOMPtr<nsIAtom> atom = do_GetAtom(formId);
+  nsCOMPtr<nsIAtom> atom = NS_Atomize(formId);
 
   return doc->AddIDTargetObserver(atom, FormIdUpdated, this, false);
 }
 
 void
 nsGenericHTMLFormElement::RemoveFormIdObserver()
 {
   /**
@@ -2450,17 +2450,17 @@ nsGenericHTMLFormElement::RemoveFormIdOb
   if (!doc) {
     return;
   }
 
   nsAutoString formId;
   GetAttr(kNameSpaceID_None, nsGkAtoms::form, formId);
   NS_ASSERTION(!formId.IsEmpty(),
                "@form value should not be the empty string!");
-  nsCOMPtr<nsIAtom> atom = do_GetAtom(formId);
+  nsCOMPtr<nsIAtom> atom = NS_Atomize(formId);
 
   doc->RemoveIDTargetObserver(atom, FormIdUpdated, this, false);
 }
 
 
 /* static */
 bool
 nsGenericHTMLFormElement::FormIdUpdated(Element* aOldElement,
--- a/dom/html/nsHTMLDocument.cpp
+++ b/dom/html/nsHTMLDocument.cpp
@@ -2026,17 +2026,17 @@ static void* CreateTokens(nsINode* aRoot
   // parse the tokens
   while (iter != end) {
     nsAString::const_iterator start(iter);
 
     do {
       ++iter;
     } while (iter != end && !nsContentUtils::IsHTMLWhitespace(*iter));
 
-    tokens->AppendElement(do_GetAtom(Substring(start, iter)));
+    tokens->AppendElement(NS_Atomize(Substring(start, iter)));
 
     // skip whitespace
     while (iter != end && nsContentUtils::IsHTMLWhitespace(*iter)) {
       ++iter;
     }
   }
   return tokens;
 }
--- a/dom/smil/nsSMILMappedAttribute.cpp
+++ b/dom/smil/nsSMILMappedAttribute.cpp
@@ -141,10 +141,10 @@ nsSMILMappedAttribute::FlushChangesToTar
       shell->RestyleForAnimation(mElement, eRestyle_Self);
     }
   }
 }
 
 already_AddRefed<nsIAtom>
 nsSMILMappedAttribute::GetAttrNameAtom() const
 {
-  return do_GetAtom(nsCSSProps::GetStringValue(mPropID));
+  return NS_Atomize(nsCSSProps::GetStringValue(mPropID));
 }
--- a/dom/smil/nsSMILParserUtils.cpp
+++ b/dom/smil/nsSMILParserUtils.cpp
@@ -346,17 +346,17 @@ MoveToNextToken(RangedPtr<const char16_t
 }
 
 already_AddRefed<nsIAtom>
 ConvertUnescapedTokenToAtom(const nsAString& aToken)
 {
   // Whether the token is an id-ref or event-symbol it should be a valid NCName
   if (aToken.IsEmpty() || NS_FAILED(nsContentUtils::CheckQName(aToken, false)))
     return nullptr;
-  return do_GetAtom(aToken);
+  return NS_Atomize(aToken);
 }
     
 already_AddRefed<nsIAtom>
 ConvertTokenToAtom(const nsAString& aToken,
                    bool aUnescapeToken)
 {
   // Unescaping involves making a copy of the string which we'd like to avoid if possible
   if (!aUnescapeToken) {
--- a/dom/svg/nsSVGElement.cpp
+++ b/dom/svg/nsSVGElement.cpp
@@ -522,17 +522,17 @@ nsSVGElement::ParseAttribute(int32_t aNa
       }
     }
 
     if (!foundMatch) {
       // Check for nsSVGEnum attribute
       EnumAttributesInfo enumInfo = GetEnumInfo();
       for (i = 0; i < enumInfo.mEnumCount; i++) {
         if (aAttribute == *enumInfo.mEnumInfo[i].mName) {
-          nsCOMPtr<nsIAtom> valAtom = do_GetAtom(aValue);
+          nsCOMPtr<nsIAtom> valAtom = NS_Atomize(aValue);
           rv = enumInfo.mEnums[i].SetBaseValueAtom(valAtom, this);
           if (NS_FAILED(rv)) {
             enumInfo.Reset(i);
           } else {
             aResult.SetTo(valAtom);
             didSetResult = true;
           }
           foundMatch = true;
--- a/dom/xbl/XBLChildrenElement.cpp
+++ b/dom/xbl/XBLChildrenElement.cpp
@@ -45,17 +45,17 @@ XBLChildrenElement::ParseAttribute(int32
                                    nsAttrValue& aResult)
 {
   if (aAttribute == nsGkAtoms::includes &&
       aNamespaceID == kNameSpaceID_None) {
     mIncludes.Clear();
     nsCharSeparatedTokenizer tok(aValue, '|',
                                  nsCharSeparatedTokenizer::SEPARATOR_OPTIONAL);
     while (tok.hasMoreTokens()) {
-      mIncludes.AppendElement(do_GetAtom(tok.nextToken()));
+      mIncludes.AppendElement(NS_Atomize(tok.nextToken()));
     }
   }
 
   return false;
 }
 
 } // namespace dom
 } // namespace mozilla
--- a/dom/xbl/nsXBLPrototypeBinding.cpp
+++ b/dom/xbl/nsXBLPrototypeBinding.cpp
@@ -847,17 +847,17 @@ nsXBLPrototypeBinding::Read(nsIObjectInp
 
   rv = ReadNamespace(aStream, mBaseNameSpaceID);
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsAutoString baseTag;
   rv = aStream->ReadString(baseTag);
   NS_ENSURE_SUCCESS(rv, rv);
   if (!baseTag.IsEmpty()) {
-    mBaseTag = do_GetAtom(baseTag);
+    mBaseTag = NS_Atomize(baseTag);
   }
 
   mBinding = aDocument->CreateElem(NS_LITERAL_STRING("binding"), nullptr,
                                    kNameSpaceID_XBL);
 
   nsCOMPtr<nsIContent> child;
   rv = ReadContentNode(aStream, aDocument, aDocument->NodeInfoManager(), getter_AddRefs(child));
   NS_ENSURE_SUCCESS(rv, rv);
@@ -964,18 +964,18 @@ nsXBLPrototypeBinding::Read(nsIObjectInp
       NS_ENSURE_SUCCESS(rv, rv);
 
       rv = aStream->ReadString(attrName);
       NS_ENSURE_SUCCESS(rv, rv);
 
       rv = aStream->ReadString(attrValue);
       NS_ENSURE_SUCCESS(rv, rv);
 
-      nsCOMPtr<nsIAtom> atomPrefix = do_GetAtom(attrPrefix);
-      nsCOMPtr<nsIAtom> atomName = do_GetAtom(attrName);
+      nsCOMPtr<nsIAtom> atomPrefix = NS_Atomize(attrPrefix);
+      nsCOMPtr<nsIAtom> atomName = NS_Atomize(attrName);
       mBinding->SetAttr(attrNamespace, atomName, atomPrefix, attrValue, false);
     }
   }
 
   // Finally, read in the resources.
   while (true) {
     XBLBindingSerializeDetails type;
     rv = aStream->Read8(&type);
@@ -1211,22 +1211,22 @@ nsXBLPrototypeBinding::ReadContentNode(n
 
   // Otherwise, it's an element, so read its tag, attributes and children.
   nsAutoString prefix, tag;
   rv = aStream->ReadString(prefix);
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsCOMPtr<nsIAtom> prefixAtom;
   if (!prefix.IsEmpty())
-    prefixAtom = do_GetAtom(prefix);
+    prefixAtom = NS_Atomize(prefix);
 
   rv = aStream->ReadString(tag);
   NS_ENSURE_SUCCESS(rv, rv);
 
-  nsCOMPtr<nsIAtom> tagAtom = do_GetAtom(tag);
+  nsCOMPtr<nsIAtom> tagAtom = NS_Atomize(tag);
   RefPtr<NodeInfo> nodeInfo =
     aNim->GetNodeInfo(tagAtom, prefixAtom, namespaceID, nsIDOMNode::ELEMENT_NODE);
 
   uint32_t attrCount;
   rv = aStream->Read32(&attrCount);
   NS_ENSURE_SUCCESS(rv, rv);
 
   // Create XUL prototype elements, or regular elements for other namespaces.
@@ -1254,24 +1254,24 @@ nsXBLPrototypeBinding::ReadContentNode(n
       nsAutoString prefix, name, val;
       rv = aStream->ReadString(prefix);
       NS_ENSURE_SUCCESS(rv, rv);
       rv = aStream->ReadString(name);
       NS_ENSURE_SUCCESS(rv, rv);
       rv = aStream->ReadString(val);
       NS_ENSURE_SUCCESS(rv, rv);
 
-      nsCOMPtr<nsIAtom> nameAtom = do_GetAtom(name);
+      nsCOMPtr<nsIAtom> nameAtom = NS_Atomize(name);
       if (namespaceID == kNameSpaceID_None) {
         attrs[i].mName.SetTo(nameAtom);
       }
       else {
         nsCOMPtr<nsIAtom> prefixAtom;
         if (!prefix.IsEmpty())
-          prefixAtom = do_GetAtom(prefix);
+          prefixAtom = NS_Atomize(prefix);
 
         RefPtr<NodeInfo> ni =
           aNim->GetNodeInfo(nameAtom, prefixAtom,
                             namespaceID, nsIDOMNode::ATTRIBUTE_NODE);
         attrs[i].mName.SetTo(ni);
       }
 
       rv = prototype->SetAttrAt(i, val, documentURI);
@@ -1299,19 +1299,19 @@ nsXBLPrototypeBinding::ReadContentNode(n
       NS_ENSURE_SUCCESS(rv, rv);
       rv = aStream->ReadString(name);
       NS_ENSURE_SUCCESS(rv, rv);
       rv = aStream->ReadString(val);
       NS_ENSURE_SUCCESS(rv, rv);
 
       nsCOMPtr<nsIAtom> prefixAtom;
       if (!prefix.IsEmpty())
-        prefixAtom = do_GetAtom(prefix);
+        prefixAtom = NS_Atomize(prefix);
 
-      nsCOMPtr<nsIAtom> nameAtom = do_GetAtom(name);
+      nsCOMPtr<nsIAtom> nameAtom = NS_Atomize(name);
       content->SetAttr(namespaceID, nameAtom, prefixAtom, val, false);
     }
 
 #ifdef MOZ_XUL
   }
 #endif
 
   // Now read the attribute forwarding entries (xbl:inherits)
@@ -1324,18 +1324,18 @@ nsXBLPrototypeBinding::ReadContentNode(n
     nsAutoString srcAttribute, destAttribute;
     rv = aStream->ReadString(srcAttribute);
     NS_ENSURE_SUCCESS(rv, rv);
     rv = ReadNamespace(aStream, destNamespaceID);
     NS_ENSURE_SUCCESS(rv, rv);
     rv = aStream->ReadString(destAttribute);
     NS_ENSURE_SUCCESS(rv, rv);
 
-    nsCOMPtr<nsIAtom> srcAtom = do_GetAtom(srcAttribute);
-    nsCOMPtr<nsIAtom> destAtom = do_GetAtom(destAttribute);
+    nsCOMPtr<nsIAtom> srcAtom = NS_Atomize(srcAttribute);
+    nsCOMPtr<nsIAtom> destAtom = NS_Atomize(destAttribute);
 
     EnsureAttributeTable();
     AddToAttributeTable(srcNamespaceID, srcAtom, destNamespaceID, destAtom, content);
 
     rv = ReadNamespace(aStream, srcNamespaceID);
     NS_ENSURE_SUCCESS(rv, rv);
   }
 
@@ -1593,17 +1593,17 @@ nsXBLPrototypeBinding::ResolveBaseBindin
   nsAutoString nameSpace;
 
   if (!prefix.IsEmpty()) {
     mBinding->LookupNamespaceURI(prefix, nameSpace);
     if (!nameSpace.IsEmpty()) {
       int32_t nameSpaceID =
         nsContentUtils::NameSpaceManager()->GetNameSpaceID(nameSpace);
 
-      nsCOMPtr<nsIAtom> tagName = do_GetAtom(display);
+      nsCOMPtr<nsIAtom> tagName = NS_Atomize(display);
       // Check the white list
       if (!CheckTagNameWhiteList(nameSpaceID, tagName)) {
         const char16_t* params[] = { display.get() };
         nsContentUtils::ReportToConsole(nsIScriptError::errorFlag,
                                         NS_LITERAL_CSTRING("XBL"), nullptr,
                                         nsContentUtils::eXBL_PROPERTIES,
                                        "InvalidExtendsBinding",
                                         params, ArrayLength(params),
--- a/dom/xbl/nsXBLPrototypeHandler.cpp
+++ b/dom/xbl/nsXBLPrototypeHandler.cpp
@@ -222,17 +222,17 @@ nsXBLPrototypeHandler::ExecuteHandler(Ev
   // event at the element.  It will take care of retargeting it to its
   // command element, if applicable, and executing the event handler.
   if (isXULKey) {
     return DispatchXULKeyCommand(aEvent);
   }
 
   // Look for a compiled handler on the element. 
   // Should be compiled and bound with "on" in front of the name.
-  nsCOMPtr<nsIAtom> onEventAtom = do_GetAtom(NS_LITERAL_STRING("onxbl") +
+  nsCOMPtr<nsIAtom> onEventAtom = NS_Atomize(NS_LITERAL_STRING("onxbl") +
                                              nsDependentAtomString(mEventName));
 
   // Compile the handler and bind it to the element.
   nsCOMPtr<nsIScriptGlobalObject> boundGlobal;
   nsCOMPtr<nsPIWindowRoot> winRoot = do_QueryInterface(aTarget);
   if (winRoot) {
     if (nsCOMPtr<nsPIDOMWindowOuter> window = winRoot->GetWindow()) {
       nsPIDOMWindowInner* innerWindow = window->GetCurrentInnerWindow();
@@ -761,17 +761,17 @@ nsXBLPrototypeHandler::ConstructPrototyp
   nsAutoString event(aEvent);
   if (event.IsEmpty()) {
     if (mType & NS_HANDLER_TYPE_XUL)
       GetEventType(event);
     if (event.IsEmpty())
       return;
   }
 
-  mEventName = do_GetAtom(event);
+  mEventName = NS_Atomize(event);
 
   if (aPhase) {
     const nsDependentString phase(aPhase);
     if (phase.EqualsLiteral("capturing"))
       mPhase = NS_PHASE_CAPTURING;
     else if (phase.EqualsLiteral("target"))
       mPhase = NS_PHASE_TARGET;
   }
@@ -955,17 +955,17 @@ nsXBLPrototypeHandler::Read(nsIObjectInp
   uint32_t detail; 
   rv = aStream->Read32(&detail);
   NS_ENSURE_SUCCESS(rv, rv);
   mDetail = detail;
 
   nsAutoString name;
   rv = aStream->ReadString(name);
   NS_ENSURE_SUCCESS(rv, rv);
-  mEventName = do_GetAtom(name);
+  mEventName = NS_Atomize(name);
 
   rv = aStream->Read32(&mLineNumber);
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsAutoString handlerText;
   rv = aStream->ReadString(handlerText);
   NS_ENSURE_SUCCESS(rv, rv);
   if (!handlerText.IsEmpty())
--- a/dom/xbl/nsXBLWindowKeyHandler.cpp
+++ b/dom/xbl/nsXBLWindowKeyHandler.cpp
@@ -388,17 +388,17 @@ nsXBLWindowKeyHandler::HandleEvent(nsIDO
     } else {
       HandleEventOnCaptureInDefaultEventGroup(keyEvent);
     }
     return NS_OK;
   }
 
   nsAutoString eventType;
   aEvent->GetType(eventType);
-  nsCOMPtr<nsIAtom> eventTypeAtom = do_GetAtom(eventType);
+  nsCOMPtr<nsIAtom> eventTypeAtom = NS_Atomize(eventType);
   NS_ENSURE_TRUE(eventTypeAtom, NS_ERROR_OUT_OF_MEMORY);
 
   return WalkHandlers(keyEvent, eventTypeAtom);
 }
 
 void
 nsXBLWindowKeyHandler::HandleEventOnCaptureInDefaultEventGroup(
                          nsIDOMKeyEvent* aEvent)
@@ -690,17 +690,17 @@ nsXBLWindowKeyHandler::HasHandlerForEven
   bool isDisabled;
   nsCOMPtr<Element> el = GetElement(&isDisabled);
   if (el && isDisabled) {
     return false;
   }
 
   nsAutoString eventType;
   aEvent->AsEvent()->GetType(eventType);
-  nsCOMPtr<nsIAtom> eventTypeAtom = do_GetAtom(eventType);
+  nsCOMPtr<nsIAtom> eventTypeAtom = NS_Atomize(eventType);
   NS_ENSURE_TRUE(eventTypeAtom, false);
 
   return WalkHandlersInternal(aEvent, eventTypeAtom, mHandler, false,
                               aOutReservedForChrome);
 }
 
 already_AddRefed<Element>
 nsXBLWindowKeyHandler::GetElement(bool* aIsDisabled)
--- a/dom/xml/ProcessingInstruction.cpp
+++ b/dom/xml/ProcessingInstruction.cpp
@@ -17,17 +17,17 @@ NS_NewXMLProcessingInstruction(nsNodeInf
                                const nsAString& aTarget,
                                const nsAString& aData)
 {
   using mozilla::dom::ProcessingInstruction;
   using mozilla::dom::XMLStylesheetProcessingInstruction;
 
   NS_PRECONDITION(aNodeInfoManager, "Missing nodeinfo manager");
 
-  nsCOMPtr<nsIAtom> target = do_GetAtom(aTarget);
+  nsCOMPtr<nsIAtom> target = NS_Atomize(aTarget);
   MOZ_ASSERT(target);
 
   if (target == nsGkAtoms::xml_stylesheet) {
     RefPtr<XMLStylesheetProcessingInstruction> pi =
       new XMLStylesheetProcessingInstruction(aNodeInfoManager, aData);
     return pi.forget();
   }
 
--- a/dom/xml/nsXMLContentSink.cpp
+++ b/dom/xml/nsXMLContentSink.cpp
@@ -1129,17 +1129,17 @@ nsXMLContentSink::HandleDoctypeDecl(cons
                                     nsISupports* aCatalogData)
 {
   FlushText();
 
   nsresult rv = NS_OK;
 
   NS_ASSERTION(mDocument, "Shouldn't get here from a document fragment");
 
-  nsCOMPtr<nsIAtom> name = do_GetAtom(aName);
+  nsCOMPtr<nsIAtom> name = NS_Atomize(aName);
   NS_ENSURE_TRUE(name, NS_ERROR_OUT_OF_MEMORY);
 
   // Create a new doctype node
   nsCOMPtr<nsIDOMDocumentType> docType;
   rv = NS_NewDOMDocumentType(getter_AddRefs(docType), mNodeInfoManager,
                              name, aPublicId, aSystemId, aSubset);
   if (NS_FAILED(rv) || !docType) {
     return rv;
--- a/dom/xslt/base/txExpandedName.cpp
+++ b/dom/xslt/base/txExpandedName.cpp
@@ -17,25 +17,25 @@ txExpandedName::init(const nsAString& aQ
     const nsAFlatString& qName = PromiseFlatString(aQName);
     const char16_t* colon;
     bool valid = XMLUtils::isValidQName(qName, &colon);
     if (!valid) {
         return NS_ERROR_FAILURE;
     }
 
     if (colon) {
-        nsCOMPtr<nsIAtom> prefix = do_GetAtom(Substring(qName.get(), colon));
+        nsCOMPtr<nsIAtom> prefix = NS_Atomize(Substring(qName.get(), colon));
         int32_t namespaceID = aResolver->lookupNamespace(prefix);
         if (namespaceID == kNameSpaceID_Unknown)
             return NS_ERROR_FAILURE;
         mNamespaceID = namespaceID;
 
         const char16_t *end;
         qName.EndReading(end);
-        mLocalName = do_GetAtom(Substring(colon + 1, end));
+        mLocalName = NS_Atomize(Substring(colon + 1, end));
     }
     else {
         mNamespaceID = aUseDefault ? aResolver->lookupNamespace(nullptr) :
                                      kNameSpaceID_None;
-        mLocalName = do_GetAtom(aQName);
+        mLocalName = NS_Atomize(aQName);
     }
     return NS_OK;
 }
--- a/dom/xslt/base/txNamespaceMap.cpp
+++ b/dom/xslt/base/txNamespaceMap.cpp
@@ -84,15 +84,15 @@ txNamespaceMap::lookupNamespace(nsIAtom*
     }
 
     return kNameSpaceID_Unknown;
 }
 
 int32_t
 txNamespaceMap::lookupNamespaceWithDefault(const nsAString& aPrefix)
 {
-    nsCOMPtr<nsIAtom> prefix = do_GetAtom(aPrefix);
+    nsCOMPtr<nsIAtom> prefix = NS_Atomize(aPrefix);
     if (prefix != nsGkAtoms::_poundDefault) {
         return lookupNamespace(prefix);
     }
 
     return lookupNamespace(nullptr);
 }
--- a/dom/xslt/base/txStringUtils.h
+++ b/dom/xslt/base/txStringUtils.h
@@ -23,12 +23,12 @@ TX_StringEqualsAtom(const nsASingleFragm
 }
 
 inline already_AddRefed<nsIAtom>
 TX_ToLowerCaseAtom(nsIAtom* aAtom)
 {
   nsAutoString str;
   aAtom->ToString(str);
   nsContentUtils::ASCIIToLower(str);
-  return do_GetAtom(str);
+  return NS_Atomize(str);
 }
 
 #endif // txStringUtils_h__
--- a/dom/xslt/xml/txXMLUtils.cpp
+++ b/dom/xslt/xml/txXMLUtils.cpp
@@ -53,34 +53,34 @@ XMLUtils::splitExpatName(const char16_t 
                                                                     uriEnd));
         if (*aNameSpaceID == kNameSpaceID_Unknown) {
             return NS_ERROR_FAILURE;
         }
 
         nameStart = (uriEnd + 1);
         if (nameEnd)  {
             const char16_t *prefixStart = nameEnd + 1;
-            *aPrefix = NS_NewAtom(Substring(prefixStart, pos)).take();
+            *aPrefix = NS_Atomize(Substring(prefixStart, pos)).take();
             if (!*aPrefix) {
                 return NS_ERROR_OUT_OF_MEMORY;
             }
         }
         else {
             nameEnd = pos;
             *aPrefix = nullptr;
         }
     }
     else {
         *aNameSpaceID = kNameSpaceID_None;
         nameStart = aExpatName;
         nameEnd = pos;
         *aPrefix = nullptr;
     }
 
-    *aLocalName = NS_NewAtom(Substring(nameStart, nameEnd)).take();
+    *aLocalName = NS_Atomize(Substring(nameStart, nameEnd)).take();
 
     return *aLocalName ? NS_OK : NS_ERROR_OUT_OF_MEMORY;
 }
 
 nsresult
 XMLUtils::splitQName(const nsAString& aName, nsIAtom** aPrefix,
                      nsIAtom** aLocalName)
 {
@@ -90,22 +90,22 @@ XMLUtils::splitQName(const nsAString& aN
     if (!valid) {
         return NS_ERROR_FAILURE;
     }
 
     if (colon) {
         const char16_t *end;
         qName.EndReading(end);
 
-        *aPrefix = NS_NewAtom(Substring(qName.get(), colon)).take();
-        *aLocalName = NS_NewAtom(Substring(colon + 1, end)).take();
+        *aPrefix = NS_Atomize(Substring(qName.get(), colon)).take();
+        *aLocalName = NS_Atomize(Substring(colon + 1, end)).take();
     }
     else {
         *aPrefix = nullptr;
-        *aLocalName = NS_NewAtom(aName).take();
+        *aLocalName = NS_Atomize(aName).take();
     }
 
     return NS_OK;
 }
 
 /**
  * Returns true if the given string has only whitespace characters
  */
--- a/dom/xslt/xpath/txExpr.h
+++ b/dom/xslt/xpath/txExpr.h
@@ -473,17 +473,17 @@ public:
     {
     }
 
     /*
      * Sets the name of the node to match. Only availible for pi nodes
      */
     void setNodeName(const nsAString& aName)
     {
-        mNodeName = do_GetAtom(aName);
+        mNodeName = NS_Atomize(aName);
     }
 
     NodeType getNodeTestType()
     {
         return mNodeType;
     }
 
     NodeTestType getType() override;
--- a/dom/xslt/xpath/txExprParser.cpp
+++ b/dom/xslt/xpath/txExprParser.cpp
@@ -477,17 +477,17 @@ txExprParser::createLocationStep(txExprL
 
     //-- get Axis Identifier or AbbreviatedStep, if present
     Token* tok = lexer.peek();
     switch (tok->mType) {
         case Token::AXIS_IDENTIFIER:
         {
             //-- eat token
             lexer.nextToken();
-            nsCOMPtr<nsIAtom> axis = do_GetAtom(tok->Value());
+            nsCOMPtr<nsIAtom> axis = NS_Atomize(tok->Value());
             if (axis == nsGkAtoms::ancestor) {
                 axisIdentifier = LocationStep::ANCESTOR_AXIS;
             }
             else if (axis == nsGkAtoms::ancestorOrSelf) {
                 axisIdentifier = LocationStep::ANCESTOR_OR_SELF_AXIS;
             }
             else if (axis == nsGkAtoms::attribute) {
                 axisIdentifier = LocationStep::ATTRIBUTE_AXIS;
@@ -889,35 +889,35 @@ nsresult
 txExprParser::resolveQName(const nsAString& aQName,
                            nsIAtom** aPrefix, txIParseContext* aContext,
                            nsIAtom** aLocalName, int32_t& aNamespace,
                            bool aIsNameTest)
 {
     aNamespace = kNameSpaceID_None;
     int32_t idx = aQName.FindChar(':');
     if (idx > 0) {
-        *aPrefix = NS_NewAtom(StringHead(aQName, (uint32_t)idx)).take();
+        *aPrefix = NS_Atomize(StringHead(aQName, (uint32_t)idx)).take();
         if (!*aPrefix) {
             return NS_ERROR_OUT_OF_MEMORY;
         }
-        *aLocalName = NS_NewAtom(Substring(aQName, (uint32_t)idx + 1,
+        *aLocalName = NS_Atomize(Substring(aQName, (uint32_t)idx + 1,
                                            aQName.Length() - (idx + 1))).take();
         if (!*aLocalName) {
             NS_RELEASE(*aPrefix);
             return NS_ERROR_OUT_OF_MEMORY;
         }
         return aContext->resolveNamespacePrefix(*aPrefix, aNamespace);
     }
     // the lexer dealt with idx == 0
     *aPrefix = 0;
     if (aIsNameTest && aContext->caseInsensitiveNameTests()) {
         nsAutoString lcname;
         nsContentUtils::ASCIIToLower(aQName, lcname);
-        *aLocalName = NS_NewAtom(lcname).take();
+        *aLocalName = NS_Atomize(lcname).take();
     }
     else {
-        *aLocalName = NS_NewAtom(aQName).take();
+        *aLocalName = NS_Atomize(aQName).take();
     }
     if (!*aLocalName) {
         return NS_ERROR_OUT_OF_MEMORY;
     }
     return NS_OK;
 }
--- a/dom/xslt/xpath/txMozillaXPathTreeWalker.cpp
+++ b/dom/xslt/xpath/txMozillaXPathTreeWalker.cpp
@@ -353,17 +353,17 @@ txXPathNodeUtils::getLocalName(const txX
             return localName.forget();
         }
 
         if (aNode.mNode->IsNodeOfType(nsINode::ePROCESSING_INSTRUCTION)) {
             nsCOMPtr<nsIDOMNode> node = do_QueryInterface(aNode.mNode);
             nsAutoString target;
             node->GetNodeName(target);
 
-            return NS_NewAtom(target);
+            return NS_Atomize(target);
         }
 
         return nullptr;
     }
 
     nsCOMPtr<nsIAtom> localName = aNode.Content()->
         GetAttrNameAt(aNode.mIndex)->LocalName();
 
--- a/dom/xslt/xslt/txInstructions.cpp
+++ b/dom/xslt/xslt/txInstructions.cpp
@@ -109,17 +109,17 @@ txAttribute::execute(txExecutionState& a
     if (!XMLUtils::isValidQName(name, &colon) ||
         TX_StringEqualsAtom(name, nsGkAtoms::xmlns)) {
         return NS_OK;
     }
 
     nsCOMPtr<nsIAtom> prefix;
     uint32_t lnameStart = 0;
     if (colon) {
-        prefix = do_GetAtom(Substring(name.get(), colon));
+        prefix = NS_Atomize(Substring(name.get(), colon));
         lnameStart = colon - name.get() + 1;
     }
 
     int32_t nsId = kNameSpaceID_None;
     if (mNamespace) {
         nsAutoString nspace;
         rv = mNamespace->evaluateToString(aEs.getEvalContext(),
                                           nspace);
@@ -825,17 +825,17 @@ txStartElement::execute(txExecutionState
 
     int32_t nsId = kNameSpaceID_None;
     nsCOMPtr<nsIAtom> prefix;
     uint32_t lnameStart = 0;
 
     const char16_t* colon;
     if (XMLUtils::isValidQName(name, &colon)) {
         if (colon) {
-            prefix = do_GetAtom(Substring(name.get(), colon));
+            prefix = NS_Atomize(Substring(name.get(), colon));
             lnameStart = colon - name.get() + 1;
         }
 
         if (mNamespace) {
             nsAutoString nspace;
             rv = mNamespace->evaluateToString(aEs.getEvalContext(),
                                               nspace);
             NS_ENSURE_SUCCESS(rv, rv);
--- a/dom/xslt/xslt/txMozillaXMLOutput.cpp
+++ b/dom/xslt/xslt/txMozillaXMLOutput.cpp
@@ -127,20 +127,20 @@ txMozillaXMLOutput::attribute(nsIAtom* a
                               const int32_t aNsID,
                               const nsString& aValue)
 {
     nsCOMPtr<nsIAtom> lname;
 
     if (mOpenedElementIsHTML && aNsID == kNameSpaceID_None) {
         nsAutoString lnameStr;
         nsContentUtils::ASCIIToLower(aLocalName, lnameStr);
-        lname = do_GetAtom(lnameStr);
+        lname = NS_Atomize(lnameStr);
     }
     else {
-        lname = do_GetAtom(aLocalName);
+        lname = NS_Atomize(aLocalName);
     }
 
     NS_ENSURE_TRUE(lname, NS_ERROR_OUT_OF_MEMORY);
 
     // Check that it's a valid name
     if (!nsContentUtils::IsValidNodeName(lname, aPrefix, aNsID)) {
         // Try without prefix
         aPrefix = nullptr;
@@ -457,20 +457,20 @@ txMozillaXMLOutput::startElement(nsIAtom
     int32_t nsId = aNsID;
     nsCOMPtr<nsIAtom> lname;
 
     if (mOutputFormat.mMethod == eHTMLOutput && aNsID == kNameSpaceID_None) {
         nsId = kNameSpaceID_XHTML;
 
         nsAutoString lnameStr;
         nsContentUtils::ASCIIToLower(aLocalName, lnameStr);
-        lname = do_GetAtom(lnameStr);
+        lname = NS_Atomize(lnameStr);
     }
     else {
-        lname = do_GetAtom(aLocalName);
+        lname = NS_Atomize(aLocalName);
     }
 
     // No biggie if we lose the prefix due to OOM
     NS_ENSURE_TRUE(lname, NS_ERROR_OUT_OF_MEMORY);
 
     // Check that it's a valid name
     if (!nsContentUtils::IsValidNodeName(lname, aPrefix, nsId)) {
         // Try without prefix
@@ -751,17 +751,17 @@ txMozillaXMLOutput::endHTMLElement(nsICo
         // handle HTTP-EQUIV data
         nsAutoString httpEquiv;
         aElement->GetAttr(kNameSpaceID_None, nsGkAtoms::httpEquiv, httpEquiv);
         if (!httpEquiv.IsEmpty()) {
             nsAutoString value;
             aElement->GetAttr(kNameSpaceID_None, nsGkAtoms::content, value);
             if (!value.IsEmpty()) {
                 nsContentUtils::ASCIIToLower(httpEquiv);
-                nsCOMPtr<nsIAtom> header = do_GetAtom(httpEquiv);
+                nsCOMPtr<nsIAtom> header = NS_Atomize(httpEquiv);
                 processHTTPEquiv(header, value);
             }
         }
     }
     
     return NS_OK;
 }
 
@@ -883,17 +883,17 @@ txMozillaXMLOutput::createResultDocument
         else {
             qName.Assign(aName);
         }
 
         nsCOMPtr<nsIDOMDocumentType> documentType;
 
         nsresult rv = nsContentUtils::CheckQName(qName);
         if (NS_SUCCEEDED(rv)) {
-            nsCOMPtr<nsIAtom> doctypeName = do_GetAtom(qName);
+            nsCOMPtr<nsIAtom> doctypeName = NS_Atomize(qName);
             if (!doctypeName) {
                 return NS_ERROR_OUT_OF_MEMORY;
             }
 
             // Indicate that there is no internal subset (not just an empty one)
             rv = NS_NewDOMDocumentType(getter_AddRefs(documentType),
                                        mNodeInfoManager,
                                        doctypeName,
--- a/dom/xslt/xslt/txMozillaXSLTProcessor.cpp
+++ b/dom/xslt/xslt/txMozillaXSLTProcessor.cpp
@@ -391,17 +391,17 @@ txMozillaXSLTProcessor::SetSourceContent
 
     return NS_OK;
 }
 
 NS_IMETHODIMP
 txMozillaXSLTProcessor::AddXSLTParamNamespace(const nsString& aPrefix,
                                               const nsString& aNamespace)
 {
-    nsCOMPtr<nsIAtom> pre = do_GetAtom(aPrefix);
+    nsCOMPtr<nsIAtom> pre = NS_Atomize(aPrefix);
     return mParamNamespaceMap.mapNamespace(pre, aNamespace);
 }
 
 
 class txXSLTParamContext : public txIParseContext,
                            public txIEvalContext
 {
 public:
@@ -513,17 +513,17 @@ txMozillaXSLTProcessor::AddXSLTParam(con
         // Evaluate
         rv = expr->evaluate(&paramContext, getter_AddRefs(value));
         NS_ENSURE_SUCCESS(rv, rv);
     }
     else {
         value = new StringResult(aValue, nullptr);
     }
 
-    nsCOMPtr<nsIAtom> name = do_GetAtom(aName);
+    nsCOMPtr<nsIAtom> name = NS_Atomize(aName);
     int32_t nsId = kNameSpaceID_Unknown;
     rv = nsContentUtils::NameSpaceManager()->
         RegisterNameSpace(aNamespace, nsId);
     NS_ENSURE_SUCCESS(rv, rv);
 
     txExpandedName varName(nsId, name);
     txVariable* var = static_cast<txVariable*>(mVariables.get(varName));
     if (var) {
@@ -935,17 +935,17 @@ txMozillaXSLTProcessor::SetParameter(con
             return NS_ERROR_FAILURE;
         }        
     }
 
     int32_t nsId = kNameSpaceID_Unknown;
     nsresult rv = nsContentUtils::NameSpaceManager()->
         RegisterNameSpace(aNamespaceURI, nsId);
     NS_ENSURE_SUCCESS(rv, rv);
-    nsCOMPtr<nsIAtom> localName = do_GetAtom(aLocalName);
+    nsCOMPtr<nsIAtom> localName = NS_Atomize(aLocalName);
     txExpandedName varName(nsId, localName);
 
     txVariable* var = static_cast<txVariable*>(mVariables.get(varName));
     if (var) {
         var->setValue(value);
         return NS_OK;
     }
 
@@ -957,17 +957,17 @@ NS_IMETHODIMP
 txMozillaXSLTProcessor::GetParameter(const nsAString& aNamespaceURI,
                                      const nsAString& aLocalName,
                                      nsIVariant **aResult)
 {
     int32_t nsId = kNameSpaceID_Unknown;
     nsresult rv = nsContentUtils::NameSpaceManager()->
         RegisterNameSpace(aNamespaceURI, nsId);
     NS_ENSURE_SUCCESS(rv, rv);
-    nsCOMPtr<nsIAtom> localName = do_GetAtom(aLocalName);
+    nsCOMPtr<nsIAtom> localName = NS_Atomize(aLocalName);
     txExpandedName varName(nsId, localName);
 
     txVariable* var = static_cast<txVariable*>(mVariables.get(varName));
     if (var) {
         return var->getValue(aResult);
     }
     return NS_OK;
 }
@@ -975,17 +975,17 @@ txMozillaXSLTProcessor::GetParameter(con
 NS_IMETHODIMP
 txMozillaXSLTProcessor::RemoveParameter(const nsAString& aNamespaceURI,
                                         const nsAString& aLocalName)
 {
     int32_t nsId = kNameSpaceID_Unknown;
     nsresult rv = nsContentUtils::NameSpaceManager()->
         RegisterNameSpace(aNamespaceURI, nsId);
     NS_ENSURE_SUCCESS(rv, rv);
-    nsCOMPtr<nsIAtom> localName = do_GetAtom(aLocalName);
+    nsCOMPtr<nsIAtom> localName = NS_Atomize(aLocalName);
     txExpandedName varName(nsId, localName);
 
     mVariables.remove(varName);
     return NS_OK;
 }
 
 NS_IMETHODIMP
 txMozillaXSLTProcessor::ClearParameters()
--- a/dom/xslt/xslt/txPatternParser.cpp
+++ b/dom/xslt/xslt/txPatternParser.cpp
@@ -125,17 +125,17 @@ nsresult txPatternParser::createLocPathP
                 aPattern = new txRootPattern();
                 return NS_OK;
             }
             break;
         case Token::FUNCTION_NAME_AND_PAREN:
             // id(Literal) or key(Literal, Literal)
             {
                 nsCOMPtr<nsIAtom> nameAtom =
-                    do_GetAtom(aLexer.nextToken()->Value());
+                    NS_Atomize(aLexer.nextToken()->Value());
                 if (nameAtom == nsGkAtoms::id) {
                     rv = createIdPattern(aLexer, stepPattern);
                 }
                 else if (nameAtom == nsGkAtoms::key) {
                     rv = createKeyPattern(aLexer, aContext, stepPattern);
                 }
                 if (NS_FAILED(rv))
                     return rv;
--- a/dom/xslt/xslt/txStylesheetCompileHandlers.cpp
+++ b/dom/xslt/xslt/txStylesheetCompileHandlers.cpp
@@ -297,17 +297,17 @@ getAtomAttr(txStylesheetAttr* aAttribute
     *aAtom = nullptr;
     txStylesheetAttr* attr = nullptr;
     nsresult rv = getStyleAttr(aAttributes, aAttrCount, kNameSpaceID_None,
                                aName, aRequired, &attr);
     if (!attr) {
         return rv;
     }
 
-    *aAtom = NS_NewAtom(attr->mValue).take();
+    *aAtom = NS_Atomize(attr->mValue).take();
     NS_ENSURE_TRUE(*aAtom, NS_ERROR_OUT_OF_MEMORY);
 
     return NS_OK;
 }
 
 static nsresult
 getYesNoAttr(txStylesheetAttr* aAttributes,
              int32_t aAttrCount,
@@ -2854,17 +2854,17 @@ txHandlerTable::txHandlerTable(const Han
 
 nsresult
 txHandlerTable::init(const txElementHandler* aHandlers, uint32_t aCount)
 {
     nsresult rv = NS_OK;
 
     uint32_t i;
     for (i = 0; i < aCount; ++i) {
-        nsCOMPtr<nsIAtom> nameAtom = do_GetAtom(aHandlers->mLocalName);
+        nsCOMPtr<nsIAtom> nameAtom = NS_Atomize(aHandlers->mLocalName);
         txExpandedName name(aHandlers->mNamespaceID, nameAtom);
         rv = mHandlers.add(name, aHandlers);
         NS_ENSURE_SUCCESS(rv, rv);
 
         ++aHandlers;
     }
     return NS_OK;
 }
--- a/dom/xslt/xslt/txXSLTPatterns.cpp
+++ b/dom/xslt/xslt/txXSLTPatterns.cpp
@@ -254,17 +254,17 @@ txRootPattern::toString(nsAString& aDest
  * This looks like the id() function, but may only have LITERALs as
  * argument.
  */
 txIdPattern::txIdPattern(const nsSubstring& aString)
 {
     nsWhitespaceTokenizer tokenizer(aString);
     while (tokenizer.hasMoreTokens()) {
         // this can fail, XXX move to a Init(aString) method
-        nsCOMPtr<nsIAtom> atom = do_GetAtom(tokenizer.nextToken());
+        nsCOMPtr<nsIAtom> atom = NS_Atomize(tokenizer.nextToken());
         mIds.AppendObject(atom);
     }
 }
 
 bool txIdPattern::matches(const txXPathNode& aNode, txIMatchContext* aContext)
 {
     if (!txXPathNodeUtils::isElement(aNode)) {
         return false;
--- a/dom/xul/XULDocument.cpp
+++ b/dom/xul/XULDocument.cpp
@@ -685,17 +685,17 @@ XULDocument::SynchronizeBroadcastListene
             // which could define JS properties that mask XBL
             // properties, etc.
             ExecuteOnBroadcastHandlerFor(aBroadcaster, aListener, name);
 #endif
         }
     }
     else {
         // Find out if the attribute is even present at all.
-        nsCOMPtr<nsIAtom> name = do_GetAtom(aAttr);
+        nsCOMPtr<nsIAtom> name = NS_Atomize(aAttr);
 
         nsAutoString value;
         if (aBroadcaster->GetAttr(kNameSpaceID_None, name, value)) {
             aListener->SetAttr(kNameSpaceID_None, name, value, notify);
         } else {
             aListener->UnsetAttr(kNameSpaceID_None, name, notify);
         }
 
@@ -766,17 +766,17 @@ XULDocument::AddBroadcastListenerFor(Ele
 
         entry->mBroadcaster = &aBroadcaster;
 
         // N.B. placement new to construct the nsTArray object in-place
         new (&entry->mListeners) nsTArray<BroadcastListener*>();
     }
 
     // Only add the listener if it's not there already!
-    nsCOMPtr<nsIAtom> attr = do_GetAtom(aAttr);
+    nsCOMPtr<nsIAtom> attr = NS_Atomize(aAttr);
 
     for (size_t i = entry->mListeners.Length() - 1; i != (size_t)-1; --i) {
         BroadcastListener* bl = entry->mListeners[i];
         nsCOMPtr<Element> blListener = do_QueryReferent(bl->mListener);
 
         if (blListener == &aListener && bl->mAttribute == attr)
             return;
     }
@@ -810,17 +810,17 @@ XULDocument::RemoveBroadcastListenerFor(
     // If we haven't added any broadcast listeners, then there sure
     // aren't any to remove.
     if (! mBroadcasterMap)
         return;
 
     auto entry = static_cast<BroadcasterMapEntry*>
                             (mBroadcasterMap->Search(&aBroadcaster));
     if (entry) {
-        nsCOMPtr<nsIAtom> attr = do_GetAtom(aAttr);
+        nsCOMPtr<nsIAtom> attr = NS_Atomize(aAttr);
         for (size_t i = entry->mListeners.Length() - 1; i != (size_t)-1; --i) {
             BroadcastListener* bl = entry->mListeners[i];
             nsCOMPtr<Element> blListener = do_QueryReferent(bl->mListener);
 
             if (blListener == &aListener && bl->mAttribute == attr) {
                 entry->mListeners.RemoveElementAt(i);
                 delete bl;
 
@@ -1175,17 +1175,17 @@ XULDocument::GetElementsByAttribute(cons
     *aReturn = GetElementsByAttribute(aAttribute, aValue).take();
     return NS_OK;
 }
 
 already_AddRefed<nsINodeList>
 XULDocument::GetElementsByAttribute(const nsAString& aAttribute,
                                     const nsAString& aValue)
 {
-    nsCOMPtr<nsIAtom> attrAtom(do_GetAtom(aAttribute));
+    nsCOMPtr<nsIAtom> attrAtom(NS_Atomize(aAttribute));
     void* attrValue = new nsString(aValue);
     RefPtr<nsContentList> list = new nsContentList(this,
                                             MatchAttribute,
                                             nsContentUtils::DestroyMatchString,
                                             attrValue,
                                             true,
                                             attrAtom,
                                             kNameSpaceID_Unknown);
@@ -1206,17 +1206,17 @@ XULDocument::GetElementsByAttributeNS(co
 }
 
 already_AddRefed<nsINodeList>
 XULDocument::GetElementsByAttributeNS(const nsAString& aNamespaceURI,
                                       const nsAString& aAttribute,
                                       const nsAString& aValue,
                                       ErrorResult& aRv)
 {
-    nsCOMPtr<nsIAtom> attrAtom(do_GetAtom(aAttribute));
+    nsCOMPtr<nsIAtom> attrAtom(NS_Atomize(aAttribute));
     void* attrValue = new nsString(aValue);
 
     int32_t nameSpaceId = kNameSpaceID_Wildcard;
     if (!aNamespaceURI.EqualsLiteral("*")) {
       nsresult rv =
         nsContentUtils::NameSpaceManager()->RegisterNameSpace(aNamespaceURI,
                                                               nameSpaceId);
       if (NS_FAILED(rv)) {
@@ -1267,17 +1267,17 @@ XULDocument::Persist(const nsAString& aI
             return NS_ERROR_INVALID_ARG;
         }
 
         if (colon) {
             // We don't really handle namespace qualifiers in attribute names.
             return NS_ERROR_NOT_IMPLEMENTED;
         }
 
-        tag = do_GetAtom(aAttr);
+        tag = NS_Atomize(aAttr);
         NS_ENSURE_TRUE(tag, NS_ERROR_OUT_OF_MEMORY);
 
         nameSpaceID = kNameSpaceID_None;
     }
 
     return Persist(element, nameSpaceID, tag);
 }
 
@@ -2122,17 +2122,17 @@ XULDocument::ApplyPersistentAttributesTo
         attrs->GetNext(attrstr);
 
         nsAutoString value;
         rv = mLocalStore->GetValue(uri, aID, attrstr, value);
         if (NS_WARN_IF(NS_FAILED(rv))) {
             return rv;
         }
 
-        nsCOMPtr<nsIAtom> attr = do_GetAtom(attrstr);
+        nsCOMPtr<nsIAtom> attr = NS_Atomize(attrstr);
         if (NS_WARN_IF(!attr)) {
             return NS_ERROR_OUT_OF_MEMORY;
         }
 
         uint32_t cnt = aElements.Count();
 
         for (int32_t i = int32_t(cnt) - 1; i >= 0; --i) {
             nsCOMPtr<nsIContent> element = aElements.SafeObjectAt(i);
--- a/dom/xul/nsXULElement.cpp
+++ b/dom/xul/nsXULElement.cpp
@@ -433,17 +433,17 @@ nsXULElement::GetElementsByAttribute(con
     *aReturn = GetElementsByAttribute(aAttribute, aValue).take();
     return NS_OK;
 }
 
 already_AddRefed<nsINodeList>
 nsXULElement::GetElementsByAttribute(const nsAString& aAttribute,
                                      const nsAString& aValue)
 {
-    nsCOMPtr<nsIAtom> attrAtom(do_GetAtom(aAttribute));
+    nsCOMPtr<nsIAtom> attrAtom(NS_Atomize(aAttribute));
     void* attrValue = new nsString(aValue);
     RefPtr<nsContentList> list =
         new nsContentList(this,
                           XULDocument::MatchAttribute,
                           nsContentUtils::DestroyMatchString,
                           attrValue,
                           true,
                           attrAtom,
@@ -464,17 +464,17 @@ nsXULElement::GetElementsByAttributeNS(c
 }
 
 already_AddRefed<nsINodeList>
 nsXULElement::GetElementsByAttributeNS(const nsAString& aNamespaceURI,
                                        const nsAString& aAttribute,
                                        const nsAString& aValue,
                                        ErrorResult& rv)
 {
-    nsCOMPtr<nsIAtom> attrAtom(do_GetAtom(aAttribute));
+    nsCOMPtr<nsIAtom> attrAtom(NS_Atomize(aAttribute));
 
     int32_t nameSpaceId = kNameSpaceID_Wildcard;
     if (!aNamespaceURI.EqualsLiteral("*")) {
       rv =
         nsContentUtils::NameSpaceManager()->RegisterNameSpace(aNamespaceURI,
                                                               nameSpaceId);
       if (rv.Failed()) {
           return nullptr;
--- a/dom/xul/nsXULPrototypeDocument.cpp
+++ b/dom/xul/nsXULPrototypeDocument.cpp
@@ -168,17 +168,17 @@ nsXULPrototypeDocument::Read(nsIObjectIn
         }
         if (prefixIsNull) {
             prefix = nullptr;
         } else {
             tmp = aStream->ReadString(prefixStr);
             if (NS_FAILED(tmp)) {
               rv = tmp;
             }
-            prefix = do_GetAtom(prefixStr);
+            prefix = NS_Atomize(prefixStr);
         }
         tmp = aStream->ReadString(localName);
         if (NS_FAILED(tmp)) {
           rv = tmp;
         }
 
         RefPtr<mozilla::dom::NodeInfo> nodeInfo;
         // Using UINT16_MAX here as we don't know which nodeinfos will be
--- a/dom/xul/templates/nsXULContentBuilder.cpp
+++ b/dom/xul/templates/nsXULContentBuilder.cpp
@@ -818,17 +818,17 @@ nsXULContentBuilder::AddPersistentAttrib
 
         RefPtr<mozilla::dom::NodeInfo> ni =
             aTemplateNode->GetExistingAttrNameFromQName(attribute);
         if (ni) {
             tag = ni->NameAtom();
             nameSpaceID = ni->NamespaceID();
         }
         else {
-            tag = do_GetAtom(attribute);
+            tag = NS_Atomize(attribute);
             NS_ENSURE_TRUE(tag, NS_ERROR_OUT_OF_MEMORY);
 
             nameSpaceID = kNameSpaceID_None;
         }
 
         nsCOMPtr<nsIRDFResource> property;
         rv = nsXULContentUtils::GetResource(nameSpaceID, tag, getter_AddRefs(property));
         NS_ENSURE_SUCCESS(rv, rv);
--- a/dom/xul/templates/nsXULSortService.cpp
+++ b/dom/xul/templates/nsXULSortService.cpp
@@ -356,33 +356,33 @@ XULSortServiceImpl::InitializeSortState(
   // The latter is for backwards compatibility, and is equivalent to concatenating
   // both values in the sort attribute
   nsAutoString sort(aSortKey);
   aSortState->sortKeys.Clear();
   if (sort.IsEmpty()) {
     nsAutoString sortResource, sortResource2;
     aRootElement->GetAttr(kNameSpaceID_None, nsGkAtoms::sortResource, sortResource);
     if (!sortResource.IsEmpty()) {
-      nsCOMPtr<nsIAtom> sortkeyatom = do_GetAtom(sortResource);
+      nsCOMPtr<nsIAtom> sortkeyatom = NS_Atomize(sortResource);
       aSortState->sortKeys.AppendObject(sortkeyatom);
       sort.Append(sortResource);
 
       aRootElement->GetAttr(kNameSpaceID_None, nsGkAtoms::sortResource2, sortResource2);
       if (!sortResource2.IsEmpty()) {
-        nsCOMPtr<nsIAtom> sortkeyatom2 = do_GetAtom(sortResource2);
+        nsCOMPtr<nsIAtom> sortkeyatom2 = NS_Atomize(sortResource2);
         aSortState->sortKeys.AppendObject(sortkeyatom2);
         sort.Append(' ');
         sort.Append(sortResource2);
       }
     }
   }
   else {
     nsWhitespaceTokenizer tokenizer(sort);
     while (tokenizer.hasMoreTokens()) {
-      nsCOMPtr<nsIAtom> keyatom = do_GetAtom(tokenizer.nextToken());
+      nsCOMPtr<nsIAtom> keyatom = NS_Atomize(tokenizer.nextToken());
       NS_ENSURE_TRUE(keyatom, NS_ERROR_OUT_OF_MEMORY);
       aSortState->sortKeys.AppendObject(keyatom);
     }
   }
 
   aSortState->sort.Assign(sort);
   aSortState->direction = nsSortState_natural;
 
--- a/dom/xul/templates/nsXULTemplateBuilder.cpp
+++ b/dom/xul/templates/nsXULTemplateBuilder.cpp
@@ -1585,17 +1585,17 @@ nsXULTemplateBuilder::SubstituteTextRepl
     nsAutoString replacementText;
 
     // The symbol "rdf:*" is special, and means "this guy's URI"
     if (aVariable.EqualsLiteral("rdf:*")){
         c->result->GetId(replacementText);
     }
     else {
         // Got a variable; get the value it's assigned to
-        nsCOMPtr<nsIAtom> var = do_GetAtom(aVariable);
+        nsCOMPtr<nsIAtom> var = NS_Atomize(aVariable);
         c->result->GetBindingFor(var, replacementText);
     }
 
     c->str += replacementText;
 }
 
 bool
 nsXULTemplateBuilder::IsTemplateElement(nsIContent* aContent)
@@ -1722,27 +1722,27 @@ nsXULTemplateBuilder::CompileQueries()
 
     // For RDF queries, the container variable may also be set via the
     // <content> tag.
 
     nsAutoString containervar;
     tmpl->GetAttr(kNameSpaceID_None, nsGkAtoms::container, containervar);
 
     if (containervar.IsEmpty())
-        mRefVariable = do_GetAtom("?uri");
+        mRefVariable = NS_Atomize("?uri");
     else
-        mRefVariable = do_GetAtom(containervar);
+        mRefVariable = NS_Atomize(containervar);
 
     nsAutoString membervar;
     tmpl->GetAttr(kNameSpaceID_None, nsGkAtoms::member, membervar);
 
     if (membervar.IsEmpty())
         mMemberVariable = nullptr;
     else
-        mMemberVariable = do_GetAtom(membervar);
+        mMemberVariable = NS_Atomize(membervar);
 
     nsTemplateQuerySet* queryset = new nsTemplateQuerySet(0);
     if (!mQuerySets.AppendElement(queryset)) {
         delete queryset;
         return NS_ERROR_OUT_OF_MEMORY;
     }
 
     bool canUseTemplate = false;
@@ -2045,17 +2045,17 @@ nsXULTemplateBuilder::DetermineMemberVar
     // recursively iterate over the children looking for an element
     // with uri="?..."
     for (nsIContent* child = aElement->GetFirstChild();
          child;
          child = child->GetNextSibling()) {
         nsAutoString uri;
         child->GetAttr(kNameSpaceID_None, nsGkAtoms::uri, uri);
         if (!uri.IsEmpty() && uri[0] == char16_t('?')) {
-            return NS_NewAtom(uri);
+            return NS_Atomize(uri);
         }
 
         nsCOMPtr<nsIAtom> result = DetermineMemberVariable(child);
         if (result) {
             return result.forget();
         }
     }
 
@@ -2080,40 +2080,40 @@ nsXULTemplateBuilder::DetermineRDFQueryR
                                           getter_AddRefs(content));
     }
 
     if (content) {
         nsAutoString uri;
         content->GetAttr(kNameSpaceID_None, nsGkAtoms::uri, uri);
 
         if (!uri.IsEmpty())
-            mRefVariable = do_GetAtom(uri);
+            mRefVariable = NS_Atomize(uri);
 
         nsAutoString tag;
         content->GetAttr(kNameSpaceID_None, nsGkAtoms::tag, tag);
 
         if (!tag.IsEmpty())
-            *aTag = NS_NewAtom(tag).take();
+            *aTag = NS_Atomize(tag).take();
     }
 }
 
 nsresult
 nsXULTemplateBuilder::CompileSimpleQuery(nsIContent* aRuleElement,
                                          nsTemplateQuerySet* aQuerySet,
                                          bool* aCanUseTemplate)
 {
     // compile a simple query, which is a query with no <query> or
     // <conditions>. This means that a default query is used.
     nsCOMPtr<nsIDOMNode> query(do_QueryInterface(aRuleElement));
 
     nsCOMPtr<nsIAtom> memberVariable;
     if (mMemberVariable)
         memberVariable = mMemberVariable;
     else
-        memberVariable = do_GetAtom("rdf:*");
+        memberVariable = NS_Atomize("rdf:*");
 
     // since there is no <query> node for a simple query, the query node will
     // be either the <rule> node if multiple rules are used, or the <template> node.
     aQuerySet->mQueryNode = aRuleElement;
     nsresult rv = mQueryProcessor->CompileQuery(this, query,
                                                 mRefVariable, memberVariable,
                                                 getter_AddRefs(aQuerySet->mCompiledQuery));
     if (NS_FAILED(rv))
@@ -2129,34 +2129,34 @@ nsXULTemplateBuilder::CompileSimpleQuery
         return NS_ERROR_OUT_OF_MEMORY;
 
     rule->SetVars(mRefVariable, memberVariable);
 
     nsAutoString tag;
     aRuleElement->GetAttr(kNameSpaceID_None, nsGkAtoms::parent, tag);
 
     if (!tag.IsEmpty()) {
-        nsCOMPtr<nsIAtom> tagatom = do_GetAtom(tag);
+        nsCOMPtr<nsIAtom> tagatom = NS_Atomize(tag);
         aQuerySet->SetTag(tagatom);
     }
 
     *aCanUseTemplate = true;
 
     return AddSimpleRuleBindings(rule, aRuleElement);
 }
 
 nsresult
 nsXULTemplateBuilder::CompileConditions(nsTemplateRule* aRule,
                                         nsIContent* aCondition)
 {
     nsAutoString tag;
     aCondition->GetAttr(kNameSpaceID_None, nsGkAtoms::parent, tag);
 
     if (!tag.IsEmpty()) {
-        nsCOMPtr<nsIAtom> tagatom = do_GetAtom(tag);
+        nsCOMPtr<nsIAtom> tagatom = NS_Atomize(tag);
         aRule->SetTag(tagatom);
     }
 
     nsTemplateCondition* currentCondition = nullptr;
 
     for (nsIContent* node = aCondition->GetFirstChild();
          node;
          node = node->GetNextSibling()) {
@@ -2195,17 +2195,17 @@ nsXULTemplateBuilder::CompileWhereCondit
     aCondition->GetAttr(kNameSpaceID_None, nsGkAtoms::subject, subject);
     if (subject.IsEmpty()) {
         nsXULContentUtils::LogTemplateError(ERROR_TEMPLATE_WHERE_NO_SUBJECT);
         return NS_OK;
     }
 
     nsCOMPtr<nsIAtom> svar;
     if (subject[0] == char16_t('?'))
-        svar = do_GetAtom(subject);
+        svar = NS_Atomize(subject);
 
     nsAutoString relstring;
     aCondition->GetAttr(kNameSpaceID_None, nsGkAtoms::rel, relstring);
     if (relstring.IsEmpty()) {
         nsXULContentUtils::LogTemplateError(ERROR_TEMPLATE_WHERE_NO_RELATION);
         return NS_OK;
     }
 
@@ -2219,17 +2219,17 @@ nsXULTemplateBuilder::CompileWhereCondit
 
     // multiple
     bool shouldMultiple =
       aCondition->AttrValueIs(kNameSpaceID_None, nsGkAtoms::multiple,
                               nsGkAtoms::_true, eCaseMatters);
 
     nsCOMPtr<nsIAtom> vvar;
     if (!shouldMultiple && (value[0] == char16_t('?'))) {
-        vvar = do_GetAtom(value);
+        vvar = NS_Atomize(value);
     }
 
     // ignorecase
     bool shouldIgnoreCase =
       aCondition->AttrValueIs(kNameSpaceID_None, nsGkAtoms::ignorecase,
                               nsGkAtoms::_true, eCaseMatters);
 
     // negate
@@ -2310,17 +2310,17 @@ nsXULTemplateBuilder::CompileBinding(nsT
     aBinding->GetAttr(kNameSpaceID_None, nsGkAtoms::subject, subject);
     if (subject.IsEmpty()) {
         nsXULContentUtils::LogTemplateError(ERROR_TEMPLATE_BINDING_BAD_SUBJECT);
         return NS_OK;
     }
 
     nsCOMPtr<nsIAtom> svar;
     if (subject[0] == char16_t('?')) {
-        svar = do_GetAtom(subject);
+        svar = NS_Atomize(subject);
     }
     else {
         nsXULContentUtils::LogTemplateError(ERROR_TEMPLATE_BINDING_BAD_SUBJECT);
         return NS_OK;
     }
 
     // predicate
     nsAutoString predicate;
@@ -2336,17 +2336,17 @@ nsXULTemplateBuilder::CompileBinding(nsT
 
     if (object.IsEmpty()) {
         nsXULContentUtils::LogTemplateError(ERROR_TEMPLATE_BINDING_BAD_OBJECT);
         return NS_OK;
     }
 
     nsCOMPtr<nsIAtom> ovar;
     if (object[0] == char16_t('?')) {
-        ovar = do_GetAtom(object);
+        ovar = NS_Atomize(object);
     }
     else {
         nsXULContentUtils::LogTemplateError(ERROR_TEMPLATE_BINDING_BAD_OBJECT);
         return NS_OK;
     }
 
     return aRule->AddBinding(svar, predicate, ovar);
 }
@@ -2409,17 +2409,17 @@ nsXULTemplateBuilder::AddBindingsFor(nsX
 {
     // We should *only* be recieving "rdf:"-style variables. Make
     // sure...
     if (!StringBeginsWith(aVariable, NS_LITERAL_STRING("rdf:")))
         return;
 
     nsTemplateRule* rule = static_cast<nsTemplateRule*>(aClosure);
 
-    nsCOMPtr<nsIAtom> var = do_GetAtom(aVariable);
+    nsCOMPtr<nsIAtom> var = NS_Atomize(aVariable);
 
     // Strip it down to the raw RDF property by clobbering the "rdf:"
     // prefix
     nsAutoString property;
     property.Assign(Substring(aVariable, uint32_t(4), aVariable.Length() - 4));
 
     if (! rule->HasBinding(rule->GetMemberVariable(), property, var))
         // In the simple syntax, the binding is always from the
--- a/dom/xul/templates/nsXULTemplateQueryProcessorRDF.cpp
+++ b/dom/xul/templates/nsXULTemplateQueryProcessorRDF.cpp
@@ -342,17 +342,17 @@ nsXULTemplateQueryProcessorRDF::CompileQ
     if (!query)
         return NS_ERROR_OUT_OF_MEMORY;
 
     query->mRefVariable = aRefVariable;
     if (!mRefVariable)
       mRefVariable = aRefVariable;
 
     if (!aMemberVariable)
-        query->mMemberVariable = do_GetAtom("?");
+        query->mMemberVariable = NS_Atomize("?");
     else
         query->mMemberVariable = aMemberVariable;
 
     nsresult rv;
     TestNode *lastnode = nullptr;
 
     nsCOMPtr<nsIContent> content = do_QueryInterface(aQueryNode);
 
@@ -435,17 +435,17 @@ nsXULTemplateQueryProcessorRDF::Generate
             int32_t count = mQueries.Length();
             for (int32_t r = 0; r < count; r++) {
                 mQueries[r]->ClearCachedResults();
             }
         }
 
         if (! results) {
             if (! query->mRefVariable)
-                query->mRefVariable = do_GetAtom("?uri");
+                query->mRefVariable = NS_Atomize("?uri");
 
             nsCOMPtr<nsIRDFResource> refResource;
             aRef->GetResource(getter_AddRefs(refResource));
             if (! refResource)
                 return NS_ERROR_FAILURE;
 
             // Propagate the assignments through the network
             TestNode* root = query->GetRoot();
@@ -1182,17 +1182,17 @@ nsXULTemplateQueryProcessorRDF::CompileE
 
             // check for <content tag='tag'/> which indicates that matches
             // should only be generated for items inside content with that tag
             nsAutoString tagstr;
             condition->GetAttr(kNameSpaceID_None, nsGkAtoms::tag, tagstr);
 
             nsCOMPtr<nsIAtom> tag;
             if (! tagstr.IsEmpty()) {
-                tag = do_GetAtom(tagstr);
+                tag = NS_Atomize(tagstr);
             }
 
             nsCOMPtr<nsIDOMDocument> doc = do_QueryInterface(condition->GetComposedDoc());
             if (! doc)
                 return NS_ERROR_FAILURE;
 
             idnode->SetTag(tag, doc);
             continue;
@@ -1297,17 +1297,17 @@ nsXULTemplateQueryProcessorRDF::CompileT
 
     nsCOMPtr<nsIAtom> svar;
     nsCOMPtr<nsIRDFResource> sres;
     if (subject.IsEmpty()) {
         nsXULContentUtils::LogTemplateError(ERROR_TEMPLATE_TRIPLE_BAD_SUBJECT);
         return NS_OK;
     }
     if (subject[0] == char16_t('?'))
-        svar = do_GetAtom(subject);
+        svar = NS_Atomize(subject);
     else
         gRDFService->GetUnicodeResource(subject, getter_AddRefs(sres));
 
     // predicate
     nsAutoString predicate;
     aCondition->GetAttr(kNameSpaceID_None, nsGkAtoms::predicate, predicate);
 
     nsCOMPtr<nsIRDFResource> pres;
@@ -1324,17 +1324,17 @@ nsXULTemplateQueryProcessorRDF::CompileT
     nsCOMPtr<nsIAtom> ovar;
     nsCOMPtr<nsIRDFNode> onode;
     if (object.IsEmpty()) {
         nsXULContentUtils::LogTemplateError(ERROR_TEMPLATE_TRIPLE_BAD_OBJECT);
         return NS_OK;
     }
 
     if (object[0] == char16_t('?')) {
-        ovar = do_GetAtom(object);
+        ovar = NS_Atomize(object);
     }
     else if (object.FindChar(':') != -1) { // XXXwaterson evil.
         // treat as resource
         nsCOMPtr<nsIRDFResource> resource;
         gRDFService->GetUnicodeResource(object, getter_AddRefs(resource));
         onode = do_QueryInterface(resource);
     }
     else {
@@ -1393,28 +1393,28 @@ nsXULTemplateQueryProcessorRDF::CompileM
     nsAutoString container;
     aCondition->GetAttr(kNameSpaceID_None, nsGkAtoms::container, container);
 
     if (!container.IsEmpty() && container[0] != char16_t('?')) {
         nsXULContentUtils::LogTemplateError(ERROR_TEMPLATE_MEMBER_NOCONTAINERVAR);
         return NS_OK;
     }
 
-    nsCOMPtr<nsIAtom> containervar = do_GetAtom(container);
+    nsCOMPtr<nsIAtom> containervar = NS_Atomize(container);
 
     // child
     nsAutoString child;
     aCondition->GetAttr(kNameSpaceID_None, nsGkAtoms::child, child);
 
     if (!child.IsEmpty() && child[0] != char16_t('?')) {
         nsXULContentUtils::LogTemplateError(ERROR_TEMPLATE_MEMBER_NOCHILDVAR);
         return NS_OK;
     }
 
-    nsCOMPtr<nsIAtom> childvar = do_GetAtom(child);
+    nsCOMPtr<nsIAtom> childvar = NS_Atomize(child);
 
     TestNode* testnode =
         new nsRDFConMemberTestNode(aParentNode,
                                    this,
                                    containervar,
                                    childvar);
 
     // add testnode to mAllTests first. If adding to mRDFTests fails, just
--- a/dom/xul/templates/nsXULTemplateQueryProcessorStorage.cpp
+++ b/dom/xul/templates/nsXULTemplateQueryProcessorStorage.cpp
@@ -44,17 +44,17 @@ nsXULTemplateResultSetStorage::nsXULTemp
     if (NS_FAILED(rv)) {
         mStatement = nullptr;
         return;
     }
     for (uint32_t c = 0; c < count; c++) {
         nsAutoCString name;
         rv = aStatement->GetColumnName(c, name);
         if (NS_SUCCEEDED(rv)) {
-            nsCOMPtr<nsIAtom> columnName = do_GetAtom(NS_LITERAL_CSTRING("?") + name);
+            nsCOMPtr<nsIAtom> columnName = NS_Atomize(NS_LITERAL_CSTRING("?") + name);
             mColumnNames.AppendObject(columnName);
         }
     }
 }
 
 NS_IMETHODIMP
 nsXULTemplateResultSetStorage::HasMoreElements(bool *aResult)
 {
--- a/dom/xul/templates/nsXULTemplateQueryProcessorXML.cpp
+++ b/dom/xul/templates/nsXULTemplateQueryProcessorXML.cpp
@@ -266,17 +266,17 @@ nsXULTemplateQueryProcessorXML::CompileQ
             // ignore assignments without a variable or an expression
             if (!var.IsEmpty() && !expr.IsEmpty()) {
                 compiledexpr = CreateExpression(expr, condition, rv);
                 if (rv.Failed()) {
                     nsXULContentUtils::LogTemplateError(ERROR_TEMPLATE_BAD_ASSIGN_XPATH);
                     return rv.StealNSResult();
                 }
 
-                nsCOMPtr<nsIAtom> varatom = do_GetAtom(var);
+                nsCOMPtr<nsIAtom> varatom = NS_Atomize(var);
 
                 query->AddBinding(varatom, Move(compiledexpr));
             }
         }
     }
 
     query.forget(_retval);
 
--- a/dom/xul/templates/nsXULTreeBuilder.cpp
+++ b/dom/xul/templates/nsXULTreeBuilder.cpp
@@ -368,17 +368,17 @@ nsXULTreeBuilder::Sort(nsIDOMElement* aE
 
     nsAutoString sort;
     header->GetAttr(kNameSpaceID_None, nsGkAtoms::sort, sort);
 
     if (sort.IsEmpty())
         return NS_OK;
 
     // Grab the new sort variable
-    mSortVariable = do_GetAtom(sort);
+    mSortVariable = NS_Atomize(sort);
 
     nsAutoString hints;
     header->GetAttr(kNameSpaceID_None, nsGkAtoms::sorthints, hints);
 
     bool hasNaturalState = true;
     nsWhitespaceTokenizer tokenizer(hints);
     while (tokenizer.hasMoreTokens()) {
       const nsDependentSubstring& token(tokenizer.nextToken());
@@ -1256,17 +1256,17 @@ nsXULTreeBuilder::EnsureSortVariables()
 
         if (child->NodeInfo()->Equals(nsGkAtoms::treecol,
                                       kNameSpaceID_XUL)) {
             if (child->AttrValueIs(kNameSpaceID_None, nsGkAtoms::sortActive,
                                    nsGkAtoms::_true, eCaseMatters)) {
                 nsAutoString sort;
                 child->GetAttr(kNameSpaceID_None, nsGkAtoms::sort, sort);
                 if (! sort.IsEmpty()) {
-                    mSortVariable = do_GetAtom(sort);
+                    mSortVariable = NS_Atomize(sort);
 
                     static nsIContent::AttrValuesArray strings[] =
                       {&nsGkAtoms::ascending, &nsGkAtoms::descending, nullptr};
                     switch (child->FindAttrValueIn(kNameSpaceID_None,
                                                    nsGkAtoms::sortDirection,
                                                    strings, eCaseMatters)) {
                        case 0: mSortDirection = eDirection_Ascending; break;
                        case 1: mSortDirection = eDirection_Descending; break;
--- a/editor/composer/nsComposerCommands.cpp
+++ b/editor/composer/nsComposerCommands.cpp
@@ -720,17 +720,17 @@ nsresult
 nsFontSizeStateCommand::GetCurrentState(nsIEditor *aEditor,
                                         nsICommandParams *aParams)
 {
   NS_ASSERTION(aEditor, "Need an editor here");
   nsCOMPtr<nsIHTMLEditor> htmlEditor = do_QueryInterface(aEditor);
   NS_ENSURE_TRUE(htmlEditor, NS_ERROR_INVALID_ARG);
 
   nsAutoString outStateString;
-  nsCOMPtr<nsIAtom> fontAtom = do_GetAtom("font");
+  nsCOMPtr<nsIAtom> fontAtom = NS_Atomize("font");
   bool firstHas, anyHas, allHas;
   nsresult rv = htmlEditor->GetInlinePropertyWithAttrValue(fontAtom,
                                          NS_LITERAL_STRING("size"),
                                          EmptyString(),
                                          &firstHas, &anyHas, &allHas,
                                          outStateString);
   NS_ENSURE_SUCCESS(rv, rv);
 
@@ -1496,17 +1496,17 @@ GetListState(nsIHTMLEditor* aEditor, boo
 }
 
 nsresult
 RemoveOneProperty(nsIHTMLEditor* aEditor, const nsAString& aProp)
 {
   MOZ_ASSERT(aEditor);
 
   /// XXX Hack alert! Look in nsIEditProperty.h for this
-  nsCOMPtr<nsIAtom> styleAtom = do_GetAtom(aProp);
+  nsCOMPtr<nsIAtom> styleAtom = NS_Atomize(aProp);
   NS_ENSURE_TRUE(styleAtom, NS_ERROR_OUT_OF_MEMORY);
 
   return aEditor->RemoveInlineProperty(styleAtom, EmptyString());
 }
 
 
 // the name of the attribute here should be the contents of the appropriate
 // tag, e.g. 'b' for bold, 'i' for italics.
@@ -1525,13 +1525,13 @@ RemoveTextProperty(nsIHTMLEditor* aEdito
 // the name of the attribute here should be the contents of the appropriate
 // tag, e.g. 'b' for bold, 'i' for italics.
 nsresult
 SetTextProperty(nsIHTMLEditor* aEditor, const nsAString& aProp)
 {
   MOZ_ASSERT(aEditor);
 
   /// XXX Hack alert! Look in nsIEditProperty.h for this
-  nsCOMPtr<nsIAtom> styleAtom = do_GetAtom(aProp);
+  nsCOMPtr<nsIAtom> styleAtom = NS_Atomize(aProp);
   NS_ENSURE_TRUE(styleAtom, NS_ERROR_OUT_OF_MEMORY);
 
   return aEditor->SetInlineProperty(styleAtom, EmptyString(), EmptyString());
 }
--- a/editor/libeditor/nsEditor.cpp
+++ b/editor/libeditor/nsEditor.cpp
@@ -1192,17 +1192,17 @@ nsEditor::CanPasteTransferable(nsITransf
 }
 
 NS_IMETHODIMP
 nsEditor::SetAttribute(nsIDOMElement* aElement, const nsAString& aAttribute,
                        const nsAString& aValue)
 {
   nsCOMPtr<Element> element = do_QueryInterface(aElement);
   NS_ENSURE_TRUE(element, NS_ERROR_NULL_POINTER);
-  nsCOMPtr<nsIAtom> attribute = do_GetAtom(aAttribute);
+  nsCOMPtr<nsIAtom> attribute = NS_Atomize(aAttribute);
 
   RefPtr<ChangeAttributeTxn> txn =
     CreateTxnForSetAttribute(*element, *attribute, aValue);
   return DoTransaction(txn);
 }
 
 NS_IMETHODIMP
 nsEditor::GetAttributeValue(nsIDOMElement *aElement,
@@ -1225,17 +1225,17 @@ nsEditor::GetAttributeValue(nsIDOMElemen
   return rv;
 }
 
 NS_IMETHODIMP
 nsEditor::RemoveAttribute(nsIDOMElement* aElement, const nsAString& aAttribute)
 {
   nsCOMPtr<Element> element = do_QueryInterface(aElement);
   NS_ENSURE_TRUE(element, NS_ERROR_NULL_POINTER);
-  nsCOMPtr<nsIAtom> attribute = do_GetAtom(aAttribute);
+  nsCOMPtr<nsIAtom> attribute = NS_Atomize(aAttribute);
 
   RefPtr<ChangeAttributeTxn> txn =
     CreateTxnForRemoveAttribute(*element, *attribute);
   return DoTransaction(txn);
 }
 
 
 bool
@@ -1326,17 +1326,17 @@ NS_IMETHODIMP nsEditor::SetSpellcheckUse
 }
 
 NS_IMETHODIMP
 nsEditor::CreateNode(const nsAString& aTag,
                      nsIDOMNode* aParent,
                      int32_t aPosition,
                      nsIDOMNode** aNewNode)
 {
-  nsCOMPtr<nsIAtom> tag = do_GetAtom(aTag);
+  nsCOMPtr<nsIAtom> tag = NS_Atomize(aTag);
   nsCOMPtr<nsINode> parent = do_QueryInterface(aParent);
   NS_ENSURE_STATE(parent);
   *aNewNode = GetAsDOMNode(CreateNode(tag, parent, aPosition).take());
   NS_ENSURE_STATE(*aNewNode);
   return NS_OK;
 }
 
 already_AddRefed<Element>
--- a/editor/libeditor/nsHTMLAnonymousUtils.cpp
+++ b/editor/libeditor/nsHTMLAnonymousUtils.cpp
@@ -144,17 +144,17 @@ nsHTMLEditor::CreateAnonymousElement(con
   NS_ENSURE_TRUE(doc, NS_ERROR_NULL_POINTER);
 
   // Get the pres shell
   nsCOMPtr<nsIPresShell> ps = GetPresShell();
   NS_ENSURE_TRUE(ps, NS_ERROR_NOT_INITIALIZED);
 
   // Create a new node through the element factory
   nsCOMPtr<Element> newContent =
-    CreateHTMLContent(nsCOMPtr<nsIAtom>(do_GetAtom(aTag)));
+    CreateHTMLContent(nsCOMPtr<nsIAtom>(NS_Atomize(aTag)));
   NS_ENSURE_STATE(newContent);
 
   nsCOMPtr<nsIDOMElement> newElement = do_QueryInterface(newContent);
   NS_ENSURE_TRUE(newElement, NS_ERROR_FAILURE);
 
   // add the "hidden" class if needed
   nsresult res;
   if (aIsCreatedHidden) {
@@ -294,17 +294,17 @@ nsHTMLEditor::CheckSelectionStateForAnon
     return NS_OK;
   }
 
   // what's its tag?
   nsAutoString focusTagName;
   res = focusElement->GetTagName(focusTagName);
   NS_ENSURE_SUCCESS(res, res);
   ToLowerCase(focusTagName);
-  nsCOMPtr<nsIAtom> focusTagAtom = do_GetAtom(focusTagName);
+  nsCOMPtr<nsIAtom> focusTagAtom = NS_Atomize(focusTagName);
 
   nsCOMPtr<nsIDOMElement> absPosElement;
   if (mIsAbsolutelyPositioningEnabled) {
     // Absolute Positioning support is enabled, is the selection contained
     // in an absolutely positioned element ?
     res = GetAbsolutelyPositionedSelectionContainer(getter_AddRefs(absPosElement));
     NS_ENSURE_SUCCESS(res, res);
   }
--- a/editor/libeditor/nsHTMLCSSUtils.cpp
+++ b/editor/libeditor/nsHTMLCSSUtils.cpp
@@ -617,17 +617,17 @@ nsHTMLCSSUtils::GetDefaultLengthUnit(nsA
 // implemented... We need then a way to determine the number part and the unit
 // from aString, aString being the result of a GetPropertyValue query...
 void
 nsHTMLCSSUtils::ParseLength(const nsAString& aString, float* aValue,
                             nsIAtom** aUnit)
 {
   if (aString.IsEmpty()) {
     *aValue = 0;
-    *aUnit = NS_NewAtom(aString).take();
+    *aUnit = NS_Atomize(aString).take();
     return;
   }
 
   nsAString::const_iterator iter;
   aString.BeginReading(iter);
 
   float a = 10.0f , b = 1.0f, value = 0;
   int8_t sign = 1;
@@ -656,17 +656,17 @@ nsHTMLCSSUtils::ParseLength(const nsAStr
       floatingPointFound = true;
       a = 1.0f; b = 0.1f;
     }
     else break;
     iter++;
     i++;
   }
   *aValue = value * sign;
-  *aUnit = NS_NewAtom(StringTail(aString, j-i)).take();
+  *aUnit = NS_Atomize(StringTail(aString, j-i)).take();
 }
 
 void
 nsHTMLCSSUtils::GetCSSPropertyAtom(nsCSSEditableProperty aProperty, nsIAtom ** aAtom)
 {
   *aAtom = nullptr;
   switch (aProperty) {
     case eCSSEditableProperty_background_color:
--- a/editor/libeditor/nsHTMLEditRules.cpp
+++ b/editor/libeditor/nsHTMLEditRules.cpp
@@ -3019,30 +3019,30 @@ nsHTMLEditRules::WillMakeList(Selection*
                               const nsAString* aBulletType,
                               bool* aCancel,
                               bool* aHandled,
                               const nsAString* aItemType)
 {
   if (!aSelection || !aListType || !aCancel || !aHandled) {
     return NS_ERROR_NULL_POINTER;
   }
-  OwningNonNull<nsIAtom> listType = do_GetAtom(*aListType);
+  OwningNonNull<nsIAtom> listType = NS_Atomize(*aListType);
 
   nsresult res = WillInsert(aSelection, aCancel);
   NS_ENSURE_SUCCESS(res, res);
 
   // initialize out param
   // we want to ignore result of WillInsert()
   *aCancel = false;
   *aHandled = false;
 
   // deduce what tag to use for list items
   nsCOMPtr<nsIAtom> itemType;
   if (aItemType) {
-    itemType = do_GetAtom(*aItemType);
+    itemType = NS_Atomize(*aItemType);
     NS_ENSURE_TRUE(itemType, NS_ERROR_OUT_OF_MEMORY);
   } else if (listType == nsGkAtoms::dl) {
     itemType = nsGkAtoms::dd;
   } else {
     itemType = nsGkAtoms::li;
   }
 
   // convert the selection ranges into "promoted" selection ranges:
@@ -3395,17 +3395,17 @@ nsHTMLEditRules::WillMakeDefListItem(Sel
 }
 
 nsresult
 nsHTMLEditRules::WillMakeBasicBlock(Selection* aSelection,
                                     const nsAString *aBlockType,
                                     bool *aCancel,
                                     bool *aHandled)
 {
-  OwningNonNull<nsIAtom> blockType = do_GetAtom(*aBlockType);
+  OwningNonNull<nsIAtom> blockType = NS_Atomize(*aBlockType);
   if (!aSelection || !aCancel || !aHandled) { return NS_ERROR_NULL_POINTER; }
   // initialize out param
   *aCancel = false;
   *aHandled = false;
 
   nsresult res = WillInsert(aSelection, aCancel);
   NS_ENSURE_SUCCESS(res, res);
   // initialize out param
@@ -8713,17 +8713,17 @@ nsHTMLEditRules::RelativeChangeIndentati
   float f;
   nsCOMPtr<nsIAtom> unit;
   NS_ENSURE_STATE(mHTMLEditor);
   mHTMLEditor->mHTMLCSSUtils->ParseLength(value, &f, getter_AddRefs(unit));
   if (0 == f) {
     nsAutoString defaultLengthUnit;
     NS_ENSURE_STATE(mHTMLEditor);
     mHTMLEditor->mHTMLCSSUtils->GetDefaultLengthUnit(defaultLengthUnit);
-    unit = do_GetAtom(defaultLengthUnit);
+    unit = NS_Atomize(defaultLengthUnit);
   }
   if        (nsGkAtoms::in == unit) {
             f += NS_EDITOR_INDENT_INCREMENT_IN * aRelativeChange;
   } else if (nsGkAtoms::cm == unit) {
             f += NS_EDITOR_INDENT_INCREMENT_CM * aRelativeChange;
   } else if (nsGkAtoms::mm == unit) {
             f += NS_EDITOR_INDENT_INCREMENT_MM * aRelativeChange;
   } else if (nsGkAtoms::pt == unit) {
--- a/editor/libeditor/nsHTMLEditor.cpp
+++ b/editor/libeditor/nsHTMLEditor.cpp
@@ -1962,17 +1962,17 @@ nsHTMLEditor::MakeOrChangeList(const nsA
     int32_t offset = selection->GetRangeAt(0)->StartOffset();
 
     if (isCollapsed)
     {
       // have to find a place to put the list
       nsCOMPtr<nsIContent> parent = node;
       nsCOMPtr<nsIContent> topChild = node;
 
-      nsCOMPtr<nsIAtom> listAtom = do_GetAtom(aListType);
+      nsCOMPtr<nsIAtom> listAtom = NS_Atomize(aListType);
       while (!CanContainTag(*parent, *listAtom)) {
         topChild = parent;
         parent = parent->GetParent();
       }
 
       if (parent != node)
       {
         // we need to split up to the child of parent
@@ -2094,17 +2094,17 @@ nsHTMLEditor::InsertBasicBlock(const nsA
     int32_t offset = selection->GetRangeAt(0)->StartOffset();
 
     if (isCollapsed)
     {
       // have to find a place to put the block
       nsCOMPtr<nsIContent> parent = node;
       nsCOMPtr<nsIContent> topChild = node;
 
-      nsCOMPtr<nsIAtom> blockAtom = do_GetAtom(aBlockType);
+      nsCOMPtr<nsIAtom> blockAtom = NS_Atomize(aBlockType);
       while (!CanContainTag(*parent, *blockAtom)) {
         NS_ENSURE_TRUE(parent->GetParent(), NS_ERROR_FAILURE);
         topChild = parent;
         parent = parent->GetParent();
       }
 
       if (parent != node)
       {
@@ -2549,17 +2549,17 @@ nsHTMLEditor::CreateElementWithDefaults(
   } else {
     realTagName = tagName;
   }
   // We don't use editor's CreateElement because we don't want to go through
   // the transaction system
 
   // New call to use instead to get proper HTML element, bug 39919
   nsCOMPtr<Element> newElement =
-    CreateHTMLContent(nsCOMPtr<nsIAtom>(do_GetAtom(realTagName)));
+    CreateHTMLContent(nsCOMPtr<nsIAtom>(NS_Atomize(realTagName)));
   if (!newElement) {
     return nullptr;
   }
 
   // Mark the new element dirty, so it will be formatted
   ErrorResult rv;
   newElement->SetAttribute(NS_LITERAL_STRING("_moz_dirty"), EmptyString(), rv);
 
@@ -4483,17 +4483,17 @@ nsHTMLEditor::SetAttributeOrEquivalent(n
 nsresult
 nsHTMLEditor::RemoveAttributeOrEquivalent(nsIDOMElement* aElement,
                                           const nsAString& aAttribute,
                                           bool aSuppressTransaction)
 {
   nsCOMPtr<dom::Element> element = do_QueryInterface(aElement);
   NS_ENSURE_TRUE(element, NS_OK);
 
-  nsCOMPtr<nsIAtom> attribute = do_GetAtom(aAttribute);
+  nsCOMPtr<nsIAtom> attribute = NS_Atomize(aAttribute);
   MOZ_ASSERT(attribute);
 
   nsresult res = NS_OK;
   if (IsCSSEnabled() && mHTMLCSSUtils) {
     res = mHTMLCSSUtils->RemoveCSSEquivalentToHTMLStyle(
         element, nullptr, &aAttribute, nullptr, aSuppressTransaction);
     NS_ENSURE_SUCCESS(res, res);
   }
--- a/editor/libeditor/nsHTMLEditorStyle.cpp
+++ b/editor/libeditor/nsHTMLEditorStyle.cpp
@@ -257,17 +257,17 @@ nsHTMLEditor::IsSimpleModifiableNode(nsI
         element->IsHTMLElement(nsGkAtoms::em)) ||
        (aProperty == nsGkAtoms::strike &&
         element->IsHTMLElement(nsGkAtoms::s)))) {
     return true;
   }
 
   // Now look for things like <font>
   if (aAttribute && !aAttribute->IsEmpty()) {
-    nsCOMPtr<nsIAtom> atom = do_GetAtom(*aAttribute);
+    nsCOMPtr<nsIAtom> atom = NS_Atomize(*aAttribute);
     MOZ_ASSERT(atom);
 
     nsString attrValue;
     if (element->IsHTMLElement(aProperty) &&
         IsOnlyAttribute(element, *aAttribute) &&
         element->GetAttr(kNameSpaceID_None, atom, attrValue) &&
         attrValue.Equals(*aValue, nsCaseInsensitiveStringComparator())) {
       // This is not quite correct, because it excludes cases like
@@ -368,17 +368,17 @@ nsHTMLEditor::SetInlinePropertyOnTextNod
 
 
 nsresult
 nsHTMLEditor::SetInlinePropertyOnNodeImpl(nsIContent& aNode,
                                           nsIAtom& aProperty,
                                           const nsAString* aAttribute,
                                           const nsAString& aValue)
 {
-  nsCOMPtr<nsIAtom> attrAtom = aAttribute ? do_GetAtom(*aAttribute) : nullptr;
+  nsCOMPtr<nsIAtom> attrAtom = aAttribute ? NS_Atomize(*aAttribute) : nullptr;
 
   // If this is an element that can't be contained in a span, we have to
   // recurse to its children.
   if (!TagCanContain(*nsGkAtoms::span, aNode)) {
     if (aNode.HasChildren()) {
       nsTArray<OwningNonNull<nsIContent>> arrayOfNodes;
 
       // Populate the list.
@@ -792,17 +792,17 @@ nsHTMLEditor::RemoveStyleInside(nsIConte
         NS_ENSURE_SUCCESS(res, res);
         res = CloneAttribute(classAttr, spanNode->AsDOMNode(), aNode.AsDOMNode());
         NS_ENSURE_SUCCESS(res, res);
       }
       res = RemoveContainer(&aNode);
       NS_ENSURE_SUCCESS(res, res);
     } else {
       // otherwise we just want to eliminate the attribute
-      nsCOMPtr<nsIAtom> attribute = do_GetAtom(*aAttribute);
+      nsCOMPtr<nsIAtom> attribute = NS_Atomize(*aAttribute);
       if (aNode.HasAttr(kNameSpaceID_None, attribute)) {
         // if this matching attribute is the ONLY one on the node,
         // then remove the whole node.  Otherwise just nix the attribute.
         if (IsOnlyAttribute(&aNode, *aAttribute)) {
           res = RemoveContainer(&aNode);
         } else {
           nsCOMPtr<nsIDOMElement> elem = do_QueryInterface(&aNode);
           NS_ENSURE_TRUE(elem, NS_ERROR_NULL_POINTER);
@@ -895,17 +895,17 @@ bool nsHTMLEditor::HasAttr(nsIDOMNode* a
     // everybody has the 'null' attribute
     return true;
   }
 
   // get element
   nsCOMPtr<dom::Element> element = do_QueryInterface(aNode);
   NS_ENSURE_TRUE(element, false);
 
-  nsCOMPtr<nsIAtom> atom = do_GetAtom(*aAttribute);
+  nsCOMPtr<nsIAtom> atom = NS_Atomize(*aAttribute);
   NS_ENSURE_TRUE(atom, false);
 
   return element->HasAttr(kNameSpaceID_None, atom);
 }
 
 
 nsresult
 nsHTMLEditor::PromoteRangeIfStartsOrEndsInNamedAnchor(nsRange* inRange)
--- a/embedding/browser/nsDocShellTreeOwner.cpp
+++ b/embedding/browser/nsDocShellTreeOwner.cpp
@@ -1079,17 +1079,17 @@ protected:
 };
 
 NS_IMPL_ISUPPORTS(DefaultTooltipTextProvider, nsITooltipTextProvider)
 
 DefaultTooltipTextProvider::DefaultTooltipTextProvider()
 {
   // There are certain element types which we don't want to use
   // as tool tip text.
-  mTag_dialogHeader = do_GetAtom("dialogheader");
+  mTag_dialogHeader = NS_Atomize("dialogheader");
 }
 
 // A helper routine that determines whether we're still interested in SVG
 // titles. We need to stop at the SVG root element that has a document node
 // parent.
 static bool
 UseSVGTitle(nsIDOMElement* aCurrElement)
 {
@@ -1116,23 +1116,23 @@ DefaultTooltipTextProvider::GetNodeText(
   bool found = false;
   nsCOMPtr<nsIDOMNode> current(aNode);
 
   // If the element implement the constraint validation API and has no title,
   // show the validation message, if any.
   nsCOMPtr<nsIConstraintValidation> cvElement = do_QueryInterface(current);
   if (cvElement) {
     nsCOMPtr<nsIContent> content = do_QueryInterface(cvElement);
-    nsCOMPtr<nsIAtom> titleAtom = do_GetAtom("title");
+    nsCOMPtr<nsIAtom> titleAtom = NS_Atomize("title");
 
     nsCOMPtr<nsIFormControl> formControl = do_QueryInterface(content);
     bool formHasNoValidate = false;
     mozilla::dom::Element* form = formControl->GetFormElement();
     if (form) {
-      nsCOMPtr<nsIAtom> noValidateAtom = do_GetAtom("novalidate");
+      nsCOMPtr<nsIAtom> noValidateAtom = NS_Atomize("novalidate");
       formHasNoValidate = form->HasAttr(kNameSpaceID_None, noValidateAtom);
     }
 
     if (!content->HasAttr(kNameSpaceID_None, titleAtom) && !formHasNoValidate) {
       cvElement->GetValidationMessage(outText);
       found = !outText.IsEmpty();
     }
   }
--- a/gfx/src/nsDeviceContext.cpp
+++ b/gfx/src/nsDeviceContext.cpp
@@ -14,17 +14,17 @@
 #include "mozilla/gfx/PathHelpers.h"
 #include "mozilla/Preferences.h"        // for Preferences
 #include "mozilla/Services.h"           // for GetObserverService
 #include "mozilla/mozalloc.h"           // for operator new
 #include "nsCRT.h"                      // for nsCRT
 #include "nsDebug.h"                    // for NS_NOTREACHED, NS_ASSERTION, etc
 #include "nsFont.h"                     // for nsFont
 #include "nsFontMetrics.h"              // for nsFontMetrics
-#include "nsIAtom.h"                    // for nsIAtom, do_GetAtom
+#include "nsIAtom.h"                    // for nsIAtom, NS_Atomize
 #include "nsID.h"
 #include "nsIDeviceContextSpec.h"       // for nsIDeviceContextSpec
 #include "nsILanguageAtomService.h"     // for nsILanguageAtomService, etc
 #include "nsIObserver.h"                // for nsIObserver, etc
 #include "nsIObserverService.h"         // for nsIObserverService
 #include "nsIScreen.h"                  // for nsIScreen
 #include "nsIScreenManager.h"           // for nsIScreenManager
 #include "nsISupportsImpl.h"            // for MOZ_COUNT_CTOR, etc
@@ -95,17 +95,17 @@ nsFontCache::Init(nsDeviceContext* aCont
         obs->AddObserver(this, "memory-pressure", false);
 
     nsCOMPtr<nsILanguageAtomService> langService;
     langService = do_GetService(NS_LANGUAGEATOMSERVICE_CONTRACTID);
     if (langService) {
         mLocaleLanguage = langService->GetLocaleLanguage();
     }
     if (!mLocaleLanguage) {
-        mLocaleLanguage = do_GetAtom("x-western");
+        mLocaleLanguage = NS_Atomize("x-western");
     }
 }
 
 void
 nsFontCache::Destroy()
 {
     nsCOMPtr<nsIObserverService> obs = GetObserverService();
     if (obs)
--- a/gfx/src/nsThebesFontEnumerator.cpp
+++ b/gfx/src/nsThebesFontEnumerator.cpp
@@ -5,17 +5,17 @@
 
 #include "nsThebesFontEnumerator.h"
 #include <stdint.h>                     // for uint32_t
 #include "gfxPlatform.h"                // for gfxPlatform
 #include "mozilla/Assertions.h"         // for MOZ_ASSERT_HELPER2
 #include "nsCOMPtr.h"                   // for nsCOMPtr
 #include "nsDebug.h"                    // for NS_ENSURE_ARG_POINTER
 #include "nsError.h"                    // for NS_OK, NS_FAILED, nsresult
-#include "nsIAtom.h"                    // for nsIAtom, do_GetAtom
+#include "nsIAtom.h"                    // for nsIAtom, NS_Atomize
 #include "nsID.h"
 #include "nsMemory.h"                   // for nsMemory
 #include "nsString.h"               // for nsAutoCString, nsAutoString, etc
 #include "nsTArray.h"                   // for nsTArray, nsTArray_Impl, etc
 #include "nscore.h"                     // for char16_t, NS_IMETHODIMP
 
 NS_IMPL_ISUPPORTS(nsThebesFontEnumerator, nsIFontEnumerator)
 
@@ -47,17 +47,17 @@ nsThebesFontEnumerator::EnumerateFonts(c
     else
         generic.SetIsVoid(true);
 
     nsCOMPtr<nsIAtom> langGroupAtom;
     if (aLangGroup) {
         nsAutoCString lowered;
         lowered.Assign(aLangGroup);
         ToLowerCase(lowered);
-        langGroupAtom = do_GetAtom(lowered);
+        langGroupAtom = NS_Atomize(lowered);
     }
 
     nsresult rv = gfxPlatform::GetPlatform()->GetFontList(langGroupAtom, generic, fontList);
 
     if (NS_FAILED(rv)) {
         *aCount = 0;
         *aResult = nullptr;
         /* XXX in this case, do we want to return the CSS generics? */
--- a/gfx/tests/gtest/gfxFontSelectionTests.h
+++ b/gfx/tests/gtest/gfxFontSelectionTests.h
@@ -72,26 +72,26 @@ SetupTests(nsTArray<TestEntry>& testList
 {
     TestEntry *t;
 
     /* some common styles */
     gfxFontStyle style_western_normal_16 (mozilla::gfx::FontStyle::NORMAL,
                                           400,
                                           0,
                                           16.0,
-                                          NS_NewAtom(NS_LITERAL_STRING("en")),
+                                          NS_Atomize(NS_LITERAL_STRING("en")),
                                           0.0,
                                           false, false,
                                           NS_LITERAL_STRING(""));
 
     gfxFontStyle style_western_bold_16 (mozilla::gfx::FontStyle::NORMAL,
                                         700,
                                         0,
                                         16.0,
-                                        NS_NewAtom(NS_LITERAL_STRING("en")),
+                                        NS_Atomize(NS_LITERAL_STRING("en")),
                                         0.0,
                                         false, false,
                                         NS_LITERAL_STRING(""));
 
     /* Test 0 */
     t = AddTest (testList, "sans-serif",
                  style_western_normal_16,
                  S_ASCII,
--- a/gfx/tests/gtest/gfxTextRunPerfTest.cpp
+++ b/gfx/tests/gtest/gfxTextRunPerfTest.cpp
@@ -53,17 +53,17 @@ const char* lastFamilies = nullptr;
 static void
 RunTest (TestEntry *test, gfxContext *ctx) {
     RefPtr<gfxFontGroup> fontGroup;
     if (!lastFamilies || strcmp(lastFamilies, test->mFamilies)) {
         gfxFontStyle style_western_normal_16 (mozilla::gfx::FontStyle::NORMAL,
                                               400,
                                               0,
                                               16.0,
-                                              NS_NewAtom(NS_LITERAL_STRING("en")),
+                                              NS_Atomize(NS_LITERAL_STRING("en")),
                                               0.0,
                                               false, false,
                                               NS_LITERAL_STRING(""));
 
         fontGroup = gfxPlatform::GetPlatform()->CreateFontGroup(NS_ConvertUTF8toUTF16(test->mFamilies), &style_western_normal_16, nullptr, nullptr, 1.0);
     }
 
     nsAutoPtr<gfxTextRun> textRun;
--- a/gfx/tests/gtest/gfxWordCacheTest.cpp
+++ b/gfx/tests/gtest/gfxWordCacheTest.cpp
@@ -96,17 +96,17 @@ TEST(Gfx, WordCache) {
   gTextRuns = new FrameTextRunCache();
 
   RefPtr<DrawTarget> dt = MakeDrawTarget();
   {
     gfxFontStyle style(mozilla::gfx::FontStyle::NORMAL,
                        139,
                        10.0,
                        0,
-                       NS_NewAtom(NS_LITERAL_STRING("en")),
+                       NS_Atomize(NS_LITERAL_STRING("en")),
                        0.0,
                        false, false,
                        NS_LITERAL_STRING(""));
 
     RefPtr<gfxFontGroup> fontGroup =
       gfxPlatform::GetPlatform()->CreateFontGroup(
         NS_LITERAL_STRING("Geneva, MS Sans Serif, Helvetica,serif"), &style,
         nullptr, nullptr, 1.0);
--- a/gfx/thebes/gfxFontconfigFonts.cpp
+++ b/gfx/thebes/gfxFontconfigFonts.cpp
@@ -1261,17 +1261,17 @@ gfxPangoFontGroup::gfxPangoFontGroup(con
                                      gfxUserFontSet *aUserFontSet,
                                      gfxFloat aDevToCssSize)
     : gfxFontGroup(aFontFamilyList, aStyle, nullptr, aUserFontSet, aDevToCssSize),
       mPangoLanguage(GuessPangoLanguage(aStyle->language))
 {
     // This language is passed to the font for shaping.
     // Shaping doesn't know about lang groups so make it a real language.
     if (mPangoLanguage) {
-        mStyle.language = do_GetAtom(pango_language_to_string(mPangoLanguage));
+        mStyle.language = NS_Atomize(pango_language_to_string(mPangoLanguage));
     }
 
     // dummy entry, will be replaced when actually needed
     mFonts.AppendElement(FamilyFace());
     mSkipUpdateUserFonts = true;
 }
 
 gfxPangoFontGroup::~gfxPangoFontGroup()
@@ -1486,17 +1486,17 @@ already_AddRefed<gfxFcFontSet>
 gfxPangoFontGroup::MakeFontSet(PangoLanguage *aLang, gfxFloat aSizeAdjustFactor,
                                nsAutoRef<FcPattern> *aMatchPattern)
 {
     const char *lang = pango_language_to_string(aLang);
 
     RefPtr<nsIAtom> langGroup;
     if (aLang != mPangoLanguage) {
         // Set up langGroup for Mozilla's font prefs.
-        langGroup = do_GetAtom(lang);
+        langGroup = NS_Atomize(lang);
     }
 
     AutoTArray<nsString, 20> fcFamilyList;
     EnumerateFontListPFG(langGroup ? langGroup.get() : mStyle.language.get(),
                          &fcFamilyList);
 
     // To consider: A fontset cache here could be helpful.
 
--- a/intl/hyphenation/glue/nsHyphenationManager.cpp
+++ b/intl/hyphenation/glue/nsHyphenationManager.cpp
@@ -107,17 +107,17 @@ nsHyphenationManager::GetHyphenator(nsIA
       // so "de-DE-1996" -> "de-DE-*" (and then recursively -> "de-*")
       nsAtomCString localeStr(aLocale);
       if (StringEndsWith(localeStr, NS_LITERAL_CSTRING("-*"))) {
         localeStr.Truncate(localeStr.Length() - 2);
       }
       int32_t i = localeStr.RFindChar('-');
       if (i > 1) {
         localeStr.Replace(i, localeStr.Length() - i, "-*");
-        nsCOMPtr<nsIAtom> fuzzyLocale = do_GetAtom(localeStr);
+        nsCOMPtr<nsIAtom> fuzzyLocale = NS_Atomize(localeStr);
         return GetHyphenator(fuzzyLocale);
       } else {
         return nullptr;
       }
     }
   }
   hyph = new nsHyphenator(uri);
   if (hyph->IsValid()) {
@@ -211,17 +211,17 @@ nsHyphenationManager::LoadPatternListFro
     if (StringBeginsWith(locale, NS_LITERAL_CSTRING("hyph_"))) {
       locale.Cut(0, 5);
     }
     for (uint32_t i = 0; i < locale.Length(); ++i) {
       if (locale[i] == '_') {
         locale.Replace(i, 1, '-');
       }
     }
-    nsCOMPtr<nsIAtom> localeAtom = do_GetAtom(locale);
+    nsCOMPtr<nsIAtom> localeAtom = NS_Atomize(locale);
     if (NS_SUCCEEDED(rv)) {
       mPatternFiles.Put(localeAtom, uri);
     }
   }
 
   delete find;
 }
 
@@ -269,17 +269,17 @@ nsHyphenationManager::LoadPatternListFro
       if (locale[i] == '_') {
         locale.Replace(i, 1, '-');
       }
     }
 #ifdef DEBUG_hyph
     printf("adding hyphenation patterns for %s: %s\n", locale.get(),
            NS_ConvertUTF16toUTF8(dictName).get());
 #endif
-    nsCOMPtr<nsIAtom> localeAtom = do_GetAtom(locale);
+    nsCOMPtr<nsIAtom> localeAtom = NS_Atomize(locale);
     nsCOMPtr<nsIURI> uri;
     nsresult rv = NS_NewFileURI(getter_AddRefs(uri), file);
     if (NS_SUCCEEDED(rv)) {
       mPatternFiles.Put(localeAtom, uri);
     }
   }
 }
 
@@ -297,16 +297,16 @@ nsHyphenationManager::LoadAliases()
   if (NS_SUCCEEDED(rv) && prefCount > 0) {
     for (uint32_t i = 0; i < prefCount; ++i) {
       nsAdoptingCString value = Preferences::GetCString(prefNames[i]);
       if (value) {
         nsAutoCString alias(prefNames[i]);
         alias.Cut(0, sizeof(kIntlHyphenationAliasPrefix) - 1);
         ToLowerCase(alias);
         ToLowerCase(value);
-        nsCOMPtr<nsIAtom> aliasAtom = do_GetAtom(alias);
-        nsCOMPtr<nsIAtom> valueAtom = do_GetAtom(value);
+        nsCOMPtr<nsIAtom> aliasAtom = NS_Atomize(alias);
+        nsCOMPtr<nsIAtom> valueAtom = NS_Atomize(value);
         mHyphAliases.Put(aliasAtom, valueAtom);
       }
     }
     NS_FREE_XPCOM_ALLOCATED_POINTER_ARRAY(prefCount, prefNames);
   }
 }
--- a/intl/locale/nsLanguageAtomService.cpp
+++ b/intl/locale/nsLanguageAtomService.cpp
@@ -27,26 +27,26 @@ nsLanguageAtomService::nsLanguageAtomSer
 
 nsIAtom*
 nsLanguageAtomService::LookupLanguage(const nsACString &aLanguage,
                                       nsresult *aError)
 {
   nsAutoCString lowered(aLanguage);
   ToLowerCase(lowered);
 
-  nsCOMPtr<nsIAtom> lang = do_GetAtom(lowered);
+  nsCOMPtr<nsIAtom> lang = NS_Atomize(lowered);
   return GetLanguageGroup(lang, aError);
 }
 
 already_AddRefed<nsIAtom>
 nsLanguageAtomService::LookupCharSet(const nsACString& aCharSet)
 {
   nsAutoCString group;
   mozilla::dom::EncodingUtils::LangGroupForEncoding(aCharSet, group);
-  return do_GetAtom(group);
+  return NS_Atomize(group);
 }
 
 nsIAtom*
 nsLanguageAtomService::GetLocaleLanguage(nsresult *aError)
 {
   nsresult res = NS_OK;
 
   do {
@@ -64,17 +64,17 @@ nsLanguageAtomService::GetLocaleLanguage
         break;
 
       nsAutoString loc;
       res = locale->GetCategory(NS_LITERAL_STRING(NSILOCALE_MESSAGE), loc);
       if (NS_FAILED(res))
         break;
 
       ToLowerCase(loc); // use lowercase for all language atoms
-      mLocaleLanguage = do_GetAtom(loc);
+      mLocaleLanguage = NS_Atomize(loc);
     }
   } while (0);
 
   if (aError)
     *aError = res;
 
   return mLocaleLanguage;
 }
@@ -103,17 +103,17 @@ nsLanguageAtomService::GetLanguageGroup(
         break;
       }
       langStr.Truncate(hyphen);
       res = nsUConvPropertySearch::SearchPropertyValue(kLangGroups,
                                                        ArrayLength(kLangGroups),
                                                        langStr, langGroupStr);
     }
 
-    nsCOMPtr<nsIAtom> langGroup = do_GetAtom(langGroupStr);
+    nsCOMPtr<nsIAtom> langGroup = NS_Atomize(langGroupStr);
 
     // The hashtable will keep an owning reference to the atom
     mLangToGroup.Put(aLanguage, langGroup);
     retVal = langGroup.get();
   }
 
   if (aError) {
     *aError = res;
--- a/js/xpconnect/src/XPCConvert.cpp
+++ b/js/xpconnect/src/XPCConvert.cpp
@@ -688,17 +688,17 @@ XPCConvert::JSData2Native(void* d, Handl
             // We're trying to pass a string as an nsIAtom.  Let's atomize!
             JSString* str = s.toString();
             nsAutoJSString autoStr;
             if (!autoStr.init(cx, str)) {
                 if (pErr)
                     *pErr = NS_ERROR_XPC_BAD_CONVERT_JS_NULL_REF;
                 return false;
             }
-            nsCOMPtr<nsIAtom> atom = NS_NewAtom(autoStr);
+            nsCOMPtr<nsIAtom> atom = NS_Atomize(autoStr);
             atom.forget((nsISupports**)d);
             return true;
         }
         //else ...
 
         if (s.isNullOrUndefined()) {
             *((nsISupports**)d) = nullptr;
             return true;
--- a/layout/base/nsCSSFrameConstructor.cpp
+++ b/layout/base/nsCSSFrameConstructor.cpp
@@ -1650,24 +1650,24 @@ nsCSSFrameConstructor::CreateGeneratedCo
         contentString.Left(nameSpaceVal, barIndex);
         nsresult error;
         attrNameSpace = nameSpaceVal.ToInteger(&error);
         contentString.Cut(0, barIndex + 1);
         if (contentString.Length()) {
           if (mDocument->IsHTMLDocument() && aParentContent->IsHTMLElement()) {
             ToLowerCase(contentString);
           }
-          attrName = do_GetAtom(contentString);
+          attrName = NS_Atomize(contentString);
         }
       }
       else {
         if (mDocument->IsHTMLDocument() && aParentContent->IsHTMLElement()) {
           ToLowerCase(contentString);
         }
-        attrName = do_GetAtom(contentString);
+        attrName = NS_Atomize(contentString);
       }
 
       if (!attrName) {
         return nullptr;
       }
 
       nsCOMPtr<nsIContent> content;
       NS_NewAttributeContent(mDocument->NodeInfoManager(),
--- a/layout/base/nsPresContext.cpp
+++ b/layout/base/nsPresContext.cpp
@@ -1519,17 +1519,17 @@ nsPresContext::GetContentLanguage() cons
   nsAutoString language;
   Document()->GetContentLanguage(language);
   language.StripWhitespace();
 
   // Content-Language may be a comma-separated list of language codes,
   // in which case the HTML5 spec says to treat it as unknown
   if (!language.IsEmpty() &&
       !language.Contains(char16_t(','))) {
-    return do_GetAtom(language);
+    return NS_Atomize(language);
     // NOTE:  This does *not* count as an explicit language; in other
     // words, it doesn't trigger language-specific hyphenation.
   }
   return nullptr;
 }
 
 void
 nsPresContext::SetFullZoom(float aZoom)
@@ -2009,17 +2009,17 @@ void
 nsPresContext::EmulateMedium(const nsAString& aMediaType)
 {
   nsIAtom* previousMedium = Medium();
   mIsEmulatingMedia = true;
 
   nsAutoString mediaType;
   nsContentUtils::ASCIIToLower(aMediaType, mediaType);
 
-  mMediaEmulated = do_GetAtom(mediaType);
+  mMediaEmulated = NS_Atomize(mediaType);
   if (mMediaEmulated != previousMedium && mShell) {
     MediaFeatureValuesChanged(nsRestyleHint(0), nsChangeHint(0));
   }
 }
 
 void nsPresContext::StopEmulatingMedium()
 {
   nsIAtom* previousMedium = Medium();
--- a/layout/forms/nsComboboxControlFrame.cpp
+++ b/layout/forms/nsComboboxControlFrame.cpp
@@ -1199,17 +1199,17 @@ nsComboboxControlFrame::CreateAnonymousC
   // Note: The value attribute of the display content is set when an item is selected in the dropdown list.
   // If the content specified below does not honor the value attribute than nothing will be displayed.
 
   // For now the content that is created corresponds to two input buttons. It would be better to create the
   // tag as something other than input, but then there isn't any way to create a button frame since it
   // isn't possible to set the display type in CSS2 to create a button frame.
 
     // create content used for display
-  //nsIAtom* tag = NS_NewAtom("mozcombodisplay");
+  //nsIAtom* tag = NS_Atomize("mozcombodisplay");
 
   // Add a child text content node for the label
 
   nsNodeInfoManager *nimgr = mContent->NodeInfo()->NodeInfoManager();
 
   mDisplayContent = new nsTextNode(nimgr);
 
   // set the value of the text node
--- a/layout/generic/nsTextRunTransformations.cpp
+++ b/layout/generic/nsTextRunTransformations.cpp
@@ -259,17 +259,17 @@ GetCasingFor(const nsIAtom* aLang)
     return eLSCB_Irish;
   }
 
   // Is there a region subtag we should ignore?
   nsAtomString langStr(const_cast<nsIAtom*>(aLang));
   int index = langStr.FindChar('-');
   if (index > 0) {
     langStr.Truncate(index);
-    nsCOMPtr<nsIAtom> truncatedLang = do_GetAtom(langStr);
+    nsCOMPtr<nsIAtom> truncatedLang = NS_Atomize(langStr);
     return GetCasingFor(truncatedLang);
   }
 
   return eLSCB_None;
 }
 
 bool
 nsCaseTransformTextRunFactory::TransformString(
--- a/layout/inspector/inDOMUtils.cpp
+++ b/layout/inspector/inDOMUtils.cpp
@@ -225,17 +225,17 @@ inDOMUtils::GetCSSStyleRules(nsIDOMEleme
                              nsISupportsArray **_retval)
 {
   NS_ENSURE_ARG_POINTER(aElement);
 
   *_retval = nullptr;
 
   nsCOMPtr<nsIAtom> pseudoElt;
   if (!aPseudo.IsEmpty()) {
-    pseudoElt = do_GetAtom(aPseudo);
+    pseudoElt = NS_Atomize(aPseudo);
   }
 
   nsRuleNode* ruleNode = nullptr;
   nsCOMPtr<Element> element = do_QueryInterface(aElement);
   NS_ENSURE_STATE(element);
   RefPtr<nsStyleContext> styleContext;
   GetRuleNodeForElement(element, pseudoElt, getter_AddRefs(styleContext), &ruleNode);
   if (!ruleNode) {
@@ -450,17 +450,17 @@ inDOMUtils::SelectorMatchesElement(nsIDO
   if (aPseudo.IsEmpty() == sel->mSelectors->IsPseudoElement()) {
     *aMatches = false;
     return NS_OK;
   }
 
   if (!aPseudo.IsEmpty()) {
     // We need to make sure that the requested pseudo element type
     // matches the selector pseudo element type before proceeding.
-    nsCOMPtr<nsIAtom> pseudoElt = do_GetAtom(aPseudo);
+    nsCOMPtr<nsIAtom> pseudoElt = NS_Atomize(aPseudo);
     if (sel->mSelectors->PseudoType() !=
         nsCSSPseudoElements::GetPseudoType(pseudoElt)) {
       *aMatches = false;
       return NS_OK;
     }
 
     // We have a matching pseudo element, now remove it so we can compare
     // directly against |element| when proceeding into SelectorListMatches.
@@ -1197,17 +1197,17 @@ GetStatesForPseudoClass(const nsAString&
     // index out of bounds into this array no matter what.
     EventStates(),
     EventStates()
   };
   static_assert(MOZ_ARRAY_LENGTH(sPseudoClassStates) ==
                 nsCSSPseudoClasses::ePseudoClass_NotPseudoClass + 1,
                 "Length of PseudoClassStates array is incorrect");
 
-  nsCOMPtr<nsIAtom> atom = do_GetAtom(aStatePseudo);
+  nsCOMPtr<nsIAtom> atom = NS_Atomize(aStatePseudo);
 
   // Ignore :moz-any-link so we don't give the element simultaneous
   // visited and unvisited style state
   if (nsCSSPseudoClasses::GetPseudoType(atom) ==
       nsCSSPseudoClasses::ePseudoClass_mozAnyLink) {
     return EventStates();
   }
   // Our array above is long enough that indexing into it with
--- a/layout/style/StyleRule.cpp
+++ b/layout/style/StyleRule.cpp
@@ -62,17 +62,17 @@ nsAtomList::nsAtomList(nsIAtom* aAtom)
   MOZ_COUNT_CTOR(nsAtomList);
 }
 
 nsAtomList::nsAtomList(const nsString& aAtomValue)
   : mAtom(nullptr),
     mNext(nullptr)
 {
   MOZ_COUNT_CTOR(nsAtomList);
-  mAtom = do_GetAtom(aAtomValue);
+  mAtom = NS_Atomize(aAtomValue);
 }
 
 nsAtomList*
 nsAtomList::Clone(bool aDeep) const
 {
   nsAtomList *result = new nsAtomList(mAtom);
   if (!result)
     return nullptr;
@@ -224,18 +224,18 @@ nsAttrSelector::nsAttrSelector(int32_t a
     // mValueCaseSensitivity doesn't matter; we have no value.
     mValueCaseSensitivity(ValueCaseSensitivity::CaseSensitive)
 {
   MOZ_COUNT_CTOR(nsAttrSelector);
 
   nsAutoString lowercase;
   nsContentUtils::ASCIIToLower(aAttr, lowercase);
   
-  mCasedAttr = do_GetAtom(aAttr);
-  mLowercaseAttr = do_GetAtom(lowercase);
+  mCasedAttr = NS_Atomize(aAttr);
+  mLowercaseAttr = NS_Atomize(lowercase);
 }
 
 nsAttrSelector::nsAttrSelector(int32_t aNameSpace, const nsString& aAttr, uint8_t aFunction, 
                                const nsString& aValue,
                                ValueCaseSensitivity aValueCaseSensitivity)
   : mValue(aValue),
     mNext(nullptr),
     mLowercaseAttr(nullptr),
@@ -244,18 +244,18 @@ nsAttrSelector::nsAttrSelector(int32_t a
     mFunction(aFunction),
     mValueCaseSensitivity(aValueCaseSensitivity)
 {
   MOZ_COUNT_CTOR(nsAttrSelector);
 
   nsAutoString lowercase;
   nsContentUtils::ASCIIToLower(aAttr, lowercase);
   
-  mCasedAttr = do_GetAtom(aAttr);
-  mLowercaseAttr = do_GetAtom(lowercase);
+  mCasedAttr = NS_Atomize(aAttr);
+  mLowercaseAttr = NS_Atomize(lowercase);
 }
 
 nsAttrSelector::nsAttrSelector(int32_t aNameSpace,  nsIAtom* aLowercaseAttr,
                                nsIAtom* aCasedAttr, uint8_t aFunction, 
                                const nsString& aValue,
                                ValueCaseSensitivity aValueCaseSensitivity)
   : mValue(aValue),
     mNext(nullptr),
@@ -387,21 +387,21 @@ void nsCSSSelector::SetNameSpace(int32_t
 
 void nsCSSSelector::SetTag(const nsString& aTag)
 {
   if (aTag.IsEmpty()) {
     mLowercaseTag = mCasedTag =  nullptr;
     return;
   }
 
-  mCasedTag = do_GetAtom(aTag);
+  mCasedTag = NS_Atomize(aTag);
  
   nsAutoString lowercase;
   nsContentUtils::ASCIIToLower(aTag, lowercase);
-  mLowercaseTag = do_GetAtom(lowercase);
+  mLowercaseTag = NS_Atomize(lowercase);
 }
 
 void nsCSSSelector::AddID(const nsString& aID)
 {
   if (!aID.IsEmpty()) {
     nsAtomList** list = &mIDList;
     while (nullptr != *list) {
       list = &((*list)->mNext);
--- a/layout/style/nsCSSParser.cpp
+++ b/layout/style/nsCSSParser.cpp
@@ -3400,17 +3400,17 @@ CSSParserImpl::ParseMediaQuery(eMediaQue
       }
       if (eCSSToken_Ident != mToken.mType) {
         REPORT_UNEXPECTED_TOKEN(PEGatherMediaNotIdent);
         UngetToken();
         return false;
       }
       // case insensitive from CSS - must be lower cased
       nsContentUtils::ASCIIToLower(mToken.mIdent);
-      mediaType = do_GetAtom(mToken.mIdent);
+      mediaType = NS_Atomize(mToken.mIdent);
       if (!gotNotOrOnly && mediaType == nsGkAtoms::_not) {
         gotNotOrOnly = true;
         query->SetNegated();
       } else if (!gotNotOrOnly && mediaType == nsGkAtoms::only) {
         gotNotOrOnly = true;
         query->SetHasOnly();
       } else if (mediaType == nsGkAtoms::_not ||
                  mediaType == nsGkAtoms::only ||
@@ -3552,17 +3552,17 @@ CSSParserImpl::ParseMediaQueryExpression
     featureString.Rebind(featureString, 4);
   } else if (StringBeginsWith(featureString, NS_LITERAL_STRING("max-"))) {
     expr->mRange = nsMediaExpression::eMax;
     featureString.Rebind(featureString, 4);
   } else {
     expr->mRange = nsMediaExpression::eEqual;
   }
 
-  nsCOMPtr<nsIAtom> mediaFeatureAtom = do_GetAtom(featureString);
+  nsCOMPtr<nsIAtom> mediaFeatureAtom = NS_Atomize(featureString);
   const nsMediaFeature *feature = nsMediaFeatures::features;
   for (; feature->mName; ++feature) {
     // See if name matches & all requirement flags are satisfied:
     // (We check requirements by turning off all of the flags that have been
     // satisfied, and then see if the result is 0.)
     if (*(feature->mName) == mediaFeatureAtom &&
         !(feature->mReqFlags & ~satisfiedReqFlags)) {
       break;
@@ -3916,17 +3916,17 @@ CSSParserImpl::ProcessNameSpace(const ns
                                 RuleAppendFunc aAppendFunc,
                                 void* aData,
                                 uint32_t aLineNumber,
                                 uint32_t aColumnNumber)
 {
   nsCOMPtr<nsIAtom> prefix;
 
   if (!aPrefix.IsEmpty()) {
-    prefix = do_GetAtom(aPrefix);
+    prefix = NS_Atomize(aPrefix);
   }
 
   RefPtr<css::NameSpaceRule> rule = new css::NameSpaceRule(prefix, aURLSpec,
                                                              aLineNumber,
                                                              aColumnNumber);
   (*aAppendFunc)(rule, aData);
 
   // If this was the first namespace rule encountered, it will trigger
@@ -5860,17 +5860,17 @@ CSSParserImpl::ParsePseudoSelector(int32
   }
 
   // OK, now we know we have an mIdent.  Atomize it.  All the atoms, for
   // pseudo-classes as well as pseudo-elements, start with a single ':'.
   nsAutoString buffer;
   buffer.Append(char16_t(':'));
   buffer.Append(mToken.mIdent);
   nsContentUtils::ASCIIToLower(buffer);
-  nsCOMPtr<nsIAtom> pseudo = do_GetAtom(buffer);
+  nsCOMPtr<nsIAtom> pseudo = NS_Atomize(buffer);
 
   // stash away some info about this pseudo so we only have to get it once.
   bool isTreePseudo = false;
   CSSPseudoElementType pseudoElementType =
     nsCSSPseudoElements::GetPseudoType(pseudo);
   nsCSSPseudoClasses::Type pseudoClassType =
     nsCSSPseudoClasses::GetPseudoType(pseudo);
   bool pseudoClassIsUserAction =
@@ -16563,17 +16563,17 @@ CSSParserImpl::ParseShadowList(nsCSSProp
 int32_t
 CSSParserImpl::GetNamespaceIdForPrefix(const nsString& aPrefix)
 {
   NS_PRECONDITION(!aPrefix.IsEmpty(), "Must have a prefix here");
 
   int32_t nameSpaceID = kNameSpaceID_Unknown;
   if (mNameSpaceMap) {
     // user-specified identifiers are case-sensitive (bug 416106)
-    nsCOMPtr<nsIAtom> prefix = do_GetAtom(aPrefix);
+    nsCOMPtr<nsIAtom> prefix = NS_Atomize(aPrefix);
     nameSpaceID = mNameSpaceMap->FindNameSpaceID(prefix);
   }
   // else no declared namespaces
 
   if (nameSpaceID == kNameSpaceID_Unknown) {   // unknown prefix, dump it
     REPORT_UNEXPECTED_P(PEUnknownNamespacePrefix, aPrefix);
   }
 
--- a/layout/style/nsCSSRuleProcessor.cpp
+++ b/layout/style/nsCSSRuleProcessor.cpp
@@ -2032,17 +2032,17 @@ static bool SelectorMatches(Element* aEl
       case nsCSSPseudoClasses::ePseudoClass_mozNativeAnonymous:
         if (!aElement->IsInNativeAnonymousSubtree()) {
           return false;
         }
         break;
 
       case nsCSSPseudoClasses::ePseudoClass_mozSystemMetric:
         {
-          nsCOMPtr<nsIAtom> metric = do_GetAtom(pseudoClass->u.mString);
+          nsCOMPtr<nsIAtom> metric = NS_Atomize(pseudoClass->u.mString);
           if (!nsCSSRuleProcessor::HasSystemMetric(metric)) {
             return false;
           }
         }
         break;
 
       case nsCSSPseudoClasses::ePseudoClass_mozLocaleDir:
         {
--- a/layout/style/nsComputedDOMStyle.cpp
+++ b/layout/style/nsComputedDOMStyle.cpp
@@ -243,17 +243,17 @@ nsComputedDOMStyle::nsComputedDOMStyle(d
     aPseudoElt.EndReading(end);
     NS_ASSERTION(start != end, "aPseudoElt is not empty!");
     ++start;
     bool haveTwoColons = true;
     if (start == end || *start != char16_t(':')) {
       --start;
       haveTwoColons = false;
     }
-    mPseudo = do_GetAtom(Substring(start, end));
+    mPseudo = NS_Atomize(Substring(start, end));
     MOZ_ASSERT(mPseudo);
 
     // There aren't any non-CSS2 pseudo-elements with a single ':'
     if (!haveTwoColons &&
         (!nsCSSPseudoElements::IsPseudoElement(mPseudo) ||
          !nsCSSPseudoElements::IsCSS2PseudoElement(mPseudo))) {
       // XXXbz I'd really rather we threw an exception or something, but
       // the DOM spec sucks.
--- a/layout/style/nsRuleNode.cpp
+++ b/layout/style/nsRuleNode.cpp
@@ -3337,17 +3337,17 @@ nsRuleNode::SetFont(nsPresContext* aPres
   // -x-lang: string, inherit
   // This is not a real CSS property, it is an HTML attribute mapped to CSS.
   const nsCSSValue* langValue = aRuleData->ValueForLang();
   if (eCSSUnit_Ident == langValue->GetUnit()) {
     nsAutoString lang;
     langValue->GetStringValue(lang);
 
     nsContentUtils::ASCIIToLower(lang);
-    aFont->mLanguage = do_GetAtom(lang);
+    aFont->mLanguage = NS_Atomize(lang);
     aFont->mExplicitLanguage = true;
   }
 
   const nsFont* defaultVariableFont =
     aPresContext->GetDefaultFont(kPresContext_DefaultVariableFont_ID,
                                  aFont->mLanguage);
 
   // -moz-system-font: enum (never inherit!)
--- a/layout/style/nsStyleStruct.cpp
+++ b/layout/style/nsStyleStruct.cpp
@@ -2739,17 +2739,17 @@ mozilla::StyleTransition::SetUnknownProp
   MOZ_ASSERT(nsCSSProps::LookupProperty(aPropertyString,
                                         nsCSSProps::eEnabledForAllContent) ==
                aProperty,
              "property and property string should match");
   MOZ_ASSERT(aProperty == eCSSProperty_UNKNOWN ||
              aProperty == eCSSPropertyExtra_variable,
              "should be either unknown or custom property");
   mProperty = aProperty;
-  mUnknownProperty = do_GetAtom(aPropertyString);
+  mUnknownProperty = NS_Atomize(aPropertyString);
 }
 
 bool
 mozilla::StyleTransition::operator==(const mozilla::StyleTransition& aOther) const
 {
   return mTimingFunction == aOther.mTimingFunction &&
          mDuration == aOther.mDuration &&
          mDelay == aOther.mDelay &&
--- a/layout/xul/tree/nsTreeColumns.cpp
+++ b/layout/xul/tree/nsTreeColumns.cpp
@@ -271,17 +271,17 @@ nsTreeColumn::Invalidate()
   nsIFrame* frame = GetFrame();
   NS_ENSURE_TRUE(frame, NS_ERROR_FAILURE);
 
   // Fetch the Id.
   mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::id, mId);
 
   // If we have an Id, cache the Id as an atom.
   if (!mId.IsEmpty()) {
-    mAtom = do_GetAtom(mId);
+    mAtom = NS_Atomize(mId);
   }
 
   // Cache our index.
   nsTreeUtils::GetColumnIndex(mContent, &mIndex);
 
   const nsStyleVisibility* vis = frame->StyleVisibility();
 
   // Cache our text alignment policy.
--- a/layout/xul/tree/nsTreeUtils.cpp
+++ b/layout/xul/tree/nsTreeUtils.cpp
@@ -39,17 +39,17 @@ nsTreeUtils::TokenizeProperties(const ns
     while (iter != end && ! nsCRT::IsAsciiSpace(*iter))
       ++iter;
 
     // XXX this would be nonsensical
     NS_ASSERTION(iter != first, "eh? something's wrong here");
     if (iter == first)
       break;
 
-    nsCOMPtr<nsIAtom> atom = do_GetAtom(Substring(first, iter));
+    nsCOMPtr<nsIAtom> atom = NS_Atomize(Substring(first, iter));
     aPropertiesArray.AppendElement(atom);
   } while (iter != end);
 
   return NS_OK;
 }
 
 nsIContent*
 nsTreeUtils::GetImmediateChild(nsIContent* aContainer, nsIAtom* aTag)
--- a/netwerk/streamconv/nsStreamConverterService.cpp
+++ b/netwerk/streamconv/nsStreamConverterService.cpp
@@ -149,17 +149,17 @@ nsStreamConverterService::AddAdjacency(c
     if (!mAdjacencyList.Get(toStr)) {
         // There is no toStr vertex, create one.
         mAdjacencyList.Put(toStr, new nsCOMArray<nsIAtom>());
     }
 
     // Now we know the FROM and TO types are represented as keys in the hashtable.
     // Let's "connect" the verticies, making an edge.
 
-    nsCOMPtr<nsIAtom> vertex = do_GetAtom(toStr);
+    nsCOMPtr<nsIAtom> vertex = NS_Atomize(toStr);
     if (!vertex) return NS_ERROR_OUT_OF_MEMORY;
 
     NS_ASSERTION(fromEdges, "something wrong in adjacency list construction");
     if (!fromEdges)
         return NS_ERROR_FAILURE;
 
     return fromEdges->AppendObject(vertex) ? NS_OK : NS_ERROR_FAILURE;
 }
--- a/parser/html/nsHtml5TreeOperation.h
+++ b/parser/html/nsHtml5TreeOperation.h
@@ -105,17 +105,17 @@ class nsHtml5TreeOperation {
      */
     static inline already_AddRefed<nsIAtom> Reget(nsIAtom* aAtom)
     {
       if (!aAtom || aAtom->IsStaticAtom()) {
         return dont_AddRef(aAtom);
       }
       nsAutoString str;
       aAtom->ToString(str);
-      return do_GetAtom(str);
+      return NS_Atomize(str);
     }
 
     static nsresult AppendTextToTextNode(const char16_t* aBuffer,
                                          uint32_t aLength,
                                          nsIContent* aTextNode,
                                          nsHtml5DocumentBuilder* aBuilder);
 
     static nsresult AppendText(const char16_t* aBuffer,
--- a/parser/htmlparser/nsHTMLTags.cpp
+++ b/parser/htmlparser/nsHTMLTags.cpp
@@ -220,31 +220,31 @@ nsHTMLTags::TestTagTable()
        NS_ASSERTION(0 == nsCRT::strcmp(check, tag), "can't map id back to tag");
 
        nsAutoString uname(tag);
        ToUpperCase(uname);
        NS_ASSERTION(id == LookupTag(uname), "wrong id");
 
        NS_ASSERTION(id == CaseSensitiveLookupTag(tag), "wrong id");
 
-       atom = do_GetAtom(tag);
+       atom = NS_Atomize(tag);
        NS_ASSERTION(id == CaseSensitiveLookupTag(atom), "wrong id");
        NS_ASSERTION(atom == GetAtom(id), "can't map id back to atom");
      }
 
      // Make sure we don't find things that aren't there
      id = LookupTag(NS_LITERAL_STRING("@"));
      NS_ASSERTION(id == eHTMLTag_userdefined, "found @");
      id = LookupTag(NS_LITERAL_STRING("zzzzz"));
      NS_ASSERTION(id == eHTMLTag_userdefined, "found zzzzz");
 
-     atom = do_GetAtom("@");
+     atom = NS_Atomize("@");
      id = CaseSensitiveLookupTag(atom);
      NS_ASSERTION(id == eHTMLTag_userdefined, "found @");
-     atom = do_GetAtom("zzzzz");
+     atom = NS_Atomize("zzzzz");
      id = CaseSensitiveLookupTag(atom);
      NS_ASSERTION(id == eHTMLTag_userdefined, "found zzzzz");
 
      tag = GetStringValue((nsHTMLTag) 0);
      NS_ASSERTION(!tag, "found enum 0");
      tag = GetStringValue((nsHTMLTag) -1);
      NS_ASSERTION(!tag, "found enum -1");
      tag = GetStringValue((nsHTMLTag) (NS_HTML_TAG_MAX + 1));
--- a/rdf/base/nsRDFContentSink.cpp
+++ b/rdf/base/nsRDFContentSink.cpp
@@ -1277,17 +1277,17 @@ RDFContentSinkImpl::RegisterNamespaces(c
             continue;
         }
         // get the localname (or "xmlns" for the default namespace)
         const char16_t* endLocal = ++attr;
         while (*endLocal && *endLocal != 0xFFFF) {
             ++endLocal;
         }
         nsDependentSubstring lname(attr, endLocal);
-        nsCOMPtr<nsIAtom> preferred = do_GetAtom(lname);
+        nsCOMPtr<nsIAtom> preferred = NS_Atomize(lname);
         if (preferred == kXMLNSAtom) {
             preferred = nullptr;
         }
         sink->AddNameSpace(preferred, nsDependentString(aAttributes[1]));
     }
 }
 
 ////////////////////////////////////////////////////////////////////////
@@ -1317,17 +1317,17 @@ RDFContentSinkImpl::SplitExpatName(const
             }
 
             uriEnd = pos;
             nameStart = pos + 1;
         }
     }
 
     const nsDependentSubstring& nameSpaceURI = Substring(aExpatName, uriEnd);
-    *aLocalName = NS_NewAtom(Substring(nameStart, pos)).take();
+    *aLocalName = NS_Atomize(Substring(nameStart, pos)).take();
     return nameSpaceURI;
 }
 
 nsresult
 RDFContentSinkImpl::InitContainer(nsIRDFResource* aContainerType, nsIRDFResource* aContainer)
 {
     // Do the right kind of initialization based on the container
     // 'type' resource, and the state of the container (i.e., 'make' a
--- a/rdf/base/nsRDFXMLSerializer.cpp
+++ b/rdf/base/nsRDFXMLSerializer.cpp
@@ -122,20 +122,20 @@ nsRDFXMLSerializer::Init(nsIRDFDataSourc
         return NS_ERROR_NULL_POINTER;
 
     mDataSource = aDataSource;
     mDataSource->GetURI(getter_Copies(mBaseURLSpec));
 
     // Add the ``RDF'' prefix, by default.
     nsCOMPtr<nsIAtom> prefix;
 
-    prefix = do_GetAtom("RDF");
+    prefix = NS_Atomize("RDF");
     AddNameSpace(prefix, NS_LITERAL_STRING("http://www.w3.org/1999/02/22-rdf-syntax-ns#"));
 
-    prefix = do_GetAtom("NC");
+    prefix = NS_Atomize("NC");
     AddNameSpace(prefix, NS_LITERAL_STRING("http://home.netscape.com/NC-rdf#"));
 
     mPrefixID = 0;
 
     return NS_OK;
 }
 
 NS_IMETHODIMP
@@ -187,17 +187,17 @@ nsRDFXMLSerializer::EnsureNewPrefix()
 {
     nsAutoString qname;
     nsCOMPtr<nsIAtom> prefix;
     bool isNewPrefix;
     do {
         isNewPrefix = true;
         qname.AssignLiteral("NS");
         qname.AppendInt(++mPrefixID, 10);
-        prefix = do_GetAtom(qname);
+        prefix = NS_Atomize(qname);
         nsNameSpaceMap::const_iterator iter = mNameSpaces.first();
         while (iter != mNameSpaces.last() && isNewPrefix) {
             isNewPrefix = (iter->mPrefix != prefix);
             ++iter;
         } 
     } while (!isNewPrefix);
     return prefix.forget();
 }
--- a/toolkit/components/typeaheadfind/nsTypeAheadFind.cpp
+++ b/toolkit/components/typeaheadfind/nsTypeAheadFind.cpp
@@ -871,18 +871,18 @@ nsTypeAheadFind::RangeStartsInsideLink(n
     }
   }
 
   // ------- Check to see if inside link ---------
 
   // We now have the correct start node for the range
   // Search for links, starting with startNode, and going up parent chain
 
-  nsCOMPtr<nsIAtom> tag, hrefAtom(do_GetAtom("href"));
-  nsCOMPtr<nsIAtom> typeAtom(do_GetAtom("type"));
+  nsCOMPtr<nsIAtom> tag, hrefAtom(NS_Atomize("href"));
+  nsCOMPtr<nsIAtom> typeAtom(NS_Atomize("type"));
 
   while (true) {
     // Keep testing while startContent is equal to something,
     // eventually we'll run out of ancestors
 
     if (startContent->IsHTMLElement()) {
       nsCOMPtr<mozilla::dom::Link> link(do_QueryInterface(startContent));
       if (link) {
--- a/xpcom/ds/nsAtomService.cpp
+++ b/xpcom/ds/nsAtomService.cpp
@@ -11,15 +11,15 @@ NS_IMPL_ISUPPORTS(nsAtomService, nsIAtom
 
 nsAtomService::nsAtomService()
 {
 }
 
 nsresult
 nsAtomService::GetAtom(const nsAString& aString, nsIAtom** aResult)
 {
-  *aResult = NS_NewAtom(aString).take();
+  *aResult = NS_Atomize(aString).take();
   if (!*aResult) {
     return NS_ERROR_OUT_OF_MEMORY;
   }
 
   return NS_OK;
 }
--- a/xpcom/ds/nsAtomTable.cpp
+++ b/xpcom/ds/nsAtomTable.cpp
@@ -611,23 +611,23 @@ RegisterStaticAtoms(const nsStaticAtom* 
       StaticAtomEntry* entry =
         gStaticAtomTable->PutEntry(nsDependentAtomString(atom));
       entry->mAtom = atom;
     }
   }
 }
 
 already_AddRefed<nsIAtom>
-NS_NewAtom(const char* aUTF8String)
+NS_Atomize(const char* aUTF8String)
 {
-  return NS_NewAtom(nsDependentCString(aUTF8String));
+  return NS_Atomize(nsDependentCString(aUTF8String));
 }
 
 already_AddRefed<nsIAtom>
-NS_NewAtom(const nsACString& aUTF8String)
+NS_Atomize(const nsACString& aUTF8String)
 {
   uint32_t hash;
   AtomTableEntry* he = GetAtomHashEntry(aUTF8String.Data(),
                                         aUTF8String.Length(),
                                         &hash);
 
   if (he->mAtom) {
     nsCOMPtr<nsIAtom> atom = he->mAtom;
@@ -643,23 +643,23 @@ NS_NewAtom(const nsACString& aUTF8String
   RefPtr<AtomImpl> atom = new AtomImpl(str, hash);
 
   he->mAtom = atom;
 
   return atom.forget();
 }
 
 already_AddRefed<nsIAtom>
-NS_NewAtom(const char16_t* aUTF16String)
+NS_Atomize(const char16_t* aUTF16String)
 {
-  return NS_NewAtom(nsDependentString(aUTF16String));
+  return NS_Atomize(nsDependentString(aUTF16String));
 }
 
 already_AddRefed<nsIAtom>
-NS_NewAtom(const nsAString& aUTF16String)
+NS_Atomize(const nsAString& aUTF16String)
 {
   uint32_t hash;
   AtomTableEntry* he = GetAtomHashEntry(aUTF16String.Data(),
                                         aUTF16String.Length(),
                                         &hash);
 
   if (he->mAtom) {
     nsCOMPtr<nsIAtom> atom = he->mAtom;
--- a/xpcom/ds/nsIAtom.idl
+++ b/xpcom/ds/nsIAtom.idl
@@ -79,55 +79,45 @@ protected:
    */
   char16_t* mString;
 %}
 };
 
 
 %{C++
 /*
- * The three forms of NS_NewAtom and do_GetAtom (for use with
- * |nsCOMPtr<nsIAtom>|) return the atom for the string given.  At any
- * given time there will always be one atom representing a given string.
- * Atoms are intended to make string comparison cheaper by simplifying
- * it to pointer equality.  A pointer to the atom that does not own a
- * reference is not guaranteed to be valid.
+ * The four forms of NS_Atomize (for use with |nsCOMPtr<nsIAtom>|) return the
+ * atom for the string given. At any given time there will always be one atom
+ * representing a given string. Atoms are intended to make string comparison
+ * cheaper by simplifying it to pointer equality. A pointer to the atom that
+ * does not own a reference is not guaranteed to be valid.
  */
 
 
 /**
  * Find an atom that matches the given UTF-8 string.
  * The string is assumed to be zero terminated.  Never returns null.
  */
-extern already_AddRefed<nsIAtom> NS_NewAtom(const char* aUTF8String);
+extern already_AddRefed<nsIAtom> NS_Atomize(const char* aUTF8String);
 
-inline already_AddRefed<nsIAtom> do_GetAtom(const char* aUTF8String)
-    { return NS_NewAtom(aUTF8String); }
- 
 /**
  * Find an atom that matches the given UTF-8 string.  Never returns null.
  */
-extern already_AddRefed<nsIAtom> NS_NewAtom(const nsACString& aUTF8String);
-inline already_AddRefed<nsIAtom> do_GetAtom(const nsACString& aUTF8String)
-    { return NS_NewAtom(aUTF8String); }
+extern already_AddRefed<nsIAtom> NS_Atomize(const nsACString& aUTF8String);
 
 /**
  * Find an atom that matches the given UTF-16 string.
  * The string is assumed to be zero terminated.  Never returns null.
  */
-extern already_AddRefed<nsIAtom> NS_NewAtom(const char16_t* aUTF16String);
-inline already_AddRefed<nsIAtom> do_GetAtom(const char16_t* aUTF16String)
-    { return NS_NewAtom(aUTF16String); }
+extern already_AddRefed<nsIAtom> NS_Atomize(const char16_t* aUTF16String);
 
 /**
  * Find an atom that matches the given UTF-16 string.  Never returns null.
  */
-extern already_AddRefed<nsIAtom> NS_NewAtom(const nsAString& aUTF16String);
-inline already_AddRefed<nsIAtom> do_GetAtom(const nsAString& aUTF16String)
-    { return NS_NewAtom(aUTF16String); }
+extern already_AddRefed<nsIAtom> NS_Atomize(const nsAString& aUTF16String);
 
 /**
  * Return a count of the total number of atoms currently
  * alive in the system.
  */
 extern nsrefcnt NS_GetNumberOfAtoms(void);
 
 /**
--- a/xpcom/ds/nsIAtomService.idl
+++ b/xpcom/ds/nsIAtomService.idl
@@ -23,13 +23,13 @@ interface nsIAtom;
  * could be dangerous since double-wrapping could lead to loss of
  * pointer identity.
  */
  
 [scriptable, uuid(9c1f50b9-f9eb-42d4-a8cb-2c7600aeb241)]
 interface nsIAtomService : nsISupports {
 
   /**
-   * Version of NS_NewAtom that doesn't require linking against the
+   * Version of NS_Atomize that doesn't require linking against the
    * XPCOM library.  See nsIAtom.idl.
    */
   nsIAtom getAtom(in AString value);
 };
--- a/xpcom/io/nsDirectoryService.cpp
+++ b/xpcom/io/nsDirectoryService.cpp
@@ -523,17 +523,17 @@ nsDirectoryService::GetFile(const char* 
                             nsIFile** aResult)
 {
   nsCOMPtr<nsIFile> localFile;
   nsresult rv = NS_ERROR_FAILURE;
 
   *aResult = nullptr;
   *aPersistent = true;
 
-  nsCOMPtr<nsIAtom> inAtom = do_GetAtom(aProp);
+  nsCOMPtr<nsIAtom> inAtom = NS_Atomize(aProp);
 
   // check to see if it is one of our defaults
 
   if (inAtom == nsDirectoryService::sCurrentProcess ||
       inAtom == nsDirectoryService::sOS_CurrentProcessDirectory) {
     rv = GetCurrentProcessDirectory(getter_AddRefs(localFile));
   }
 
--- a/xpcom/tests/TestStaticAtoms.cpp
+++ b/xpcom/tests/TestStaticAtoms.cpp
@@ -12,17 +12,17 @@ int main(int argc, char** argv)
   if (xpcom.failed()) {
     return 1;
   }
 
   TestingAtoms::AddRefAtoms();
 
   NS_SealStaticAtomTable();
 
-  nsCOMPtr<nsIAtom> atom = do_GetAtom("foo");
+  nsCOMPtr<nsIAtom> atom = NS_Atomize("foo");
   if (!atom) {
     fail("Didn't get an atom for foo.");
     return 1;
   }
   if (atom->IsStaticAtom()) {
     passed("foo is a static atom");
   } else {
     fail("foo is not a static atom.");
@@ -36,25 +36,25 @@ int main(int argc, char** argv)
   }
   nsIAtom* staticAtom = NS_GetStaticAtom(NS_LITERAL_STRING("foo"));
   if (!staticAtom) {
     fail("Did not get a static atom for foo");
     return 1;
   }
 
   if (atom == staticAtom) {
-    passed("do_GetAtom and NS_GetStaticAtom returned the same atom.");
+    passed("NS_Atomize and NS_GetStaticAtom returned the same atom.");
   } else {
-    fail("do_GetAtom and NS_GetStaticAtom returned different atoms.");
+    fail("NS_Atomize and NS_GetStaticAtom returned different atoms.");
     return 1;
   }
 
   MoreTestingAtoms::AddRefAtoms();
   
-  atom = do_GetAtom("qux");
+  atom = NS_Atomize("qux");
   if (!atom) {
     fail("Didn't get an atom for qux.");
     return 1;
   }
   if (atom->IsStaticAtom()) {
     passed("qux is a static atom");
   } else {
     fail("qux is not a static atom.");
--- a/xpcom/tests/gtest/TestAtoms.cpp
+++ b/xpcom/tests/gtest/TestAtoms.cpp
@@ -18,17 +18,17 @@ using namespace mozilla;
 namespace TestAtoms {
 
 TEST(Atoms, Basic)
 {
   for (unsigned int i = 0; i < ArrayLength(ValidStrings); ++i) {
     nsDependentString str16(ValidStrings[i].m16);
     nsDependentCString str8(ValidStrings[i].m8);
 
-    nsCOMPtr<nsIAtom> atom = do_GetAtom(str16);
+    nsCOMPtr<nsIAtom> atom = NS_Atomize(str16);
 
     EXPECT_TRUE(atom->Equals(str16));
 
     nsString tmp16;
     nsCString tmp8;
     atom->ToString(tmp16);
     atom->ToUTF8String(tmp8);
     EXPECT_TRUE(str16.Equals(tmp16));
@@ -40,82 +40,82 @@ TEST(Atoms, Basic)
     EXPECT_TRUE(nsDependentAtomString(atom).Equals(str16));
     EXPECT_TRUE(nsAtomCString(atom).Equals(str8));
   }
 }
 
 TEST(Atoms, 16vs8)
 {
   for (unsigned int i = 0; i < ArrayLength(ValidStrings); ++i) {
-    nsCOMPtr<nsIAtom> atom16 = do_GetAtom(ValidStrings[i].m16);
-    nsCOMPtr<nsIAtom> atom8 = do_GetAtom(ValidStrings[i].m8);
+    nsCOMPtr<nsIAtom> atom16 = NS_Atomize(ValidStrings[i].m16);
+    nsCOMPtr<nsIAtom> atom8 = NS_Atomize(ValidStrings[i].m8);
     EXPECT_EQ(atom16, atom8);
   }
 }
 
 TEST(Atoms, BufferSharing)
 {
   nsString unique;
   unique.AssignLiteral("this is a unique string !@#$");
 
-  nsCOMPtr<nsIAtom> atom = do_GetAtom(unique);
+  nsCOMPtr<nsIAtom> atom = NS_Atomize(unique);
 
   EXPECT_EQ(unique.get(), atom->GetUTF16String());
 }
 
 TEST(Atoms, NUll)
 {
   nsAutoString str(NS_LITERAL_STRING("string with a \0 char"));
   nsDependentString strCut(str.get());
 
   EXPECT_FALSE(str.Equals(strCut));
 
-  nsCOMPtr<nsIAtom> atomCut = do_GetAtom(strCut);
-  nsCOMPtr<nsIAtom> atom = do_GetAtom(str);
+  nsCOMPtr<nsIAtom> atomCut = NS_Atomize(strCut);
+  nsCOMPtr<nsIAtom> atom = NS_Atomize(str);
 
   EXPECT_EQ(atom->GetLength(), str.Length());
   EXPECT_TRUE(atom->Equals(str));
   EXPECT_NE(atom, atomCut);
   EXPECT_TRUE(atomCut->Equals(strCut));
 }
 
 TEST(Atoms, Invalid)
 {
   for (unsigned int i = 0; i < ArrayLength(Invalid16Strings); ++i) {
     nsrefcnt count = NS_GetNumberOfAtoms();
 
     {
-      nsCOMPtr<nsIAtom> atom16 = do_GetAtom(Invalid16Strings[i].m16);
+      nsCOMPtr<nsIAtom> atom16 = NS_Atomize(Invalid16Strings[i].m16);
       EXPECT_TRUE(atom16->Equals(nsDependentString(Invalid16Strings[i].m16)));
     }
 
     EXPECT_EQ(count, NS_GetNumberOfAtoms());
   }
 
   for (unsigned int i = 0; i < ArrayLength(Invalid8Strings); ++i) {
     nsrefcnt count = NS_GetNumberOfAtoms();
 
     {
-      nsCOMPtr<nsIAtom> atom8 = do_GetAtom(Invalid8Strings[i].m8);
-      nsCOMPtr<nsIAtom> atom16 = do_GetAtom(Invalid8Strings[i].m16);
+      nsCOMPtr<nsIAtom> atom8 = NS_Atomize(Invalid8Strings[i].m8);
+      nsCOMPtr<nsIAtom> atom16 = NS_Atomize(Invalid8Strings[i].m16);
       EXPECT_EQ(atom16, atom8);
       EXPECT_TRUE(atom16->Equals(nsDependentString(Invalid8Strings[i].m16)));
     }
 
     EXPECT_EQ(count, NS_GetNumberOfAtoms());
   }
 
 // Don't run this test in debug builds as that intentionally asserts.
 #ifndef DEBUG
-  nsCOMPtr<nsIAtom> emptyAtom = do_GetAtom("");
+  nsCOMPtr<nsIAtom> emptyAtom = NS_Atomize("");
 
   for (unsigned int i = 0; i < ArrayLength(Malformed8Strings); ++i) {
     nsrefcnt count = NS_GetNumberOfAtoms();
 
-    nsCOMPtr<nsIAtom> atom8 = do_GetAtom(Malformed8Strings[i]);
+    nsCOMPtr<nsIAtom> atom8 = NS_Atomize(Malformed8Strings[i]);
     EXPECT_EQ(atom8, emptyAtom);
     EXPECT_EQ(count, NS_GetNumberOfAtoms());
   }
 #endif
 }
 
 #define FIRST_ATOM_STR "first static atom. Hello!"
 #define SECOND_ATOM_STR "second static atom. @World!"
@@ -148,17 +148,17 @@ isStaticAtom(nsIAtom* atom)
   rv &= (atom->Release() == 1);
   return rv;
 }
 
 TEST(Atoms, Table)
 {
   nsrefcnt count = NS_GetNumberOfAtoms();
 
-  nsCOMPtr<nsIAtom> thirdNonPerm = do_GetAtom(THIRD_ATOM_STR);
+  nsCOMPtr<nsIAtom> thirdNonPerm = NS_Atomize(THIRD_ATOM_STR);
 
   EXPECT_FALSE(isStaticAtom(thirdNonPerm));
 
   EXPECT_TRUE(thirdNonPerm);
   EXPECT_EQ(NS_GetNumberOfAtoms(), count + 1);
 
   NS_RegisterStaticAtoms(sAtoms_info);