Fix regression in Object.isExtensible()
authorLars Knoll <lars.knoll@digia.com>
Fri, 13 Sep 2013 06:37:49 +0000 (08:37 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Wed, 18 Sep 2013 11:13:52 +0000 (13:13 +0200)
We need to encode a bool, but the extensible flag
in Object is a bitfield (ie uint).

Change-Id: I2461c8ae90e92840da737c0c7ee88b9a2cee21e3
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
src/qml/jsruntime/qv4objectproto.cpp

index 0d168ea..da66b24 100644 (file)
@@ -344,7 +344,7 @@ ReturnedValue ObjectPrototype::method_isExtensible(SimpleCallContext *ctx)
         ctx->throwTypeError();
 
     Object *o = ctx->argument(0).objectValue();
-    return Encode(o->extensible);
+    return Encode((bool)o->extensible);
 }
 
 ReturnedValue ObjectPrototype::method_keys(SimpleCallContext *ctx)