Small cleanup
authorLars Knoll <lars.knoll@digia.com>
Wed, 12 Dec 2012 08:00:30 +0000 (09:00 +0100)
committerSimon Hausmann <simon.hausmann@digia.com>
Wed, 12 Dec 2012 08:10:21 +0000 (09:10 +0100)
Change-Id: Ia25515e5f5e9af561c66589a2aa0c524167719ff
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
qmljs_runtime.cpp

index a00ac6c..4c200b2 100644 (file)
@@ -222,8 +222,8 @@ Value __qmljs_instanceof(Value left, Value right, ExecutionContext *ctx)
 Value __qmljs_in(Value left, Value right, ExecutionContext *ctx)
 {
     if (right.isObject()) {
-        Value s = __qmljs_to_string(left, ctx);
-        bool r = right.objectValue()->__hasProperty__(ctx, s.stringValue());
+        String *s = left.toString(ctx);
+        bool r = right.objectValue()->__hasProperty__(ctx, s);
         return Value::fromBoolean(r);
     } else {
         return __qmljs_throw_type_error(ctx);