Change-Id: Ia25515e5f5e9af561c66589a2aa0c524167719ff
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
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);