diff options
author | Lars Knoll <lars.knoll@qt.io> | 2018-05-14 23:07:45 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2018-05-15 18:21:10 +0000 |
commit | cc8cb4b442fe28f1b601d6f1f27e8c59231007be (patch) | |
tree | fd5c2a0039691eace1e6af804578b7db0107817c /src/qml/jsruntime/qv4engine.cpp | |
parent | 3fae4819d33d22039f01ce26e1549b5d0fcc96cf (diff) |
Implement Symbol.species getter functions
Change-Id: I18b3e382e679f95d7cb53b4ed03be2513ea0204b
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4engine.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4engine.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4engine.cpp b/src/qml/jsruntime/qv4engine.cpp index 96855b6155..6edf7ddf37 100644 --- a/src/qml/jsruntime/qv4engine.cpp +++ b/src/qml/jsruntime/qv4engine.cpp @@ -422,6 +422,9 @@ ExecutionEngine::ExecutionEngine(QJSEngine *jsEngine) jsObjects[ArrayIteratorProto] = memoryManager->allocObject<ArrayIteratorPrototype>(newInternalClass(ArrayIteratorPrototype::staticVTable(), iteratorPrototype())); jsObjects[StringIteratorProto] = memoryManager->allocObject<StringIteratorPrototype>(newInternalClass(StringIteratorPrototype::staticVTable(), iteratorPrototype())); + str = newString(QStringLiteral("get [Symbol.species]")); + jsObjects[GetSymbolSpecies] = FunctionObject::createBuiltinFunction(this, str, ArrayPrototype::method_get_species, 0); + static_cast<ObjectPrototype *>(objectPrototype())->init(this, objectCtor()); static_cast<StringPrototype *>(stringPrototype())->init(this, stringCtor()); static_cast<SymbolPrototype *>(symbolPrototype())->init(this, symbolCtor()); |