mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-07 18:17:23 +00:00
LibJS: Add missing exception check to the ArraySpeciesCreate AO
This commit is contained in:
parent
d89f539d16
commit
28172fde10
Notes:
sideshowbarker
2024-07-18 10:19:13 +09:00
Author: https://github.com/IdanHo
Commit: 28172fde10
Pull-request: https://github.com/SerenityOS/serenity/pull/8478
Reviewed-by: https://github.com/linusg
1 changed files with 5 additions and 1 deletions
|
@ -101,7 +101,11 @@ static Object* array_species_create(GlobalObject& global_object, Object& origina
|
|||
{
|
||||
auto& vm = global_object.vm();
|
||||
|
||||
if (!Value(&original_array).is_array(global_object)) {
|
||||
auto is_array = Value(&original_array).is_array(global_object);
|
||||
if (vm.exception())
|
||||
return {};
|
||||
|
||||
if (!is_array) {
|
||||
auto array = Array::create(global_object, length);
|
||||
if (vm.exception())
|
||||
return {};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue