aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4typedarray_p.h
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2018-08-22 12:45:51 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2018-08-29 06:54:13 +0000
commit697564810f94ba32792ae714ca861e330bb4c657 (patch)
tree8f7f443edfe2662bf58177bef9d4dfe2bda58131 /src/qml/jsruntime/qv4typedarray_p.h
parent16f18f68e37661f45047c913b9e6f9068dbc88a9 (diff)
Fix dead temporal zone checking in module namespaces
Accessing uninitialized imports through the module namespace object should throw a reference error. Unfortunately we can't do this check on the caller side of the namespace object get, as we have no idea that we're talking to one. Therefore we must throw in the vtable methods. When checking via Reflect.has(), the properties should be reported as existing. This means providing a virtual hasProperty() in the module as well as changing Reflect::method_has to use the vtable method instead of doing a get (which would throw). Change-Id: Ic0ec51de3832c6a67044fc8f689ac534f349c1b6 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4typedarray_p.h')
-rw-r--r--src/qml/jsruntime/qv4typedarray_p.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4typedarray_p.h b/src/qml/jsruntime/qv4typedarray_p.h
index d29599f31e..909334adb0 100644
--- a/src/qml/jsruntime/qv4typedarray_p.h
+++ b/src/qml/jsruntime/qv4typedarray_p.h
@@ -166,6 +166,7 @@ struct Q_QML_PRIVATE_EXPORT TypedArray : Object
using Object::get;
static ReturnedValue virtualGet(const Managed *m, PropertyKey id, const Value *receiver, bool *hasProperty);
+ static bool virtualHasProperty(const Managed *m, PropertyKey id);
static bool virtualPut(Managed *m, PropertyKey id, const Value &value, Value *receiver);
};