summaryrefslogtreecommitdiff
path: root/js/src/vm/SharedImmutableStringsCache.h
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/vm/SharedImmutableStringsCache.h')
-rw-r--r--js/src/vm/SharedImmutableStringsCache.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/js/src/vm/SharedImmutableStringsCache.h b/js/src/vm/SharedImmutableStringsCache.h
index bbde5f631e..b4bec63da6 100644
--- a/js/src/vm/SharedImmutableStringsCache.h
+++ b/js/src/vm/SharedImmutableStringsCache.h
@@ -65,7 +65,7 @@ class SharedImmutableStringsCache
* returned.
*/
template <typename IntoOwnedChars>
- MOZ_MUST_USE mozilla::Maybe<SharedImmutableString>
+ [[nodiscard]] mozilla::Maybe<SharedImmutableString>
getOrCreate(const char* chars, size_t length, IntoOwnedChars intoOwnedChars);
/**
@@ -75,7 +75,7 @@ class SharedImmutableStringsCache
* On success, `Some` is returned. In the case of OOM failure, `Nothing` is
* returned.
*/
- MOZ_MUST_USE mozilla::Maybe<SharedImmutableString>
+ [[nodiscard]] mozilla::Maybe<SharedImmutableString>
getOrCreate(OwnedChars&& chars, size_t length);
/**
@@ -86,7 +86,7 @@ class SharedImmutableStringsCache
* On success, `Some` is returned. In the case of OOM failure, `Nothing` is
* returned.
*/
- MOZ_MUST_USE mozilla::Maybe<SharedImmutableString>
+ [[nodiscard]] mozilla::Maybe<SharedImmutableString>
getOrCreate(const char* chars, size_t length);
/**
@@ -108,7 +108,7 @@ class SharedImmutableStringsCache
* returned.
*/
template <typename IntoOwnedTwoByteChars>
- MOZ_MUST_USE mozilla::Maybe<SharedImmutableTwoByteString>
+ [[nodiscard]] mozilla::Maybe<SharedImmutableTwoByteString>
getOrCreate(const char16_t* chars, size_t length, IntoOwnedTwoByteChars intoOwnedTwoByteChars);
/**
@@ -118,7 +118,7 @@ class SharedImmutableStringsCache
* On success, `Some` is returned. In the case of OOM failure, `Nothing` is
* returned.
*/
- MOZ_MUST_USE mozilla::Maybe<SharedImmutableTwoByteString>
+ [[nodiscard]] mozilla::Maybe<SharedImmutableTwoByteString>
getOrCreate(OwnedTwoByteChars&& chars, size_t length);
/**
@@ -129,7 +129,7 @@ class SharedImmutableStringsCache
* On success, `Some` is returned. In the case of OOM failure, `Nothing` is
* returned.
*/
- MOZ_MUST_USE mozilla::Maybe<SharedImmutableTwoByteString>
+ [[nodiscard]] mozilla::Maybe<SharedImmutableTwoByteString>
getOrCreate(const char16_t* chars, size_t length);
size_t sizeOfExcludingThis(mozilla::MallocSizeOf mallocSizeOf) const {