summaryrefslogtreecommitdiffstats
path: root/src/script
diff options
context:
space:
mode:
authorKent Hansen <khansen@trolltech.com>2009-08-10 10:08:21 (GMT)
committerKent Hansen <khansen@trolltech.com>2009-08-10 10:08:21 (GMT)
commit94cf9e210e155be9cb93ac321b2f68725b47e58d (patch)
tree13248db89e326afbc8b38d3ab0e69e0d5f03543d /src/script
parentba10f3506ea3003aa6282000f1d1889606ba711d (diff)
downloadQt-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.cpp2
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();