Merge remote-tracking branch 'origin/tracking' into custom

This commit is contained in:
roytam1 2024-01-05 10:11:42 +08:00
commit fa72b197d9
9 changed files with 52 additions and 68 deletions

View file

@ -3,7 +3,7 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
include(../js-cxxflags.mozbuild)
include('../js-cxxflags.mozbuild')
GeckoProgram('jsapi-tests', linkage=None)

View file

@ -2424,11 +2424,7 @@ namespace detail {
JS_PUBLIC_API(void)
CheckIsValidConstructible(const Value& calleev)
{
JSObject* callee = &calleev.toObject();
if (callee->is<JSFunction>())
MOZ_ASSERT(callee->as<JSFunction>().isConstructor());
else
MOZ_ASSERT(callee->constructHook() != nullptr);
MOZ_ASSERT(calleev.toObject().isConstructor());
}
} // namespace detail