summaryrefslogtreecommitdiffstats
path: root/parser
diff options
context:
space:
mode:
authorwin7-7 <win7-7@users.noreply.github.com>2019-05-25 18:04:02 +0300
committerGitHub <noreply@github.com>2019-05-25 18:04:02 +0300
commitbf1e5431f05532e457306c0944b3812ab6ea39f2 (patch)
tree37810e62f2247523ee5e1e440043a1f40e70238e /parser
parent733f6b770fcd7c2e5577bfb1fc738dc6ae5c3920 (diff)
downloadUXP-bf1e5431f05532e457306c0944b3812ab6ea39f2.tar
UXP-bf1e5431f05532e457306c0944b3812ab6ea39f2.tar.gz
UXP-bf1e5431f05532e457306c0944b3812ab6ea39f2.tar.lz
UXP-bf1e5431f05532e457306c0944b3812ab6ea39f2.tar.xz
UXP-bf1e5431f05532e457306c0944b3812ab6ea39f2.zip
use memcmp for nsIAtom Equals to improve performance parser/html
issue MoonchildProductions#1113 Use memcmp and not slower string Equals in nsHtml5Portability::localEqualsBuffer
Diffstat (limited to 'parser')
-rw-r--r--parser/html/nsHtml5Portability.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/parser/html/nsHtml5Portability.cpp b/parser/html/nsHtml5Portability.cpp
index 36c7e758a..0a7c6f845 100644
--- a/parser/html/nsHtml5Portability.cpp
+++ b/parser/html/nsHtml5Portability.cpp
@@ -91,7 +91,7 @@ nsHtml5Portability::releaseString(nsString* str)
bool
nsHtml5Portability::localEqualsBuffer(nsIAtom* local, char16_t* buf, int32_t offset, int32_t length)
{
- return local->Equals(nsDependentSubstring(buf + offset, buf + offset + length));
+ return local->Equals(buf + offset, length);
}
bool