LibJS: VERIFY(!this_value.is_empty()) in VM::call_internal()

Just a sanity check, this must never happen. Manual invocations of
call() e.g. in LibWeb bindings must pass js_undefined() if no specific
this value is desired, which OrdinaryCallBindThis will then use as-is or
turn into the global this value in non-strict mode.
This commit is contained in:
Linus Groh 2021-03-26 19:40:55 +01:00 committed by Andreas Kling
parent 056ffa4abb
commit 0b799dd3b7
Notes: sideshowbarker 2024-07-18 21:03:37 +09:00

View File

@ -336,6 +336,7 @@ Value VM::get_new_target() const
Value VM::call_internal(Function& function, Value this_value, Optional<MarkedValueList> arguments)
{
VERIFY(!exception());
VERIFY(!this_value.is_empty());
CallFrame call_frame;
call_frame.callee = &function;