From 94cf9e210e155be9cb93ac321b2f68725b47e58d Mon Sep 17 00:00:00 2001 From: Kent Hansen Date: Mon, 10 Aug 2009 12:08:21 +0200 Subject: extract the function name from the callee --- src/script/api/qscriptcontextinfo.cpp | 2 ++ 1 file changed, 2 insertions(+) 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(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(); -- cgit v0.12