Don't crash on for(x in null)
authorLars Knoll <lars.knoll@digia.com>
Wed, 23 Jan 2013 19:44:47 +0000 (20:44 +0100)
committerSimon Hausmann <simon.hausmann@digia.com>
Wed, 23 Jan 2013 20:32:03 +0000 (21:32 +0100)
Change-Id: I3bd5610fa9bffcc195bb1c96a5a595061931a20e
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
qmljs_runtime.cpp
tests/TestExpectations

index dddf89a..f23a93e 100644 (file)
@@ -631,7 +631,7 @@ Value __qmljs_foreach_iterator_object(Value in, ExecutionContext *ctx)
 {
     if (!in.isNull() && !in.isUndefined())
         in = __qmljs_to_object(in, ctx);
-    Object *it = ctx->engine->newForEachIteratorObject(ctx, in.objectValue());
+    Object *it = ctx->engine->newForEachIteratorObject(ctx, in.asObject());
     return Value::fromObject(it);
 }
 
index 0aa424d..a6d9ca6 100644 (file)
@@ -198,7 +198,6 @@ S15.1.2.1_A4.2 failing
 S15.1.2.1_A4.3 failing
 S15.1.2.1_A4.4 failing
 S15.1.2.1_A4.7 failing
-S12.6.4_A2 failing
 S12.7_A7 failing
 S12.8_A4_T1 failing
 S12.8_A4_T2 failing