aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4objectproto.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2014-01-08 12:46:53 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-01-20 21:13:43 +0100
commit50d6e51c73a37858699b90d64657cec5e0b53610 (patch)
treeff56a6973b360186f81f2c22eda7c1bc750ebab6 /src/qml/jsruntime/qv4objectproto.cpp
parentf5cde6dbd8ecea7c8c4b9e48f0e7d217fb24149b (diff)
clean up Object::has(Own)Property
hasProperty is now implemented by calling hasOwnProperty on the proto chain. In addition, it should be slightly faster and doesn't use API that returns a Property pointer anymore. Change-Id: I6312d83ccfed3f0a1a8ec4c72c436a426d6eab44 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4objectproto.cpp')
-rw-r--r--src/qml/jsruntime/qv4objectproto.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/qml/jsruntime/qv4objectproto.cpp b/src/qml/jsruntime/qv4objectproto.cpp
index ac19101a29..9474442a70 100644
--- a/src/qml/jsruntime/qv4objectproto.cpp
+++ b/src/qml/jsruntime/qv4objectproto.cpp
@@ -596,13 +596,13 @@ void ObjectPrototype::toPropertyDescriptor(ExecutionContext *ctx, const ValueRef
desc->setSetter(0);
ScopedValue tmp(scope);
- if (o->__hasProperty__(ctx->engine->id_enumerable))
+ if (o->hasProperty(ctx->engine->id_enumerable))
attrs->setEnumerable((tmp = o->get(ctx->engine->id_enumerable))->toBoolean());
- if (o->__hasProperty__(ctx->engine->id_configurable))
+ if (o->hasProperty(ctx->engine->id_configurable))
attrs->setConfigurable((tmp = o->get(ctx->engine->id_configurable))->toBoolean());
- if (o->__hasProperty__(ctx->engine->id_get)) {
+ if (o->hasProperty(ctx->engine->id_get)) {
ScopedValue get(scope, o->get(ctx->engine->id_get));
FunctionObject *f = get->asFunctionObject();
if (f) {
@@ -616,7 +616,7 @@ void ObjectPrototype::toPropertyDescriptor(ExecutionContext *ctx, const ValueRef
attrs->setType(PropertyAttributes::Accessor);
}
- if (o->__hasProperty__(ctx->engine->id_set)) {
+ if (o->hasProperty(ctx->engine->id_set)) {
ScopedValue set(scope, o->get(ctx->engine->id_set));
FunctionObject *f = set->asFunctionObject();
if (f) {
@@ -630,7 +630,7 @@ void ObjectPrototype::toPropertyDescriptor(ExecutionContext *ctx, const ValueRef
attrs->setType(PropertyAttributes::Accessor);
}
- if (o->__hasProperty__(ctx->engine->id_writable)) {
+ if (o->hasProperty(ctx->engine->id_writable)) {
if (attrs->isAccessor()) {
ctx->throwTypeError();
return;
@@ -640,7 +640,7 @@ void ObjectPrototype::toPropertyDescriptor(ExecutionContext *ctx, const ValueRef
desc->value = Primitive::undefinedValue();
}
- if (o->__hasProperty__(ctx->engine->id_value)) {
+ if (o->hasProperty(ctx->engine->id_value)) {
if (attrs->isAccessor()) {
ctx->throwTypeError();
return;