ASSERTION FAILED: "We should only declare a function as a lexically scoped variable...
authorutatane.tea@gmail.com <utatane.tea@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 3 Jun 2017 11:24:45 +0000 (11:24 +0000)
committerutatane.tea@gmail.com <utatane.tea@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 3 Jun 2017 11:24:45 +0000 (11:24 +0000)
commit45b975f55b2711026e1acf5e1792495fa5833519
treec133b2948579d8f415ec84433d5f4361efdb2442
parent6500fdbaa9e52945493104f6d677427b1dd79916
ASSERTION FAILED: "We should only declare a function as a lexically scoped variable in scopes where var declarations aren't allowed. ..." for function redeclaration with async function module export
https://bugs.webkit.org/show_bug.cgi?id=168844

Reviewed by Saam Barati.

JSTests:

* modules/async-function-export.js: Added.
(f):
(export.async.f):

Source/JavaScriptCore:

As the same to the exported function declaration, we should set statementDepth = 1 for exported async function declaration.

* parser/Parser.cpp:
(JSC::DepthManager::DepthManager):
(JSC::Parser<LexerType>::parseExportDeclaration):
* parser/Parser.h:
(JSC::Parser::DepthManager::DepthManager): Deleted.
(JSC::Parser::DepthManager::~DepthManager): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@217755 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JSTests/ChangeLog
JSTests/modules/async-function-export.js [new file with mode: 0644]
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/parser/Parser.cpp
Source/JavaScriptCore/parser/Parser.h