diff options
Diffstat (limited to 'xpcom/ds/nsAtomTable.cpp')
-rw-r--r-- | xpcom/ds/nsAtomTable.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/xpcom/ds/nsAtomTable.cpp b/xpcom/ds/nsAtomTable.cpp index a03fdcce53..379aa647d4 100644 --- a/xpcom/ds/nsAtomTable.cpp +++ b/xpcom/ds/nsAtomTable.cpp @@ -82,7 +82,7 @@ nsDynamicAtom* nsDynamicAtom::Create(const nsAString& aString, uint32_t aHash) { // We tack the chars onto the end of the nsDynamicAtom object. const bool isAsciiLower = ::IsAsciiLowercase(aString.Data(), aString.Length()); - RefPtr<nsStringBuffer> buffer = nsStringBuffer::FromString(aString); + RefPtr<nsStringBuffer> buffer = aString.GetStringBuffer(); if (!buffer) { buffer = nsStringBuffer::Create(aString.Data(), aString.Length()); if (MOZ_UNLIKELY(!buffer)) { @@ -111,7 +111,7 @@ void nsAtom::ToString(nsAString& aString) const { // which is what's important. aString.AssignLiteral(AsStatic()->String(), mLength); } else { - AsDynamic()->StringBuffer()->ToString(mLength, aString); + aString.Assign(AsDynamic()->StringBuffer(), mLength); } } @@ -577,7 +577,7 @@ already_AddRefed<nsAtom> nsAtomTable::Atomize(const nsACString& aUTF8String) { nsString str; CopyUTF8toUTF16(aUTF8String, str); - MOZ_ASSERT(nsStringBuffer::FromString(str), "Should create a string buffer"); + MOZ_ASSERT(str.GetStringBuffer(), "Should create a string buffer"); RefPtr<nsAtom> atom = dont_AddRef(nsDynamicAtom::Create(str, key.mHash)); he->mAtom = atom; |