diff options
author | Olivier Goffart <ogoffart@trolltech.com> | 2009-07-29 16:03:25 (GMT) |
---|---|---|
committer | Olivier Goffart <ogoffart@trolltech.com> | 2009-07-30 12:42:06 (GMT) |
commit | c73ff675063c9dd0266f0c66b821b85d44df3a90 (patch) | |
tree | 09309825827c3ac17a69a84f7395658cda152404 /src/script/api/qscriptcontext.cpp | |
parent | 2d1020683ad9aa81ee78e1a5419a3b51d8b36270 (diff) | |
download | Qt-c73ff675063c9dd0266f0c66b821b85d44df3a90.zip Qt-c73ff675063c9dd0266f0c66b821b85d44df3a90.tar.gz Qt-c73ff675063c9dd0266f0c66b821b85d44df3a90.tar.bz2 |
Implement QScriptEngine::pushContext end popContext
Reviewed-by: Kent Hansen
Diffstat (limited to 'src/script/api/qscriptcontext.cpp')
-rw-r--r-- | src/script/api/qscriptcontext.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/script/api/qscriptcontext.cpp b/src/script/api/qscriptcontext.cpp index 0efb037..e820596 100644 --- a/src/script/api/qscriptcontext.cpp +++ b/src/script/api/qscriptcontext.cpp @@ -304,7 +304,9 @@ QScriptEngine *QScriptContext::engine() const QScriptValue QScriptContext::argument(int index) const { Q_D(const QScriptContext); - if ((index < 0) || (index >= argumentCount())) + if (index < 0) + return QScriptValue(); + if (index >= argumentCount()) return QScriptValue(QScriptValue::UndefinedValue); JSC::Register* thisRegister = d->frame->registers() - JSC::RegisterFile::CallFrameHeaderSize - d->frame->argumentCount(); if (d->frame->codeBlock() == 0) |