diff options
Diffstat (limited to 'src/v4/qv4runtime.cpp')
-rw-r--r-- | src/v4/qv4runtime.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/v4/qv4runtime.cpp b/src/v4/qv4runtime.cpp index bf871ffd3e..d15be7bd9e 100644 --- a/src/v4/qv4runtime.cpp +++ b/src/v4/qv4runtime.cpp @@ -929,6 +929,24 @@ void __qmljs_call_value(ExecutionContext *context, Value *result, const Value *t *result = res; } + +void __qmljs_construct_global_lookup(ExecutionContext *context, Value *result, uint index, Value *args, int argc) +{ + Lookup *l = context->lookups + index; + Value func; + l->lookupGlobal(l, context, &func); + + if (Object *f = func.asObject()) { + Value res = f->construct(context, args, argc); + if (result) + *result = res; + return; + } + + context->throwTypeError(); +} + + void __qmljs_construct_activation_property(ExecutionContext *context, Value *result, String *name, Value *args, int argc) { Value func = context->getProperty(name); |