mirror of
https://github.com/RGBCube/serenity
synced 2025-05-30 22:18:11 +00:00
LibJS: Add a sanity check to bytecodes argument_list_evaluation
This commit is contained in:
parent
c9e7d452c5
commit
1e1bf84e6d
1 changed files with 6 additions and 0 deletions
|
@ -569,6 +569,12 @@ static MarkedVector<Value> argument_list_evaluation(Bytecode::Interpreter& inter
|
|||
MarkedVector<Value> argument_values { vm.heap() };
|
||||
auto arguments = interpreter.accumulator();
|
||||
|
||||
if (!(arguments.is_object() && is<Array>(arguments.as_object()))) {
|
||||
dbgln("Call arguments are not an array, but: {}", arguments.to_string_without_side_effects());
|
||||
dbgln("PC: {}[{:4x}]", interpreter.current_block().name(), interpreter.pc());
|
||||
interpreter.current_executable().dump();
|
||||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
auto& argument_array = arguments.as_array();
|
||||
auto array_length = argument_array.indexed_properties().array_like_size();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue