summaryrefslogtreecommitdiffstats
path: root/dom/bindings/test
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:35:37 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:35:37 +0000
commita90a5cba08fdf6c0ceb95101c275108a152a3aed (patch)
tree532507288f3defd7f4dcf1af49698bcb76034855 /dom/bindings/test
parentAdding debian version 126.0.1-1. (diff)
downloadfirefox-a90a5cba08fdf6c0ceb95101c275108a152a3aed.tar.xz
firefox-a90a5cba08fdf6c0ceb95101c275108a152a3aed.zip
Merging upstream version 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.cpp10
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) {