summaryrefslogtreecommitdiff
path: root/src/qml/compiler/qv4compilercontext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/compiler/qv4compilercontext.cpp')
-rw-r--r--src/qml/compiler/qv4compilercontext.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/compiler/qv4compilercontext.cpp b/src/qml/compiler/qv4compilercontext.cpp
index 551467f95c..b423dcf0b7 100644
--- a/src/qml/compiler/qv4compilercontext.cpp
+++ b/src/qml/compiler/qv4compilercontext.cpp
@@ -222,7 +222,7 @@ void Context::emitBlockHeader(Codegen *codegen)
blockContext.index = blockIndex;
bytecodeGenerator->addInstruction(blockContext);
}
- } else {
+ } else if (contextType != ContextType::ESModule) {
Instruction::CreateCallContext createContext;
bytecodeGenerator->addInstruction(createContext);
}
@@ -318,7 +318,7 @@ QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Wmaybe-uninitialized") // the loads below are empty structs.
if (contextType == ContextType::Global)
bytecodeGenerator->addInstruction(Instruction::PopScriptContext());
- else
+ else if (contextType != ContextType::ESModule)
bytecodeGenerator->addInstruction(Instruction::PopContext());
QT_WARNING_POP
}