String.match should return on error. (#1560)

Fixes #1546.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
This commit is contained in:
Zoltan Herczeg authored and GitHub committed 2017-02-03 15:16:49 +01:00
1 parent a43186db41
commit 589f2dec92
2 files changed
+17 -1

No files matched your search

@@ -1522,7 +1522,8 @@ ecma_builtin_helper_split_match (ecma_value_t input_string, /**< first argument
ret_value = ecma_regexp_exec_helper (regexp_value, ecma_make_string_value (substr_str_p), true);
if (!ecma_is_value_null (ret_value))
if (!ECMA_IS_VALUE_ERROR (ret_value)
&& !ecma_is_value_null (ret_value))
{
ecma_object_t *obj_p = ecma_get_object_from_value (ret_value);
ecma_string_t *magic_index_str_p = ecma_get_magic_string (LIT_MAGIC_STRING_INDEX);