diff options
author | Lars Knoll <lars.knoll@qt.io> | 2018-06-17 22:27:04 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2018-06-25 07:36:30 +0000 |
commit | 53bbda2dfeac39f6f28e507ea9a92965076b65e6 (patch) | |
tree | 7886b3f809dfbee9d16878ccc34f1d07a7f83646 /src/qml/jsruntime/qv4context.cpp | |
parent | 6f98978ef1a79da65dba8c5cf2c1d3d434c13690 (diff) |
Add virtual interface for hasProperty
This is required to correctly support Proxy
Change-Id: I95ec17e919915290a05ad9501cd649452ab82135
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4context.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4context.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4context.cpp b/src/qml/jsruntime/qv4context.cpp index 61657477b0..03a56cb173 100644 --- a/src/qml/jsruntime/qv4context.cpp +++ b/src/qml/jsruntime/qv4context.cpp @@ -209,7 +209,7 @@ bool ExecutionContext::deleteProperty(String *name) if (ctx->activation) { Scope scope(this); ScopedObject object(scope, ctx->activation); - if (object && object->hasProperty(name)) + if (object && object->hasProperty(name->toPropertyKey())) return object->deleteProperty(name); } break; @@ -236,7 +236,7 @@ ExecutionContext::Error ExecutionContext::setProperty(String *name, const Value case Heap::ExecutionContext::Type_WithContext: { Scope scope(v4); ScopedObject w(scope, ctx->activation); - if (w->hasProperty(name)) { + if (w->hasProperty(name->toPropertyKey())) { if (!w->put(name, value)) return TypeError; return NoError; |