From da4c7e7ed675c3bf405668739c3012d140856109 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 15 May 2024 05:34:42 +0200 Subject: Adding upstream version 126.0. Signed-off-by: Daniel Baumann --- js/public/CallArgs.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'js/public/CallArgs.h') diff --git a/js/public/CallArgs.h b/js/public/CallArgs.h index 16f8d6f904..8be1b382f2 100644 --- a/js/public/CallArgs.h +++ b/js/public/CallArgs.h @@ -112,7 +112,7 @@ class MOZ_STACK_CLASS NoUsedRval { }; template -class MOZ_STACK_CLASS CallArgsBase { +class MOZ_STACK_CLASS MOZ_NON_PARAM CallArgsBase { static_assert(std::is_same_v || std::is_same_v, "WantUsedRval can only be IncludeUsedRval or NoUsedRval"); @@ -294,7 +294,7 @@ class MOZ_STACK_CLASS CallArgsBase { } // namespace detail -class MOZ_STACK_CLASS CallArgs +class MOZ_STACK_CLASS MOZ_NON_PARAM CallArgs : public detail::CallArgsBase { private: friend CallArgs CallArgsFromVp(unsigned argc, Value* vp); @@ -315,6 +315,9 @@ class MOZ_STACK_CLASS CallArgs for (unsigned i = 0; i < argc; ++i) { AssertValueIsNotGray(argv[i]); } + if (constructing) { + AssertValueIsNotGray(args.newTarget()); + } #endif return args; } -- cgit v1.2.3