diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:29 +0000 |
commit | 59203c63bb777a3bacec32fb8830fba33540e809 (patch) | |
tree | 58298e711c0ff0575818c30485b44a2f21bf28a0 /dom/bindings/test | |
parent | Adding upstream version 126.0.1. (diff) | |
download | firefox-59203c63bb777a3bacec32fb8830fba33540e809.tar.xz firefox-59203c63bb777a3bacec32fb8830fba33540e809.zip |
Adding upstream version 127.0.upstream/127.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/bindings/test')
-rw-r--r-- | dom/bindings/test/TestFunctions.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/dom/bindings/test/TestFunctions.cpp b/dom/bindings/test/TestFunctions.cpp index a91121eaa7..59d4554020 100644 --- a/dom/bindings/test/TestFunctions.cpp +++ b/dom/bindings/test/TestFunctions.cpp @@ -66,8 +66,7 @@ void TestFunctions::GetStringDataAsDOMString(const Optional<uint32_t>& aLength, length = mStringData.Length(); } - nsStringBuffer* buf = nsStringBuffer::FromString(mStringData); - if (buf) { + if (nsStringBuffer* buf = mStringData.GetStringBuffer()) { aString.SetKnownLiveStringBuffer(buf, length); return; } @@ -134,7 +133,7 @@ StringType TestFunctions::GetStringType(const nsAString& aString) { return StringType::Literal; } - if (nsStringBuffer::FromString(aString)) { + if (aString.GetStringBuffer()) { return StringType::Stringbuffer; } @@ -146,9 +145,8 @@ StringType TestFunctions::GetStringType(const nsAString& aString) { } bool TestFunctions::StringbufferMatchesStored(const nsAString& aString) { - return nsStringBuffer::FromString(aString) && - nsStringBuffer::FromString(aString) == - nsStringBuffer::FromString(mStringData); + return aString.GetStringBuffer() && + aString.GetStringBuffer() == mStringData.GetStringBuffer(); } void TestFunctions::TestThrowNsresult(ErrorResult& aError) { |