summaryrefslogtreecommitdiffstats
path: root/src/script/api/qscriptengine.cpp
diff options
context:
space:
mode:
authorJani Hautakangas <ext-jani.hautakangas@nokia.com>2009-09-29 10:49:57 (GMT)
committerJani Hautakangas <ext-jani.hautakangas@nokia.com>2009-09-29 10:49:57 (GMT)
commitcc910f05b560bf561b45e7d726ffd82f3eb28a7b (patch)
tree3be96de0b4174cf03a7e4a45d96866d7c2f0d7b7 /src/script/api/qscriptengine.cpp
parent9a7ca912ce72476bda57f2306b38e5f6e928fbf5 (diff)
parent8fe49324d8b58eb1c0945259da00905cca02822c (diff)
downloadQt-cc910f05b560bf561b45e7d726ffd82f3eb28a7b.zip
Qt-cc910f05b560bf561b45e7d726ffd82f3eb28a7b.tar.gz
Qt-cc910f05b560bf561b45e7d726ffd82f3eb28a7b.tar.bz2
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6
Diffstat (limited to 'src/script/api/qscriptengine.cpp')
-rw-r--r--src/script/api/qscriptengine.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp
index b27d1be..ee25239 100644
--- a/src/script/api/qscriptengine.cpp
+++ b/src/script/api/qscriptengine.cpp
@@ -2360,11 +2360,9 @@ JSC::CallFrame *QScriptEnginePrivate::pushContext(JSC::CallFrame *exec, JSC::JSV
JSC::Register *oldEnd = interp->registerFile().end();
int argc = args.size() + 1; //add "this"
JSC::Register *newEnd = oldEnd + argc + JSC::RegisterFile::CallFrameHeaderSize;
- //Without + argc + JSC::RegisterFile::CallFrameHeaderSize, it crashes.
- //It seems that JSC is not consistant with the way the callframe is crated
- if (!interp->registerFile().grow(newEnd + argc + JSC::RegisterFile::CallFrameHeaderSize))
+ if (!interp->registerFile().grow(newEnd))
return 0; //### Stack overflow
- newCallFrame = JSC::CallFrame::create(newEnd);
+ newCallFrame = JSC::CallFrame::create(oldEnd);
newCallFrame[0] = thisObject;
int dst = 0;
JSC::ArgList::const_iterator it;