From 10a37ae46715200e5426aee0008a13028c10c124 Mon Sep 17 00:00:00 2001 From: Gaming4JC Date: Sat, 30 Dec 2023 22:16:03 -0500 Subject: [PATCH] Issue #1442 Follow-up: Fix debug assertion in JSFun Change in d5020b69bd introduced a debug build crash, this fixes the crash by properly porting the changes to an assertion as mentioned in issue #2410. --- js/src/jsfun.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/js/src/jsfun.cpp b/js/src/jsfun.cpp index 5255aebbfc..ec13ce3e9a 100644 --- a/js/src/jsfun.cpp +++ b/js/src/jsfun.cpp @@ -2424,11 +2424,7 @@ namespace detail { JS_PUBLIC_API(void) CheckIsValidConstructible(const Value& calleev) { - JSObject* callee = &calleev.toObject(); - if (callee->is()) - MOZ_ASSERT(callee->as().isConstructor()); - else - MOZ_ASSERT(callee->constructHook() != nullptr); + MOZ_ASSERT(calleev.toObject().isConstructor()); } } // namespace detail