summaryrefslogtreecommitdiff
path: root/dom/base/nsJSUtils.h
diff options
context:
space:
mode:
Diffstat (limited to 'dom/base/nsJSUtils.h')
-rw-r--r--dom/base/nsJSUtils.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/dom/base/nsJSUtils.h b/dom/base/nsJSUtils.h
index db70cd924d..53b1330ed7 100644
--- a/dom/base/nsJSUtils.h
+++ b/dom/base/nsJSUtils.h
@@ -143,7 +143,7 @@ public:
// After getting a notification that an off-thread compilation terminated,
// this function will take the result of the parser and move it to the main
// thread.
- MOZ_MUST_USE nsresult JoinCompile(void** aOffThreadToken);
+ [[nodiscard]] nsresult JoinCompile(void** aOffThreadToken);
// Compile a script contained in a SourceText.
nsresult Compile(JS::CompileOptions& aCompileOptions,
@@ -167,7 +167,7 @@ public:
JSScript* GetScript();
// Execute the compiled script and ignore the return value.
- MOZ_MUST_USE nsresult ExecScript();
+ [[nodiscard]] nsresult ExecScript();
// Execute the compiled script a get the return value.
//
@@ -180,10 +180,10 @@ public:
// compartment given as argument to the ExecutionContext constructor. If the
// caller is in a different compartment, then the out-param value should be
// wrapped by calling |JS_WrapValue|.
- MOZ_MUST_USE nsresult
+ [[nodiscard]] nsresult
ExtractReturnValue(JS::MutableHandle<JS::Value> aRetValue);
- MOZ_MUST_USE nsresult ExecScript(JS::MutableHandle<JS::Value> aRetValue);
+ [[nodiscard]] nsresult ExecScript(JS::MutableHandle<JS::Value> aRetValue);
};
static nsresult CompileModule(JSContext* aCx,