diff options
author | Kent Hansen <kent.hansen@nokia.com> | 2010-05-26 13:11:34 (GMT) |
---|---|---|
committer | Kent Hansen <kent.hansen@nokia.com> | 2010-05-27 08:23:31 (GMT) |
commit | 1f40fe507e6b6c74144cbb998cc91f88f9e33168 (patch) | |
tree | 1f244535e9b3dfc5702ec8bf97f03ce64ddf4ce9 /src | |
parent | fb5d338236976690312660bc017a8fe1e199326f (diff) | |
download | Qt-1f40fe507e6b6c74144cbb998cc91f88f9e33168.zip Qt-1f40fe507e6b6c74144cbb998cc91f88f9e33168.tar.gz Qt-1f40fe507e6b6c74144cbb998cc91f88f9e33168.tar.bz2 |
Ensure that activation object has been created before popping scope of native context
One shouldn't have to call activationObject() or scopeChain() before
calling popScope(); the scope chain should always have 2 items (activation
and global object) before we start popping anything from the internal chain.
Task-number: QTBUG-11020
Reviewed-by: Olivier Goffart
Diffstat (limited to 'src')
-rw-r--r-- | src/script/api/qscriptcontext.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/script/api/qscriptcontext.cpp b/src/script/api/qscriptcontext.cpp index 639af80..3f08e74 100644 --- a/src/script/api/qscriptcontext.cpp +++ b/src/script/api/qscriptcontext.cpp @@ -742,6 +742,7 @@ void QScriptContext::pushScope(const QScriptValue &object) */ QScriptValue QScriptContext::popScope() { + activationObject(); //ensure the creation of the normal scope for native context JSC::CallFrame *frame = QScriptEnginePrivate::frameForContext(this); JSC::ScopeChainNode *scope = frame->scopeChain(); Q_ASSERT(scope != 0); |