diff options
author | Moonchild <git-repo@palemoon.org> | 2019-05-25 12:32:37 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-25 12:32:37 +0000 |
commit | 915ffc660053cc48153c00dec66b913517dba794 (patch) | |
tree | 3342c893aaa82e08e6b019c567f233e48632104f /dom/base/Element.cpp | |
parent | 72260727093c92eaca78a3ea4d32bfafa49af8c3 (diff) | |
parent | c0c64138caf25dfd8d8b87e51f36a35311fab823 (diff) | |
download | UXP-915ffc660053cc48153c00dec66b913517dba794.tar UXP-915ffc660053cc48153c00dec66b913517dba794.tar.gz UXP-915ffc660053cc48153c00dec66b913517dba794.tar.lz UXP-915ffc660053cc48153c00dec66b913517dba794.tar.xz UXP-915ffc660053cc48153c00dec66b913517dba794.zip |
Merge pull request #1115 from win7-7/NS_Atomize-cache
Add NS_Atomize cache for main thread use
Diffstat (limited to 'dom/base/Element.cpp')
-rw-r--r-- | dom/base/Element.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/dom/base/Element.cpp b/dom/base/Element.cpp index 5c3277e84..0054f4800 100644 --- a/dom/base/Element.cpp +++ b/dom/base/Element.cpp @@ -1283,7 +1283,7 @@ Element::ToggleAttribute(const nsAString& aName, if (aForce.WasPassed() && !aForce.Value()) { return false; } - nsCOMPtr<nsIAtom> nameAtom = NS_Atomize(nameToUse); + nsCOMPtr<nsIAtom> nameAtom = NS_AtomizeMainThread(nameToUse); if (!nameAtom) { aError.Throw(NS_ERROR_OUT_OF_MEMORY); return false; @@ -1316,7 +1316,7 @@ Element::SetAttribute(const nsAString& aName, nsAutoString nameToUse; const nsAttrName* name = InternalGetAttrNameFromQName(aName, &nameToUse); if (!name) { - nsCOMPtr<nsIAtom> nameAtom = NS_Atomize(nameToUse); + nsCOMPtr<nsIAtom> nameAtom = NS_AtomizeMainThread(nameToUse); if (!nameAtom) { aError.Throw(NS_ERROR_OUT_OF_MEMORY); return; @@ -1398,7 +1398,7 @@ Element::GetAttributeNS(const nsAString& aNamespaceURI, return; } - nsCOMPtr<nsIAtom> name = NS_Atomize(aLocalName); + nsCOMPtr<nsIAtom> name = NS_AtomizeMainThread(aLocalName); bool hasAttr = GetAttr(nsid, name, aReturn); if (!hasAttr) { SetDOMStringToNull(aReturn); @@ -1430,7 +1430,7 @@ Element::RemoveAttributeNS(const nsAString& aNamespaceURI, const nsAString& aLocalName, ErrorResult& aError) { - nsCOMPtr<nsIAtom> name = NS_Atomize(aLocalName); + nsCOMPtr<nsIAtom> name = NS_AtomizeMainThread(aLocalName); int32_t nsid = nsContentUtils::NameSpaceManager()->GetNameSpaceID(aNamespaceURI, nsContentUtils::IsChromeDoc(OwnerDoc())); @@ -1518,7 +1518,7 @@ Element::HasAttributeNS(const nsAString& aNamespaceURI, return false; } - nsCOMPtr<nsIAtom> name = NS_Atomize(aLocalName); + nsCOMPtr<nsIAtom> name = NS_AtomizeMainThread(aLocalName); return HasAttr(nsid, name); } |