Skip to content

Commit 2975810

Browse files
Daniel Ballarerobika
authored andcommitted
Add symbol support to same_value function (#3030)
JerryScript-DCO-1.0-Signed-off-by: Daniel Balla [email protected]
1 parent ea77a79 commit 2975810

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

jerry-core/ecma/operations/ecma-conversion.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,12 @@ ecma_op_same_value (ecma_value_t x, /**< ecma value */
148148
{
149149
return (ecma_is_value_true (x) == ecma_is_value_true (y));
150150
}
151+
#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
152+
else if (ecma_is_value_symbol (x))
153+
{
154+
return x == y;
155+
}
156+
#endif /* ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
151157
else
152158
{
153159
JERRY_ASSERT (is_x_object);

0 commit comments

Comments
 (0)