Refactor ecma_op_check_object_coercible (#4169)

The method returns bool now instead of an ecma_value_t

JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi aszilagy@inf.u-szeged.hu
This commit is contained in:
Szilagyi Adam
2020-08-28 13:12:50 +02:00
committed by GitHub
parent e98f5342f9
commit 9589771f7a
7 changed files with 28 additions and 39 deletions
@@ -213,11 +213,9 @@ ecma_builtin_intrinsic_dispatch_routine (uint16_t builtin_routine_id, /**< built
case ECMA_INTRINSIC_STRING_TRIM_START:
case ECMA_INTRINSIC_STRING_TRIM_END:
{
ecma_value_t coercible = ecma_op_check_object_coercible (this_arg);
if (ECMA_IS_VALUE_ERROR (coercible))
if (!ecma_op_require_object_coercible (this_arg))
{
return coercible;
return ECMA_VALUE_ERROR;
}
ecma_string_t *to_str_p = ecma_op_to_string (this_arg);