From 6891039184ef3f7371310748d658459cafb42365 Mon Sep 17 00:00:00 2001 From: Ruben Ayrapetyan Date: Wed, 16 Jul 2014 22:21:15 +0400 Subject: [PATCH] Fixing assertion on HasBinding result in ecma_OpGetIdentifierReference. --- src/libecmaoperations/ecma-reference.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/libecmaoperations/ecma-reference.c b/src/libecmaoperations/ecma-reference.c index 0559f8bd7..5e957b5e7 100644 --- a/src/libecmaoperations/ecma-reference.c +++ b/src/libecmaoperations/ecma-reference.c @@ -53,13 +53,14 @@ ecma_OpGetIdentifierReference(ecma_Object_t *lex_env_p, /**< lexical environment ecma_CompletionValue_t completion_value; completion_value = ecma_OpHasBinding( lex_env_iter_p, name_p); - JERRY_ASSERT( ecma_IsCompletionValueNormalBoolean( completion_value) ); - - if ( ecma_IsValueTrue( completion_value.value) ) + if ( ecma_IsCompletionValueNormalTrue( completion_value) ) { return ecma_MakeReference( ecma_MakeObjectValue( lex_env_iter_p), name_p, is_strict); + } else + { + JERRY_ASSERT( ecma_IsCompletionValueNormalFalse( completion_value) ); } lex_env_iter_p = ecma_GetPointer( lex_env_iter_p->u.m_LexicalEnvironment.m_pOuterReference);