From 700ba1bcb39e082049c96fafdfaccfe5d83cd77e Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Wed, 18 Sep 2013 15:34:13 +0200 Subject: Use a StringRef for Managed::get() also store "toString" and "valueOf" as identifiers in the engine and fix two places where we compared strings the wrong way. Change-Id: I70612221e72d43ed0e3c496e4209681bf254cded Reviewed-by: Simon Hausmann --- src/qml/jsruntime/qv4functionobject.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/qml/jsruntime/qv4functionobject.cpp') diff --git a/src/qml/jsruntime/qv4functionobject.cpp b/src/qml/jsruntime/qv4functionobject.cpp index 851bc49c6b..59d6fdb40a 100644 --- a/src/qml/jsruntime/qv4functionobject.cpp +++ b/src/qml/jsruntime/qv4functionobject.cpp @@ -274,7 +274,7 @@ void FunctionPrototype::init(ExecutionEngine *engine, const Value &ctor) defineReadonlyProperty(engine->id_length, Value::fromInt32(0)); defineDefaultProperty(QStringLiteral("constructor"), ctor); - defineDefaultProperty(QStringLiteral("toString"), method_toString, 0); + defineDefaultProperty(engine->id_toString, method_toString, 0); defineDefaultProperty(QStringLiteral("apply"), method_apply, 2); defineDefaultProperty(QStringLiteral("call"), method_call, 1); defineDefaultProperty(QStringLiteral("bind"), method_bind, 1); -- cgit v1.2.3