Properly set the length of the eval function
authorLars Knoll <lars.knoll@digia.com>
Mon, 28 Jan 2013 09:39:40 +0000 (10:39 +0100)
committerSimon Hausmann <simon.hausmann@digia.com>
Mon, 28 Jan 2013 12:31:29 +0000 (13:31 +0100)
Change-Id: I88a483f5c9a758c4983d5d3b2c684f6bc7e8cf55
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
qv4globalobject.cpp

index f75d313..337196c 100644 (file)
@@ -311,6 +311,7 @@ EvalFunction::EvalFunction(ExecutionContext *scope)
     : FunctionObject(scope)
 {
     name = scope->engine->id_eval;
+    defineReadonlyProperty(scope->engine->id_length, Value::fromInt32(1));
 }
 
 Value EvalFunction::evalCall(ExecutionContext *context, Value /*thisObject*/, Value *args, int argc, bool directCall)