mirror of
https://github.com/Samsung/escargot.git
synced 2026-06-22 10:01:50 +00:00
Fix bug with top-level-await with class variable init
* Prevent native stack overflow * Fix bug in ExecutionState::inPauserScope Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
This commit is contained in:
parent
7f7d8c336d
commit
97e698db34
4 changed files with 41 additions and 29 deletions
|
|
@ -419,6 +419,12 @@ ScriptParser::InitializeScriptResult ScriptParser::initializeScript(String* orig
|
|||
if (LIKELY(needByteCodeGeneration)) {
|
||||
try {
|
||||
#if defined(ENABLE_CODE_CACHE)
|
||||
// give up if there is top-level-await
|
||||
if (topCodeBlock->isAsync()) {
|
||||
cacheable = false;
|
||||
deleteCodeBlockCacheInfo();
|
||||
}
|
||||
|
||||
// Store cache
|
||||
if (cacheable) {
|
||||
codeCache->prepareCacheWriting(srcHash);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue