aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4proxy.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/jsruntime/qv4proxy.cpp')
-rw-r--r--src/qml/jsruntime/qv4proxy.cpp15
1 files changed, 4 insertions, 11 deletions
diff --git a/src/qml/jsruntime/qv4proxy.cpp b/src/qml/jsruntime/qv4proxy.cpp
index 1e0c452430..06ed889c60 100644
--- a/src/qml/jsruntime/qv4proxy.cpp
+++ b/src/qml/jsruntime/qv4proxy.cpp
@@ -150,7 +150,7 @@ bool ProxyObject::putIndexed(Managed *m, uint index, const Value &value)
return put(m, name, value);
}
-bool ProxyObject::deleteProperty(Managed *m, StringOrSymbol *name)
+bool ProxyObject::deleteProperty(Managed *m, Identifier id)
{
Scope scope(m);
const ProxyObject *o = static_cast<const ProxyObject *>(m);
@@ -165,20 +165,20 @@ bool ProxyObject::deleteProperty(Managed *m, StringOrSymbol *name)
if (scope.hasException())
return Encode::undefined();
if (trap->isNullOrUndefined())
- return target->deleteProperty(name);
+ return target->deleteProperty(id);
if (!trap->isFunctionObject())
return scope.engine->throwTypeError();
JSCallData cdata(scope, 3, nullptr, handler);
cdata.args[0] = target;
- cdata.args[1] = name;
+ cdata.args[1] = id.toStringOrSymbol(scope.engine);
cdata.args[2] = o->d(); // ### fix receiver handling
ScopedValue trapResult(scope, static_cast<const FunctionObject *>(trap.ptr)->call(cdata));
if (!trapResult->toBoolean())
return false;
ScopedProperty targetDesc(scope);
- PropertyAttributes attributes = target->getOwnProperty(name->toPropertyKey(), targetDesc);
+ PropertyAttributes attributes = target->getOwnProperty(id, targetDesc);
if (attributes == Attr_Invalid)
return true;
if (!attributes.isConfigurable())
@@ -186,13 +186,6 @@ bool ProxyObject::deleteProperty(Managed *m, StringOrSymbol *name)
return true;
}
-bool ProxyObject::deleteIndexedProperty(Managed *m, uint index)
-{
- Scope scope(m);
- ScopedString name(scope, Primitive::fromUInt32(index).toString(scope.engine));
- return deleteProperty(m, name);
-}
-
bool ProxyObject::hasProperty(const Managed *m, Identifier id)
{
Scope scope(m);