aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4proxy.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2018-06-19 13:31:21 +0200
committerLars Knoll <lars.knoll@qt.io>2018-06-25 07:36:52 +0000
commit89898873ee9171c0f11cc872347a0ae08153d728 (patch)
treecc690aacd6e600f32f2150e62ddefe42d03c7250 /src/qml/jsruntime/qv4proxy.cpp
parent1596112e146b28541bcee412ed159cdea7e692d0 (diff)
Fix a smaller spec incompatibility in Proxy
A null trap is also allowed. Change-Id: I9dd2548c27c6341dc9ad725fb5be5bebd6c04b9a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4proxy.cpp')
-rw-r--r--src/qml/jsruntime/qv4proxy.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/qml/jsruntime/qv4proxy.cpp b/src/qml/jsruntime/qv4proxy.cpp
index 80e1b70a1a..1e0c452430 100644
--- a/src/qml/jsruntime/qv4proxy.cpp
+++ b/src/qml/jsruntime/qv4proxy.cpp
@@ -68,7 +68,7 @@ ReturnedValue ProxyObject::get(const Managed *m, StringOrSymbol *name, bool *has
ScopedValue trap(scope, handler->get(scope.engine->id_get()));
if (scope.hasException())
return Encode::undefined();
- if (trap->isUndefined())
+ if (trap->isNullOrUndefined())
return target->get(name, hasProperty);
if (!trap->isFunctionObject())
return scope.engine->throwTypeError();
@@ -116,7 +116,7 @@ bool ProxyObject::put(Managed *m, StringOrSymbol *name, const Value &value)
ScopedValue trap(scope, handler->get(scope.engine->id_set()));
if (scope.hasException())
return Encode::undefined();
- if (trap->isUndefined())
+ if (trap->isNullOrUndefined())
return target->put(name, value);
if (!trap->isFunctionObject())
return scope.engine->throwTypeError();
@@ -164,7 +164,7 @@ bool ProxyObject::deleteProperty(Managed *m, StringOrSymbol *name)
ScopedValue trap(scope, handler->get(deleteProp));
if (scope.hasException())
return Encode::undefined();
- if (trap->isUndefined())
+ if (trap->isNullOrUndefined())
return target->deleteProperty(name);
if (!trap->isFunctionObject())
return scope.engine->throwTypeError();
@@ -207,7 +207,7 @@ bool ProxyObject::hasProperty(const Managed *m, Identifier id)
ScopedValue trap(scope, handler->get(hasProp));
if (scope.hasException())
return Encode::undefined();
- if (trap->isUndefined())
+ if (trap->isNullOrUndefined())
return target->hasProperty(m, id);
if (!trap->isFunctionObject())
return scope.engine->throwTypeError();
@@ -245,7 +245,7 @@ PropertyAttributes ProxyObject::getOwnProperty(Managed *m, Identifier id, Proper
ScopedValue trap(scope, handler->get(deleteProp));
if (scope.hasException())
return Attr_Invalid;
- if (trap->isUndefined())
+ if (trap->isNullOrUndefined())
return target->getOwnProperty(id, p);
if (!trap->isFunctionObject()) {
scope.engine->throwTypeError();
@@ -313,7 +313,7 @@ bool ProxyObject::isExtensible(const Managed *m)
ScopedValue trap(scope, handler->get(hasProp));
if (scope.hasException())
return Encode::undefined();
- if (trap->isUndefined())
+ if (trap->isNullOrUndefined())
return target->isExtensible();
if (!trap->isFunctionObject())
return scope.engine->throwTypeError();
@@ -344,7 +344,7 @@ bool ProxyObject::preventExtensions(Managed *m)
ScopedValue trap(scope, handler->get(hasProp));
if (scope.hasException())
return Encode::undefined();
- if (trap->isUndefined())
+ if (trap->isNullOrUndefined())
return target->preventExtensions();
if (!trap->isFunctionObject())
return scope.engine->throwTypeError();