diff options
author | Lars Knoll <lars.knoll@qt.io> | 2018-08-12 15:20:28 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2018-08-23 08:13:18 +0000 |
commit | abd32822d997976e994832239ae9939e4d1e0cf0 (patch) | |
tree | ce40770e2b2a13b34d635476a8972f80a19d7475 | |
parent | 653d5aa353f70e86d0b9a575435121c4a23184a4 (diff) |
Fix name property of %TypedArray% object
Change-Id: Ic0d46afe1ce6c57a839803dc8defccec6b3ddfc8
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
-rw-r--r-- | src/qml/jsruntime/qv4typedarray.cpp | 4 | ||||
-rw-r--r-- | tests/auto/qml/ecmascripttests/TestExpectations | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4typedarray.cpp b/src/qml/jsruntime/qv4typedarray.cpp index bdede94d46..e064efd486 100644 --- a/src/qml/jsruntime/qv4typedarray.cpp +++ b/src/qml/jsruntime/qv4typedarray.cpp @@ -662,8 +662,11 @@ ReturnedValue IntrinsicTypedArrayCtor::virtualCall(const FunctionObject *f, cons void IntrinsicTypedArrayPrototype::init(ExecutionEngine *engine, IntrinsicTypedArrayCtor *ctor) { + Scope scope(engine); ctor->defineReadonlyProperty(engine->id_prototype(), *this); ctor->defineReadonlyConfigurableProperty(engine->id_length(), Primitive::fromInt32(0)); + ScopedString s(scope, engine->newString(QStringLiteral("TypedArray"))); + ctor->defineReadonlyConfigurableProperty(engine->id_name(), s); ctor->addSymbolSpecies(); defineAccessorProperty(QStringLiteral("buffer"), method_get_buffer, nullptr); @@ -676,7 +679,6 @@ void IntrinsicTypedArrayPrototype::init(ExecutionEngine *engine, IntrinsicTypedA defineDefaultProperty(QStringLiteral("set"), method_set, 1); defineDefaultProperty(QStringLiteral("subarray"), method_subarray, 0); - Scope scope(engine); ScopedString valuesString(scope, engine->newIdentifier(QStringLiteral("values"))); ScopedObject values(scope, FunctionObject::createBuiltinFunction(engine, valuesString, method_values, 0)); defineDefaultProperty(QStringLiteral("values"), values); diff --git a/tests/auto/qml/ecmascripttests/TestExpectations b/tests/auto/qml/ecmascripttests/TestExpectations index b71a9c8cdc..0fc97ca033 100644 --- a/tests/auto/qml/ecmascripttests/TestExpectations +++ b/tests/auto/qml/ecmascripttests/TestExpectations @@ -683,7 +683,6 @@ built-ins/TypedArray/from/iter-next-value-error.js fails built-ins/TypedArray/from/length.js fails built-ins/TypedArray/from/name.js fails built-ins/TypedArray/from/prop-desc.js fails -built-ins/TypedArray/name.js fails built-ins/TypedArray/of/length.js fails built-ins/TypedArray/of/name.js fails built-ins/TypedArray/of/prop-desc.js fails |