diff options
author | Simon Hausmann <[email protected]> | 2013-08-16 16:35:05 +0200 |
---|---|---|
committer | Lars Knoll <[email protected]> | 2013-08-16 19:14:55 +0200 |
commit | 5ef4dd00f93d12a59cb01fa6ff44e2f01e3f71a1 (patch) | |
tree | e91dbd1baf691e39eeab89451f1090eff10f08b1 /src/qml/jsruntime/qv4context.cpp | |
parent | 0d4657cc172d8b3dbd491da10ff88912603b0024 (diff) |
Ported identifiers in moth to use runtime strings
Change-Id: I09f04994a2ebe631b12fa76b77a622711de31926
Reviewed-by: Lars Knoll <[email protected]>
Diffstat (limited to 'src/qml/jsruntime/qv4context.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4context.cpp | 9 |
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; } |