diff options
author | Kent Hansen <khansen@trolltech.com> | 2009-07-09 09:40:52 (GMT) |
---|---|---|
committer | Kent Hansen <khansen@trolltech.com> | 2009-07-09 09:40:52 (GMT) |
commit | d8cde61540b94e36a759d9d6a5adbb432f3625ea (patch) | |
tree | 3b580b65bffa2fa21b28d77729e52cf5e65770b7 /src/script/api | |
parent | bbe31f2e8842e032139fde0f58740cd181eeacd9 (diff) | |
download | Qt-d8cde61540b94e36a759d9d6a5adbb432f3625ea.zip Qt-d8cde61540b94e36a759d9d6a5adbb432f3625ea.tar.gz Qt-d8cde61540b94e36a759d9d6a5adbb432f3625ea.tar.bz2 |
make arguments object work for native functions
There's an off-by-one issue that we just work around for now.
Diffstat (limited to 'src/script/api')
-rw-r--r-- | src/script/api/qscriptcontext.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/script/api/qscriptcontext.cpp b/src/script/api/qscriptcontext.cpp index c70b3d4..ed631bf 100644 --- a/src/script/api/qscriptcontext.cpp +++ b/src/script/api/qscriptcontext.cpp @@ -302,7 +302,7 @@ QScriptValue QScriptContext::argument(int index) const return QScriptValue(QScriptValue::UndefinedValue); JSC::Register* thisRegister = d->frame->registers() - JSC::RegisterFile::CallFrameHeaderSize - d->frame->argumentCount(); if (d->frame->codeBlock() == 0) - ++index; + ++index; // ### off-by-one issue with native functions return d->engine->scriptValueFromJSCValue(thisRegister[index].jsValue()); } |