Methods shouldn't have prototype property (#3964)

JerryScript-DCO-1.0-Signed-off-by: Csaba Osztrogonác csaba.osztrogonac@h-lab.eu
This commit is contained in:
Csaba Osztrogonác
2020-08-05 14:01:58 +02:00
committed by GitHub
parent b82bd76175
commit c76736eadf
8 changed files with 22 additions and 15 deletions
+4
View File
@@ -1405,6 +1405,10 @@ parser_post_processing (parser_context_t *context_p) /**< context */
{
function_type = CBC_FUNCTION_TO_TYPE_BITS (CBC_FUNCTION_CONSTRUCTOR);
}
else if (context_p->status_flags & PARSER_IS_METHOD)
{
function_type = CBC_FUNCTION_TO_TYPE_BITS (CBC_FUNCTION_METHOD);
}
else
{
function_type = CBC_FUNCTION_TO_TYPE_BITS (CBC_FUNCTION_NORMAL);