diff options
author | Lars Knoll <lars.knoll@qt.io> | 2018-06-19 12:07:40 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2018-06-25 07:36:44 +0000 |
commit | 3823e9b94f849f8344b81250fac708ac2eaccd16 (patch) | |
tree | ffe4ce6f2df01889501b4c4e45b8241d02d973f5 /src/qml/jsruntime/qv4object.cpp | |
parent | 4094ce77af45427613e823a2a4d3c6087230d35a (diff) |
Support preventExtensions in Proxy handlers
Change-Id: I03aaacc260bdb46eb09c597598a45fbb25d6d7b6
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4object.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4object.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4object.cpp b/src/qml/jsruntime/qv4object.cpp index 751010fa4e..02acc1a5e0 100644 --- a/src/qml/jsruntime/qv4object.cpp +++ b/src/qml/jsruntime/qv4object.cpp @@ -1025,6 +1025,14 @@ bool Object::isExtensible(const Managed *m) return m->d()->internalClass->extensible; } +bool Object::preventExtensions(Managed *m) +{ + Q_ASSERT(m->isObject()); + Object *o = static_cast<Object *>(m); + o->setInternalClass(o->internalClass()->nonExtensible()); + return true; +} + bool Object::setArrayLength(uint newLen) { Q_ASSERT(isArrayObject()); |