From 30719f18a1aeee2464dca86c0b93bd9397a4ea42 Mon Sep 17 00:00:00 2001 From: Ben Murdoch Date: Wed, 26 Aug 2009 12:42:59 +0100 Subject: Add functionality to V8 bindings for SQLTransaction to allow array-like objects to be passed as the second parameter to executeSql(), and ensure exceptions are thrown in the right places. --- WebCore/bindings/js/JSSQLTransactionCustom.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'WebCore/bindings/js/JSSQLTransactionCustom.cpp') diff --git a/WebCore/bindings/js/JSSQLTransactionCustom.cpp b/WebCore/bindings/js/JSSQLTransactionCustom.cpp index 30d59aa..dbe8e3c 100644 --- a/WebCore/bindings/js/JSSQLTransactionCustom.cpp +++ b/WebCore/bindings/js/JSSQLTransactionCustom.cpp @@ -44,6 +44,11 @@ namespace WebCore { JSValue JSSQLTransaction::executeSql(ExecState* exec, const ArgList& args) { + if (args.isEmpty()) { + setDOMException(exec, SYNTAX_ERR); + return jsUndefined(); + } + String sqlStatement = args.at(0).toString(exec); if (exec->hadException()) return jsUndefined(); -- cgit v1.1