diff options
author | Olivier Goffart <ogoffart@trolltech.com> | 2009-08-12 14:33:30 (GMT) |
---|---|---|
committer | Olivier Goffart <ogoffart@trolltech.com> | 2009-08-12 14:35:15 (GMT) |
commit | 208594091a0bfd625c463dfa872d02b1c32d6cd0 (patch) | |
tree | e563727e4d21a1124da53f8f75f2af5440a1bea1 /src/script/bridge | |
parent | c792951aba5fd897610e199c457846d0b6b0690d (diff) | |
download | Qt-208594091a0bfd625c463dfa872d02b1c32d6cd0.zip Qt-208594091a0bfd625c463dfa872d02b1c32d6cd0.tar.gz Qt-208594091a0bfd625c463dfa872d02b1c32d6cd0.tar.bz2 |
Push frames when needed for native getter or setters
This is some other places where Qt native function may expect to have
their own context
Diffstat (limited to 'src/script/bridge')
-rw-r--r-- | src/script/bridge/qscriptqobject.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/script/bridge/qscriptqobject.cpp b/src/script/bridge/qscriptqobject.cpp index a15e632..f749e7c 100644 --- a/src/script/bridge/qscriptqobject.cpp +++ b/src/script/bridge/qscriptqobject.cpp @@ -1028,7 +1028,9 @@ JSC::JSValue JSC_HOST_CALL QtFunction::call(JSC::ExecState *exec, JSC::JSObject QScriptEnginePrivate *eng_p = scriptEngineFromExec(exec); JSC::ExecState *previousFrame = eng_p->currentFrame; eng_p->currentFrame = exec; - JSC::JSValue result = qfun->execute(exec, thisValue, args); + eng_p->pushContext(exec, thisValue, args, callee); + JSC::JSValue result = qfun->execute(eng_p->currentFrame, thisValue, args); + eng_p->popContext(); eng_p->currentFrame = previousFrame; return result; } @@ -1065,7 +1067,9 @@ JSC::JSValue JSC_HOST_CALL QtPropertyFunction::call( QScriptEnginePrivate *eng_p = scriptEngineFromExec(exec); JSC::ExecState *previousFrame = eng_p->currentFrame; eng_p->currentFrame = exec; - JSC::JSValue result = qfun->execute(exec, thisValue, args); + eng_p->pushContext(exec, thisValue, args, callee); + JSC::JSValue result = qfun->execute(eng_p->currentFrame, thisValue, args); + eng_p->popContext(); eng_p->currentFrame = previousFrame; return result; } |