diff options
author | Moonchild <git-repo@palemoon.org> | 2019-05-25 15:53:41 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-25 15:53:41 +0000 |
commit | 1f239f8179bce5df201ec486519efbda9d50861b (patch) | |
tree | 2772b5e52ff616f658d56a3f18247bfc700e5354 /xpcom/ds/nsAtomTable.cpp | |
parent | c4e345b6d499393132c0cd57d10c98a7a4db370b (diff) | |
parent | bf1e5431f05532e457306c0944b3812ab6ea39f2 (diff) | |
download | UXP-1f239f8179bce5df201ec486519efbda9d50861b.tar UXP-1f239f8179bce5df201ec486519efbda9d50861b.tar.gz UXP-1f239f8179bce5df201ec486519efbda9d50861b.tar.lz UXP-1f239f8179bce5df201ec486519efbda9d50861b.tar.xz UXP-1f239f8179bce5df201ec486519efbda9d50861b.zip |
Merge pull request #1121 from win7-7/nsHtml5PortabilitylocalEqualsBuffer-pr
Use memcmp in nsHtml5Portability::localEqualsBuffer
Diffstat (limited to 'xpcom/ds/nsAtomTable.cpp')
-rw-r--r-- | xpcom/ds/nsAtomTable.cpp | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/xpcom/ds/nsAtomTable.cpp b/xpcom/ds/nsAtomTable.cpp index 4c93625ae..c2e77e31f 100644 --- a/xpcom/ds/nsAtomTable.cpp +++ b/xpcom/ds/nsAtomTable.cpp @@ -325,13 +325,7 @@ AtomTableMatchKey(const PLDHashEntryHdr* aEntry, const void* aKey) nsDependentAtomString(he->mAtom)) == 0; } - uint32_t length = he->mAtom->GetLength(); - if (length != k->mLength) { - return false; - } - - return memcmp(he->mAtom->GetUTF16String(), - k->mUTF16String, length * sizeof(char16_t)) == 0; + return he->mAtom->Equals(k->mUTF16String, k->mLength); } static void |