aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4context.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <[email protected]>2013-08-16 16:35:05 +0200
committerLars Knoll <[email protected]>2013-08-16 19:14:55 +0200
commit5ef4dd00f93d12a59cb01fa6ff44e2f01e3f71a1 (patch)
treee91dbd1baf691e39eeab89451f1090eff10f08b1 /src/qml/jsruntime/qv4context.cpp
parent0d4657cc172d8b3dbd491da10ff88912603b0024 (diff)
Ported identifiers in moth to use runtime strings
Diffstat (limited to 'src/qml/jsruntime/qv4context.cpp')
-rw-r--r--src/qml/jsruntime/qv4context.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/qml/jsruntime/qv4context.cpp b/src/qml/jsruntime/qv4context.cpp
index 0effad944c..3c0dbe35b7 100644
--- a/src/qml/jsruntime/qv4context.cpp
+++ b/src/qml/jsruntime/qv4context.cpp
@@ -612,12 +612,15 @@ void ExecutionContext::throwURIError(Value msg)
const Function *ExecutionContext::runtimeFunction() const
{
- if (type >= Type_CallContext) {
- const QV4::FunctionObject *f = asCallContext()->function;
+ const ExecutionContext *ctx = this;
+ if (ctx->type == Type_CatchContext)
+ ctx = ctx->parent;
+ if (ctx->type >= Type_CallContext) {
+ const QV4::FunctionObject *f = ctx->asCallContext()->function;
Q_ASSERT(f);
return f ? f->function : 0;
}
- Q_ASSERT(type == Type_GlobalContext);
+ Q_ASSERT(ctx->type == Type_GlobalContext);
return engine->globalCode;
}