summaryrefslogtreecommitdiffstats
path: root/dom/base/nsAttrValue.cpp
diff options
context:
space:
mode:
authorwin7-7 <win7-7@users.noreply.github.com>2019-05-24 13:56:08 +0300
committerGitHub <noreply@github.com>2019-05-24 13:56:08 +0300
commita3434ba005b8eaa52fdcdfc3392b640f25f10410 (patch)
tree0017eeb028077818311e39526b41f7adfe60f707 /dom/base/nsAttrValue.cpp
parent315ffd563c18442e655e815bf250acce84b9b232 (diff)
downloadUXP-a3434ba005b8eaa52fdcdfc3392b640f25f10410.tar
UXP-a3434ba005b8eaa52fdcdfc3392b640f25f10410.tar.gz
UXP-a3434ba005b8eaa52fdcdfc3392b640f25f10410.tar.lz
UXP-a3434ba005b8eaa52fdcdfc3392b640f25f10410.tar.xz
UXP-a3434ba005b8eaa52fdcdfc3392b640f25f10410.zip
add main thread only cache for nsIAtoms to speed up atomization dom/base
add main thread only cache for nsIAtoms to speed up atomization
Diffstat (limited to 'dom/base/nsAttrValue.cpp')
-rw-r--r--dom/base/nsAttrValue.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/dom/base/nsAttrValue.cpp b/dom/base/nsAttrValue.cpp
index 8eb1aaf97..ebddcb7ed 100644
--- a/dom/base/nsAttrValue.cpp
+++ b/dom/base/nsAttrValue.cpp
@@ -742,7 +742,7 @@ nsAttrValue::GetAsAtom() const
{
switch (Type()) {
case eString:
- return NS_Atomize(GetStringValue());
+ return NS_AtomizeMainThread(GetStringValue());
case eAtom:
{
@@ -754,7 +754,7 @@ nsAttrValue::GetAsAtom() const
{
nsAutoString val;
ToString(val);
- return NS_Atomize(val);
+ return NS_AtomizeMainThread(val);
}
}
}
@@ -1267,7 +1267,7 @@ nsAttrValue::ParseAtomArray(const nsAString& aValue)
++iter;
} while (iter != end && !nsContentUtils::IsHTMLWhitespace(*iter));
- nsCOMPtr<nsIAtom> classAtom = NS_Atomize(Substring(start, iter));
+ nsCOMPtr<nsIAtom> classAtom = NS_AtomizeMainThread(Substring(start, iter));
if (!classAtom) {
Reset();
return;
@@ -1308,7 +1308,7 @@ nsAttrValue::ParseAtomArray(const nsAString& aValue)
++iter;
} while (iter != end && !nsContentUtils::IsHTMLWhitespace(*iter));
- classAtom = NS_Atomize(Substring(start, iter));
+ classAtom = NS_AtomizeMainThread(Substring(start, iter));
if (!array->AppendElement(classAtom)) {
Reset();
@@ -1757,7 +1757,7 @@ nsAttrValue::SetMiscAtomOrString(const nsAString* aValue)
"Empty string?");
MiscContainer* cont = GetMiscContainer();
if (len <= NS_ATTRVALUE_MAX_STRINGLENGTH_ATOM) {
- nsCOMPtr<nsIAtom> atom = NS_Atomize(*aValue);
+ nsCOMPtr<nsIAtom> atom = NS_AtomizeMainThread(*aValue);
if (atom) {
cont->mStringBits =
reinterpret_cast<uintptr_t>(atom.forget().take()) | eAtomBase;