Fix Promise thenable. (#3799)

A single promise can be resolved any number of times due to
thenable functions, but each resolver pair can only be called once.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2020-05-28 10:48:44 +02:00
committed by GitHub
parent c2b6621702
commit 562dcc8630
5 changed files with 101 additions and 14 deletions
+1 -1
View File
@@ -209,7 +209,7 @@ ecma_process_promise_resolve_thenable_job (ecma_job_promise_resolve_thenable_t *
{
ecma_object_t *promise_p = ecma_get_object_from_value (job_p->promise);
ecma_promise_resolving_functions_t funcs;
ecma_promise_create_resolving_functions (promise_p, &funcs);
ecma_promise_create_resolving_functions (promise_p, &funcs, true);
ecma_string_t *str_resolve_p = ecma_get_magic_string (LIT_INTERNAL_MAGIC_STRING_RESOLVE_FUNCTION);
ecma_string_t *str_reject_p = ecma_get_magic_string (LIT_INTERNAL_MAGIC_STRING_REJECT_FUNCTION);