From 833336fa963b3cd9f1996d7d255098f523dfa580 Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Fri, 9 Mar 2012 11:40:44 +0100 Subject: Loosen shared binding tests Previously we blocked all function calls, but only because we were trying to prevent "eval" calls from appearing in shared bindings. Instead this test allows function calls as long as the identifier "eval" doesn't appear. This also exposed a crash with v8 bindings that is also fixed. Change-Id: I22eefd290c7b82d9c01b2cd2907a46e560ae4db9 Reviewed-by: Chris Adams Reviewed-by: Michael Brasser --- src/qml/qml/qqmlrewrite.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/qml/qml/qqmlrewrite.cpp') diff --git a/src/qml/qml/qqmlrewrite.cpp b/src/qml/qml/qqmlrewrite.cpp index 0bd8597ec4..bbb17b631d 100644 --- a/src/qml/qml/qqmlrewrite.cpp +++ b/src/qml/qml/qqmlrewrite.cpp @@ -51,6 +51,8 @@ DEFINE_BOOL_CONFIG_OPTION(rewriteDump, QML_REWRITE_DUMP); namespace QQmlRewrite { +QString SharedBindingTester::evalString("eval"); + static void rewriteStringLiteral(AST::StringLiteral *ast, const QString *code, int startPosition, TextWriter *writer) { const unsigned position = ast->firstSourceLocation().begin() - startPosition + 1; -- cgit v1.2.3