From aaadfec5303361c6c2686fc117d2bf6a1e978c6b Mon Sep 17 00:00:00 2001 From: Ruben Ayrapetyan Date: Wed, 15 Oct 2014 19:40:43 +0400 Subject: [PATCH] Fixing assertion checks in 'try' opcode handler. --- src/libcoreint/opcodes-ecma-try-catch-finally.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libcoreint/opcodes-ecma-try-catch-finally.c b/src/libcoreint/opcodes-ecma-try-catch-finally.c index acab340d4..0f3e6e5f2 100644 --- a/src/libcoreint/opcodes-ecma-try-catch-finally.c +++ b/src/libcoreint/opcodes-ecma-try-catch-finally.c @@ -38,7 +38,7 @@ opfunc_try (opcode_t opdata, /**< operation data */ int_data->pos++; ecma_completion_value_t try_completion = run_int_loop (int_data); - JERRY_ASSERT ((!ecma_is_completion_value_empty (try_completion) && int_data->pos < try_end_oc) + JERRY_ASSERT ((!ecma_is_completion_value_empty (try_completion) && int_data->pos <= try_end_oc) || (ecma_is_completion_value_empty (try_completion) && int_data->pos == try_end_oc)); int_data->pos = try_end_oc; @@ -88,7 +88,7 @@ opfunc_try (opcode_t opdata, /**< operation data */ ecma_deref_object (catch_env_p); - JERRY_ASSERT ((!ecma_is_completion_value_empty (try_completion) && int_data->pos < catch_end_oc) + JERRY_ASSERT ((!ecma_is_completion_value_empty (try_completion) && int_data->pos <= catch_end_oc) || (ecma_is_completion_value_empty (try_completion) && int_data->pos == catch_end_oc)); } @@ -110,7 +110,7 @@ opfunc_try (opcode_t opdata, /**< operation data */ int_data->pos++; ecma_completion_value_t finally_completion = run_int_loop (int_data); - JERRY_ASSERT ((!ecma_is_completion_value_empty (finally_completion) && int_data->pos < finally_end_oc) + JERRY_ASSERT ((!ecma_is_completion_value_empty (finally_completion) && int_data->pos <= finally_end_oc) || (ecma_is_completion_value_empty (finally_completion) && int_data->pos == finally_end_oc)); int_data->pos = finally_end_oc;