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:
Daniel Balla
2018-08-31 16:45:32 +02:00
committed by Akos Kiss
parent c3b6bfe8b6
commit f5757e4c91
4 changed files with 54 additions and 0 deletions
@@ -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)