Skip to content

Commit 99b061a

Browse files
galpeterdbatyai
authored andcommitted
Fix incorrect feature guard for class support (#2992)
In `ecma-helpers.c` there was an incorrect macro guard which tested the `JERRY_ES2015` feature but the `JERRY_ES2015_CLASS` feature should be tested instead. Profile options for testing: * JERRY_ES2015=0 * JERRY_ES2015_CLASS=1 * JERRY_ES2015_OBJECT_INITIALIZER=1 JerryScript-DCO-1.0-Signed-off-by: Peter Gal [email protected]
1 parent c64ee88 commit 99b061a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

jerry-core/ecma/base/ecma-helpers.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -361,12 +361,12 @@ ecma_get_lex_env_binding_object (const ecma_object_t *object_p) /**< object-boun
361361
{
362362
JERRY_ASSERT (object_p != NULL);
363363
JERRY_ASSERT (ecma_is_lexical_environment (object_p));
364-
#if ENABLED (JERRY_ES2015)
364+
#if ENABLED (JERRY_ES2015_CLASS)
365365
JERRY_ASSERT (ecma_get_lex_env_type (object_p) == ECMA_LEXICAL_ENVIRONMENT_THIS_OBJECT_BOUND
366366
|| ecma_get_lex_env_type (object_p) == ECMA_LEXICAL_ENVIRONMENT_SUPER_OBJECT_BOUND);
367-
#else /* defined (JERRY_ES2015) || (JERRY_ES2015 == 0) */
367+
#else /* !ENABLED (JERRY_ES2015_CLASS) */
368368
JERRY_ASSERT (ecma_get_lex_env_type (object_p) == ECMA_LEXICAL_ENVIRONMENT_THIS_OBJECT_BOUND);
369-
#endif /* ENABLED (JERRY_ES2015) */
369+
#endif /* ENABLED (JERRY_ES2015_CLASS) */
370370

371371
return ECMA_GET_NON_NULL_POINTER (ecma_object_t,
372372
object_p->property_list_or_bound_object_cp);

0 commit comments

Comments
 (0)