diff options
author | Kent Hansen <khansen@trolltech.com> | 2009-08-10 10:08:21 (GMT) |
---|---|---|
committer | Kent Hansen <khansen@trolltech.com> | 2009-08-10 10:08:21 (GMT) |
commit | 94cf9e210e155be9cb93ac321b2f68725b47e58d (patch) | |
tree | 13248db89e326afbc8b38d3ab0e69e0d5f03543d /src/script | |
parent | ba10f3506ea3003aa6282000f1d1889606ba711d (diff) | |
download | Qt-94cf9e210e155be9cb93ac321b2f68725b47e58d.zip Qt-94cf9e210e155be9cb93ac321b2f68725b47e58d.tar.gz Qt-94cf9e210e155be9cb93ac321b2f68725b47e58d.tar.bz2 |
extract the function name from the callee
Diffstat (limited to 'src/script')
-rw-r--r-- | src/script/api/qscriptcontextinfo.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/script/api/qscriptcontextinfo.cpp b/src/script/api/qscriptcontextinfo.cpp index 4e28d62..eb9daf0 100644 --- a/src/script/api/qscriptcontextinfo.cpp +++ b/src/script/api/qscriptcontextinfo.cpp @@ -157,6 +157,8 @@ QScriptContextInfoPrivate::QScriptContextInfoPrivate(const QScriptContext *conte const JSC::ExecState *frame = reinterpret_cast<const JSC::ExecState *>(context); JSC::JSObject *callee = frame->callee(); + if (callee && callee->isObject(&JSC::InternalFunction::info)) + functionName = QScript::qtStringFromJSCUString(JSC::asInternalFunction(callee)->name(&frame->globalData())); if (callee && callee->isObject(&JSC::JSFunction::info)) { functionType = QScriptContextInfo::ScriptFunction; JSC::SourceProvider *source = frame->codeBlock()->source(); |