summaryrefslogtreecommitdiffstats
path: root/src/script/api/qscriptcontextinfo.cpp
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2011-02-15 06:09:59 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2011-02-15 06:09:59 (GMT)
commita26ae9efb66adcd0f6253b363324c435f5510f6c (patch)
treefb4c56662c1564d421f8dfc3c8465b1a68b34636 /src/script/api/qscriptcontextinfo.cpp
parent51872de548e1840431ef37f9172cb06f77875462 (diff)
parent53e589563f4adc51983703e6119c762bd81f584b (diff)
downloadQt-a26ae9efb66adcd0f6253b363324c435f5510f6c.zip
Qt-a26ae9efb66adcd0f6253b363324c435f5510f6c.tar.gz
Qt-a26ae9efb66adcd0f6253b363324c435f5510f6c.tar.bz2
Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qt-releng-team
* 'master' of git://scm.dev.nokia.troll.no/qt/qt-releng-team: (506 commits) Removed timestamp setting and checking for Symbian header export Cocoa/Alien: bugfix corner cases with popups and enter/leave My 4.7.2 changes Fix QFileDialog Symbian native file dialog filename filtering. fix QMAKE_COPY_DIR for mingw+sh Phonon MMF backend enabled in configuration and deployment Using a better flag to control the fast allocator Using QElapesedTimer for Symbian idle detector Idle detector thread improvements Updated QtGui and QtCore DEF files Update tests for QScriptEngineAgent. PathView items were not correctly updated when rootIndex changed. Allow text to selected in a TextEdit or TextInput inside a Flickable. Update modules-related tests and docs CLeanup registers after AddString 4.7.2 changes Change paging attributes for Symbian binaries Fix build failure Fix regression in creating mkspecs/default Use the thread-default glib context for the DBus connection in the ICD bearer manager. ...
Diffstat (limited to 'src/script/api/qscriptcontextinfo.cpp')
-rw-r--r--src/script/api/qscriptcontextinfo.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/script/api/qscriptcontextinfo.cpp b/src/script/api/qscriptcontextinfo.cpp
index db6b2d7..0f9de1d 100644
--- a/src/script/api/qscriptcontextinfo.cpp
+++ b/src/script/api/qscriptcontextinfo.cpp
@@ -157,7 +157,7 @@ QScriptContextInfoPrivate::QScriptContextInfoPrivate(const QScriptContext *conte
JSC::Instruction *returnPC = rewindContext->returnPC();
JSC::CodeBlock *codeBlock = frame->codeBlock();
- if (returnPC && codeBlock) {
+ if (returnPC && codeBlock && QScriptEnginePrivate::hasValidCodeBlockRegister(frame)) {
#if ENABLE(JIT)
unsigned bytecodeOffset = codeBlock->getBytecodeIndex(frame, JSC::ReturnAddressPtr(returnPC));
#else
@@ -171,7 +171,7 @@ QScriptContextInfoPrivate::QScriptContextInfoPrivate(const QScriptContext *conte
// Get the filename and the scriptId:
JSC::CodeBlock *codeBlock = frame->codeBlock();
- if (codeBlock) {
+ if (codeBlock && QScriptEnginePrivate::hasValidCodeBlockRegister(frame)) {
JSC::SourceProvider *source = codeBlock->source();
scriptId = source->asID();
fileName = source->url();
@@ -181,7 +181,8 @@ QScriptContextInfoPrivate::QScriptContextInfoPrivate(const QScriptContext *conte
JSC::JSObject *callee = frame->callee();
if (callee && callee->inherits(&JSC::InternalFunction::info))
functionName = JSC::asInternalFunction(callee)->name(frame);
- if (callee && callee->inherits(&JSC::JSFunction::info)) {
+ if (callee && callee->inherits(&JSC::JSFunction::info)
+ && !JSC::asFunction(callee)->isHostFunction()) {
functionType = QScriptContextInfo::ScriptFunction;
JSC::FunctionExecutable *body = JSC::asFunction(callee)->jsExecutable();
functionStartLineNumber = body->lineNo();