1
Fork 0
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:
Hendiadyoin1 2022-10-30 12:32:47 +01:00 committed by Andreas Kling
parent c9e7d452c5
commit 1e1bf84e6d

View file

@ -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();