diff options
author | Olivier Goffart <ogoffart@trolltech.com> | 2009-08-14 14:57:59 (GMT) |
---|---|---|
committer | Olivier Goffart <ogoffart@trolltech.com> | 2009-08-14 14:57:59 (GMT) |
commit | 7c1e089fd3d2560322e643c6c1c3b1e73bf04c98 (patch) | |
tree | 7486241a3bd88097f427856b4d2c8ab12576e620 /src/script | |
parent | d7b24639a40706f75071640eefa11adf5902e0ed (diff) | |
download | Qt-7c1e089fd3d2560322e643c6c1c3b1e73bf04c98.zip Qt-7c1e089fd3d2560322e643c6c1c3b1e73bf04c98.tar.gz Qt-7c1e089fd3d2560322e643c6c1c3b1e73bf04c98.tar.bz2 |
Detect evaluation context in the backtrace
Diffstat (limited to 'src/script')
-rw-r--r-- | src/script/api/qscriptcontext.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/script/api/qscriptcontext.cpp b/src/script/api/qscriptcontext.cpp index 689ad66..75ad505 100644 --- a/src/script/api/qscriptcontext.cpp +++ b/src/script/api/qscriptcontext.cpp @@ -619,8 +619,11 @@ QString QScriptContext::toString() const QString functionName = info.functionName(); if (functionName.isEmpty()) { if (parentContext()) { + const JSC::CallFrame *frame = QScriptEnginePrivate::frameForContext(this); if (info.functionType() == QScriptContextInfo::ScriptFunction) result.append(QLatin1String("<anonymous>")); + else if(frame->callerFrame()->hasHostCallFrameFlag()) + result.append(QLatin1String("<eval>")); else result.append(QLatin1String("<native>")); } else { |