aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4context.cpp
diff options
context:
space:
mode:
authorLars Knoll <[email protected]>2016-11-30 16:20:32 +0100
committerLars Knoll <[email protected]>2016-12-06 13:01:44 +0000
commitb4ccdf004af8ab5b9e327abf7f87d0bd34ee13c0 (patch)
treed8152287ce8401d4725ad4d0ba6b84a71e1e4f3e /src/qml/jsruntime/qv4context.cpp
parent54c79346f1929ff14673e1ab40a1bfd66ba6e2c5 (diff)
Change ExecutionContext::getFunctionObject() to getFunction()
And return a QV4::Function from now on. This simplifies code in other places and provides all the info required for stack traces and debugging. Change-Id: I512a8ac3932268d8cfc60675e75c4661d1f16fd8 Reviewed-by: Simon Hausmann <[email protected]>
Diffstat (limited to 'src/qml/jsruntime/qv4context.cpp')
-rw-r--r--src/qml/jsruntime/qv4context.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4context.cpp b/src/qml/jsruntime/qv4context.cpp
index 5d4a1b07b5..26f2f996a6 100644
--- a/src/qml/jsruntime/qv4context.cpp
+++ b/src/qml/jsruntime/qv4context.cpp
@@ -524,13 +524,13 @@ ReturnedValue ExecutionContext::getPropertyAndBase(String *name, Value *base)
return engine()->throwReferenceError(n);
}
-Heap::FunctionObject *ExecutionContext::getFunctionObject() const
+Function *ExecutionContext::getFunction() const
{
Scope scope(d()->engine);
ScopedContext it(scope, this->d());
for (; it; it = it->d()->outer) {
if (const CallContext *callCtx = it->asCallContext())
- return callCtx->d()->function;
+ return callCtx->d()->v4Function;
else if (it->asCatchContext() || it->asWithContext())
continue; // look in the parent context for a FunctionObject
else