diff options
Diffstat (limited to 'src/script/api/qscriptengine.cpp')
-rw-r--r-- | src/script/api/qscriptengine.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp index 97d8061..bebb972 100644 --- a/src/script/api/qscriptengine.cpp +++ b/src/script/api/qscriptengine.cpp @@ -2369,6 +2369,11 @@ QScriptContext *QScriptEngine::pushContext() void QScriptEngine::popContext() { Q_D(QScriptEngine); + if (d->currentFrame->returnPC() != 0 || d->currentFrame->codeBlock() != 0 + || d->currentFrame->returnValueRegister() != 0 || !currentContext()->parentContext()) { + qWarning("QScriptEngine::popContext() doesn't match with pushContext()"); + return; + } JSC::RegisterFile ®isterFile = d->currentFrame->interpreter()->registerFile(); JSC::Register *const newEnd = d->currentFrame->registers() - JSC::RegisterFile::CallFrameHeaderSize - d->currentFrame->argumentCount(); d->currentFrame->scopeChain()->pop()->deref(); |