diff options
Diffstat (limited to 'dom/base/nsContentUtils.h')
-rw-r--r-- | dom/base/nsContentUtils.h | 39 |
1 files changed, 20 insertions, 19 deletions
diff --git a/dom/base/nsContentUtils.h b/dom/base/nsContentUtils.h index 6e9f23054a..eac80efc6b 100644 --- a/dom/base/nsContentUtils.h +++ b/dom/base/nsContentUtils.h @@ -1508,9 +1508,10 @@ public: * @param aResult the result. Out param. * @return false on out of memory errors, true otherwise. */ - MOZ_MUST_USE - static bool GetNodeTextContent(nsINode* aNode, bool aDeep, - nsAString& aResult, const mozilla::fallible_t&); + [[nodiscard]] static bool GetNodeTextContent(nsINode* aNode, + bool aDeep, + nsAString& aResult, + const mozilla::fallible_t&); static void GetNodeTextContent(nsINode* aNode, bool aDeep, nsAString& aResult); @@ -1869,28 +1870,29 @@ public: */ static bool CanAccessNativeAnon(); - MOZ_MUST_USE - static nsresult WrapNative(JSContext *cx, nsISupports *native, - const nsIID* aIID, JS::MutableHandle<JS::Value> vp, - bool aAllowWrapping = true) + [[nodiscard]] static nsresult WrapNative(JSContext* cx, + nsISupports* native, + const nsIID* aIID, + JS::MutableHandle<JS::Value> vp, + bool aAllowWrapping = true) { return WrapNative(cx, native, nullptr, aIID, vp, aAllowWrapping); } // Same as the WrapNative above, but use this one if aIID is nsISupports' IID. - MOZ_MUST_USE - static nsresult WrapNative(JSContext *cx, nsISupports *native, - JS::MutableHandle<JS::Value> vp, - bool aAllowWrapping = true) + [[nodiscard]] static nsresult WrapNative(JSContext* cx, + nsISupports* native, + JS::MutableHandle<JS::Value> vp, + bool aAllowWrapping = true) { return WrapNative(cx, native, nullptr, nullptr, vp, aAllowWrapping); } - MOZ_MUST_USE - static nsresult WrapNative(JSContext *cx, nsISupports *native, - nsWrapperCache *cache, - JS::MutableHandle<JS::Value> vp, - bool aAllowWrapping = true) + [[nodiscard]] static nsresult WrapNative(JSContext* cx, + nsISupports* native, + nsWrapperCache* cache, + JS::MutableHandle<JS::Value> vp, + bool aAllowWrapping = true) { return WrapNative(cx, native, cache, nullptr, vp, aAllowWrapping); } @@ -1914,9 +1916,8 @@ public: * @param aString the string to convert the newlines inside [in/out] */ static void PlatformToDOMLineBreaks(nsString &aString); - MOZ_MUST_USE - static bool PlatformToDOMLineBreaks(nsString &aString, - const mozilla::fallible_t&); + [[nodiscard]] static bool PlatformToDOMLineBreaks(nsString &aString, + const mozilla::fallible_t&); /** * Populates aResultString with the contents of the string-buffer aBuf, up |