diff --git a/jerry-core/ecma/operations/ecma-function-object.c b/jerry-core/ecma/operations/ecma-function-object.c index 9762c1368..f0ea54c77 100644 --- a/jerry-core/ecma/operations/ecma-function-object.c +++ b/jerry-core/ecma/operations/ecma-function-object.c @@ -1621,16 +1621,21 @@ ecma_op_external_function_try_to_lazy_instantiate_property (ecma_object_t *objec if (ecma_compare_ecma_string_to_magic_id (property_name_p, LIT_MAGIC_STRING_LENGTH)) { ecma_extended_object_t *ext_obj_p = (ecma_extended_object_t *) object_p; + ecma_external_handler_t handler = ext_obj_p->u.external_handler_cb; - if (ext_obj_p->u.external_handler_cb == ecma_promise_then_finally_cb - || ext_obj_p->u.external_handler_cb == ecma_promise_catch_finally_cb) + if (handler == ecma_promise_then_finally_cb + || handler == ecma_promise_catch_finally_cb + || handler == ecma_promise_resolve_handler + || handler == ecma_promise_reject_handler + || handler == ecma_promise_all_handler_cb + || handler == ecma_op_get_capabilities_executor_cb) { ecma_property_t *value_prop_p; ecma_property_value_t *value_p = ecma_create_named_data_property (object_p, property_name_p, ECMA_PROPERTY_FLAG_CONFIGURABLE, &value_prop_p); - value_p->value = ecma_make_uint32_value (1); + value_p->value = ecma_make_uint32_value (handler == ecma_op_get_capabilities_executor_cb ? 2 : 1); return value_prop_p; } } diff --git a/jerry-core/ecma/operations/ecma-promise-object.c b/jerry-core/ecma/operations/ecma-promise-object.c index 68b6ab181..0db5fb856 100644 --- a/jerry-core/ecma/operations/ecma-promise-object.c +++ b/jerry-core/ecma/operations/ecma-promise-object.c @@ -297,7 +297,7 @@ ecma_fulfill_promise (ecma_value_t promise, /**< promise */ * * @return ecma value of undefined. */ -static ecma_value_t +ecma_value_t ecma_promise_reject_handler (const ecma_value_t function, /**< the function itself */ const ecma_value_t this, /**< this_arg of the function */ const ecma_value_t argv[], /**< argument list */ @@ -334,7 +334,7 @@ ecma_promise_reject_handler (const ecma_value_t function, /**< the function itse * * @return ecma value of undefined. */ -static ecma_value_t +ecma_value_t ecma_promise_resolve_handler (const ecma_value_t function, /**< the function itself */ const ecma_value_t this, /**< this_arg of the function */ const ecma_value_t argv[], /**< argument list */ diff --git a/jerry-core/ecma/operations/ecma-promise-object.h b/jerry-core/ecma/operations/ecma-promise-object.h index 6d1a12190..33faf8b08 100644 --- a/jerry-core/ecma/operations/ecma-promise-object.h +++ b/jerry-core/ecma/operations/ecma-promise-object.h @@ -125,6 +125,17 @@ ecma_value_t ecma_promise_catch_finally_cb (const ecma_value_t function_obj, const ecma_value_t this_val, const ecma_value_t args_p[], const uint32_t args_count); +ecma_value_t +ecma_promise_reject_handler (const ecma_value_t function, + const ecma_value_t this, + const ecma_value_t argv[], + const uint32_t argc); +ecma_value_t +ecma_promise_resolve_handler (const ecma_value_t function, + const ecma_value_t this, + const ecma_value_t argv[], + const uint32_t argc); + ecma_value_t ecma_promise_finally (ecma_value_t promise, ecma_value_t on_finally); void ecma_promise_async_then (ecma_value_t promise, ecma_value_t executable_object); ecma_value_t ecma_promise_async_await (ecma_extended_object_t *async_generator_object_p, ecma_value_t value); diff --git a/tests/test262-es6-excludelist.xml b/tests/test262-es6-excludelist.xml index 7a88a2194..2f4f27ba3 100644 --- a/tests/test262-es6-excludelist.xml +++ b/tests/test262-es6-excludelist.xml @@ -60,12 +60,7 @@ - - - - -