diff options
author | Kent Hansen <khansen@trolltech.com> | 2009-08-20 13:55:13 (GMT) |
---|---|---|
committer | Kent Hansen <khansen@trolltech.com> | 2009-08-20 13:55:13 (GMT) |
commit | 6fec99fd1fc256437c5c651209084f479005a7a7 (patch) | |
tree | 91b2369cf4d8e0a5160b1b0ed87458627c8ab25a /src/script/api/qscriptcontextinfo.cpp | |
parent | 909512e0f0ab2a11d0c4ecdaef957ad7a5c58292 (diff) | |
download | Qt-6fec99fd1fc256437c5c651209084f479005a7a7.zip Qt-6fec99fd1fc256437c5c651209084f479005a7a7.tar.gz Qt-6fec99fd1fc256437c5c651209084f479005a7a7.tar.bz2 |
provide line number information for innermost call frame
For the innermost frame, we don't have a returnPC, so use the line
number that was last passed to the engine agent.
Diffstat (limited to 'src/script/api/qscriptcontextinfo.cpp')
-rw-r--r-- | src/script/api/qscriptcontextinfo.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/script/api/qscriptcontextinfo.cpp b/src/script/api/qscriptcontextinfo.cpp index 04c26e2..0049680 100644 --- a/src/script/api/qscriptcontextinfo.cpp +++ b/src/script/api/qscriptcontextinfo.cpp @@ -175,6 +175,9 @@ QScriptContextInfoPrivate::QScriptContextInfoPrivate(const QScriptContext *conte returnPC - codeBlock->instructions().begin() -1); } } + } else { + // An agent might have provided the line number. + lineNumber = QScript::scriptEngineFromExec(frame)->agentLineNumber; } // Get the filename and the scriptId: |