The function prototype has a length property
authorLars Knoll <lars.knoll@digia.com>
Sun, 27 Jan 2013 21:13:28 +0000 (22:13 +0100)
committerSimon Hausmann <simon.hausmann@digia.com>
Mon, 28 Jan 2013 12:06:34 +0000 (13:06 +0100)
Change-Id: I1ef4d7c86ac5c5a8e7ed08081a86c4f826527c0d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
qv4functionobject.cpp

index b580f84..c857e23 100644 (file)
@@ -206,6 +206,8 @@ void FunctionPrototype::init(ExecutionContext *ctx, const Value &ctor)
     defineDefaultProperty(ctx, QStringLiteral("apply"), method_apply, 2);
     defineDefaultProperty(ctx, QStringLiteral("call"), method_call, 1);
     defineDefaultProperty(ctx, QStringLiteral("bind"), method_bind, 1);
+
+    defineReadonlyProperty(ctx->engine->id_length, Value::fromInt32(0));
 }
 
 Value FunctionPrototype::method_toString(ExecutionContext *ctx)