diff options
Diffstat (limited to 'src/qml/jsruntime/qv4booleanobject.cpp')
| -rw-r--r-- | src/qml/jsruntime/qv4booleanobject.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4booleanobject.cpp b/src/qml/jsruntime/qv4booleanobject.cpp index d4d6201c01..025f98351f 100644 --- a/src/qml/jsruntime/qv4booleanobject.cpp +++ b/src/qml/jsruntime/qv4booleanobject.cpp @@ -95,7 +95,9 @@ ReturnedValue BooleanPrototype::method_toString(SimpleCallContext *ctx) ReturnedValue BooleanPrototype::method_valueOf(SimpleCallContext *ctx) { - // ### Shouldn't this work for a boolean thisObject? + if (ctx->callData->thisObject.isBoolean()) + return ctx->callData->thisObject.asReturnedValue(); + Scope scope(ctx); Scoped<BooleanObject> thisObject(scope, ctx->callData->thisObject); if (!thisObject) |
