aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4runtime_p.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2018-05-27 22:58:32 +0200
committerLars Knoll <lars.knoll@qt.io>2018-05-28 10:40:08 +0000
commit3ccd529e350fdf20ad3fb7b296220d63f8bcc747 (patch)
treec755f0c029543fbf2afd510156e1d51c28a8b28b /src/qml/jsruntime/qv4runtime_p.h
parent23aa9d58d006dd50adb3f582df9b7dab4f64be0b (diff)
Implement toPrimitive() the way the ES7 spec wants it
Add Dat.prototype[Symbol.toPrimitive] and make use of those methods in the toPrimitive implementation. Change-Id: I82a9a94dcae6822100de364373b3f4de1e3d749b Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
Diffstat (limited to 'src/qml/jsruntime/qv4runtime_p.h')
-rw-r--r--src/qml/jsruntime/qv4runtime_p.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4runtime_p.h b/src/qml/jsruntime/qv4runtime_p.h
index 3a26c23990..72af90d1dc 100644
--- a/src/qml/jsruntime/qv4runtime_p.h
+++ b/src/qml/jsruntime/qv4runtime_p.h
@@ -100,6 +100,7 @@ enum TypeHint {
struct Q_QML_PRIVATE_EXPORT RuntimeHelpers {
static ReturnedValue objectDefaultValue(const Object *object, int typeHint);
static ReturnedValue toPrimitive(const Value &value, TypeHint typeHint);
+ static ReturnedValue ordinaryToPrimitive(ExecutionEngine *engine, const Object *object, String *typeHint);
static double stringToNumber(const QString &s);
static Heap::String *stringFromNumber(ExecutionEngine *engine, double number);