mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-02 14:19:48 +00:00
LibJS: Add a sanity check to bytecodes argument_list_evaluation
This commit is contained in:
parent
c9e7d452c5
commit
1e1bf84e6d
Notes:
sideshowbarker
2024-07-17 18:46:30 +09:00
Author: https://github.com/Hendiadyoin1
Commit: 1e1bf84e6d
Pull-request: https://github.com/SerenityOS/serenity/pull/15857
Issue: https://github.com/SerenityOS/serenity/issues/15753
Reviewed-by: https://github.com/alimpfard
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