mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 00:47:45 +00:00
LibJS: Add missing exception check to the ArraySpeciesCreate AO
This commit is contained in:
parent
d89f539d16
commit
28172fde10
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