aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/qml/jsruntime/qv4typedarray.cpp9
-rw-r--r--tests/auto/qml/ecmascripttests/TestExpectations1
2 files changed, 7 insertions, 3 deletions
diff --git a/src/qml/jsruntime/qv4typedarray.cpp b/src/qml/jsruntime/qv4typedarray.cpp
index 2fa4a9ecaf..3eadfe04a6 100644
--- a/src/qml/jsruntime/qv4typedarray.cpp
+++ b/src/qml/jsruntime/qv4typedarray.cpp
@@ -655,9 +655,14 @@ void IntrinsicTypedArrayPrototype::init(ExecutionEngine *engine, IntrinsicTypedA
defineDefaultProperty(QStringLiteral("entries"), method_entries, 0);
defineDefaultProperty(QStringLiteral("keys"), method_keys, 0);
- defineDefaultProperty(QStringLiteral("values"), method_values, 0);
defineDefaultProperty(QStringLiteral("set"), method_set, 1);
defineDefaultProperty(QStringLiteral("subarray"), method_subarray, 0);
- defineDefaultProperty(engine->symbol_iterator(), method_values, 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);
+ defineDefaultProperty(engine->symbol_iterator(), values);
+
defineAccessorProperty(engine->symbol_toStringTag(), method_get_toStringTag, nullptr);
}
diff --git a/tests/auto/qml/ecmascripttests/TestExpectations b/tests/auto/qml/ecmascripttests/TestExpectations
index 6001062dfe..4f499824f7 100644
--- a/tests/auto/qml/ecmascripttests/TestExpectations
+++ b/tests/auto/qml/ecmascripttests/TestExpectations
@@ -1647,7 +1647,6 @@ 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
-built-ins/TypedArray/prototype/Symbol.iterator.js fails
built-ins/TypedArray/prototype/Symbol.toStringTag/detached-buffer.js fails
built-ins/TypedArray/prototype/buffer/detached-buffer.js fails
built-ins/TypedArray/prototype/byteLength/detached-buffer.js fails