diff options
author | Ben Murdoch <benm@google.com> | 2009-08-26 12:42:59 +0100 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2009-09-02 12:32:47 +0100 |
commit | 30719f18a1aeee2464dca86c0b93bd9397a4ea42 (patch) | |
tree | 73c52b9e7ac22d6fc10ce710bd9a405d6d9b4285 /WebCore/bindings/js/JSSQLTransactionCustom.cpp | |
parent | 4d19269bce7d5e32eb2c3cc1f469d207d8b15bb1 (diff) | |
download | external_webkit-30719f18a1aeee2464dca86c0b93bd9397a4ea42.zip external_webkit-30719f18a1aeee2464dca86c0b93bd9397a4ea42.tar.gz external_webkit-30719f18a1aeee2464dca86c0b93bd9397a4ea42.tar.bz2 |
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.
Diffstat (limited to 'WebCore/bindings/js/JSSQLTransactionCustom.cpp')
-rw-r--r-- | WebCore/bindings/js/JSSQLTransactionCustom.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
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(); |