Fix ecma_builtin_promise_race_or_all function (#2491)
If a new Capability was created no check was issued if it happened to be an error. Fixes #2465 Fixes #2468 Also fixes the second variant of #2490. JerryScript-DCO-1.0-Signed-off-by: Daniel Balla dballa@inf.u-szeged.hu
This commit is contained in:
@@ -558,6 +558,12 @@ ecma_builtin_promise_race_or_all (ecma_value_t this_arg, /**< 'this' argument */
|
||||
}
|
||||
|
||||
ecma_value_t capability = ecma_promise_new_capability ();
|
||||
|
||||
if (ECMA_IS_VALUE_ERROR (capability))
|
||||
{
|
||||
return capability;
|
||||
}
|
||||
|
||||
ecma_value_t ret = ECMA_VALUE_EMPTY;
|
||||
|
||||
if (!ecma_is_value_object (array)
|
||||
|
||||
Reference in New Issue
Block a user