src/script/api/qscriptcontext.cpp
changeset 33 3e2da88830cd
parent 30 5dc02b23752f
child 37 758a864f9613
equal deleted inserted replaced
30:5dc02b23752f 33:3e2da88830cd
   740   If the scope chain is already empty, this function returns an
   740   If the scope chain is already empty, this function returns an
   741   invalid QScriptValue.
   741   invalid QScriptValue.
   742 */
   742 */
   743 QScriptValue QScriptContext::popScope()
   743 QScriptValue QScriptContext::popScope()
   744 {
   744 {
       
   745     activationObject(); //ensure the creation of the normal scope for native context
   745     JSC::CallFrame *frame = QScriptEnginePrivate::frameForContext(this);
   746     JSC::CallFrame *frame = QScriptEnginePrivate::frameForContext(this);
   746     JSC::ScopeChainNode *scope = frame->scopeChain();
   747     JSC::ScopeChainNode *scope = frame->scopeChain();
   747     Q_ASSERT(scope != 0);
   748     Q_ASSERT(scope != 0);
   748     QScriptEnginePrivate *engine = QScript::scriptEngineFromExec(frame);
   749     QScriptEnginePrivate *engine = QScript::scriptEngineFromExec(frame);
   749     QScript::APIShim shim(engine);
   750     QScript::APIShim shim(engine);