diff options
Diffstat (limited to 'js/src/builtin/Object.h')
-rw-r--r-- | js/src/builtin/Object.h | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/js/src/builtin/Object.h b/js/src/builtin/Object.h index cd1fb51020..69bbc1b6ff 100644 --- a/js/src/builtin/Object.h +++ b/js/src/builtin/Object.h @@ -18,10 +18,10 @@ class Value; namespace js { // Object constructor native. Exposed only so the JIT can know its address. -MOZ_MUST_USE bool +[[nodiscard]] bool obj_construct(JSContext* cx, unsigned argc, JS::Value* vp); -MOZ_MUST_USE bool +[[nodiscard]] bool obj_propertyIsEnumerable(JSContext* cx, unsigned argc, Value* vp); PlainObject* @@ -32,32 +32,32 @@ PlainObject* ObjectCreateWithTemplate(JSContext* cx, HandlePlainObject templateObj); // Object methods exposed so they can be installed in the self-hosting global. -MOZ_MUST_USE bool +[[nodiscard]] bool obj_create(JSContext* cx, unsigned argc, JS::Value* vp); -MOZ_MUST_USE bool +[[nodiscard]] bool obj_defineProperty(JSContext* cx, unsigned argc, JS::Value* vp); -MOZ_MUST_USE bool +[[nodiscard]] bool obj_getOwnPropertyNames(JSContext* cx, unsigned argc, JS::Value* vp); -MOZ_MUST_USE bool +[[nodiscard]] bool obj_getOwnPropertyDescriptor(JSContext* cx, unsigned argc, JS::Value* vp); -MOZ_MUST_USE bool +[[nodiscard]] bool obj_getPrototypeOf(JSContext* cx, unsigned argc, JS::Value* vp); -MOZ_MUST_USE bool +[[nodiscard]] bool obj_hasOwnProperty(JSContext* cx, unsigned argc, JS::Value* vp); -MOZ_MUST_USE bool +[[nodiscard]] bool obj_isExtensible(JSContext* cx, unsigned argc, JS::Value* vp); -MOZ_MUST_USE bool +[[nodiscard]] bool obj_toString(JSContext* cx, unsigned argc, JS::Value* vp); // Exposed so SelfHosting.cpp can use it in the OwnPropertyKeys intrinsic -MOZ_MUST_USE bool +[[nodiscard]] bool GetOwnPropertyKeys(JSContext* cx, const JS::CallArgs& args, unsigned flags); /* @@ -65,7 +65,7 @@ GetOwnPropertyKeys(JSContext* cx, const JS::CallArgs& args, unsigned flags); * exposing a jsid to script for Object.getOwnProperty{Names,Symbols} * or scriptable proxy traps. */ -MOZ_MUST_USE bool +[[nodiscard]] bool IdToStringOrSymbol(JSContext* cx, JS::HandleId id, JS::MutableHandleValue result); #if JS_HAS_TOSOURCE @@ -74,7 +74,7 @@ JSString* ObjectToSource(JSContext* cx, JS::HandleObject obj); #endif // JS_HAS_TOSOURCE -extern MOZ_MUST_USE bool +[[nodiscard]] extern bool WatchHandler(JSContext* cx, JSObject* obj, jsid id, const JS::Value& old, JS::Value* nvp, void* closure); |