Changeset 62094 in webkit
- Timestamp:
- Jun 29, 2010 12:39:39 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r62092 r62094 1 2010-06-28 Dumitru Daniliuc <dumi@chromium.org> 2 3 Reviewed by Adam Barth. 4 5 Remove a Chromium-specific expectations file. 6 https://bugs.webkit.org/show_bug.cgi?id=41297 7 8 * platform/chromium/storage/sql-error-codes-expected.txt: 9 * storage/sql-error-codes.js: 10 (testBindParameterOfWrongType): 11 1 12 2010-06-29 Zoltan Herczeg <zherczeg@webkit.org> 2 13 -
trunk/LayoutTests/platform/chromium/storage/sql-error-codes-expected.txt
r61352 r62094 1 1 CONSOLE MESSAGE: line 37: Uncaught Exception thrown in transaction callback. 2 CONSOLE MESSAGE: line 69: Uncaught Cannot call toString() on this object. 2 3 This test tests the error codes reported in exceptional situations. 3 4 PASS: expected and got error code UNKNOWN_ERR … … 5 6 PASS: expected and got error code SYNTAX_ERR 6 7 PASS: expected and got error code SYNTAX_ERR 7 The transaction in testBindParameterOfWrongType() was successful. 8 PASS: expected and got error code UNKNOWN_ERR 8 9 PASS: expected and got error code QUOTA_ERR 9 10 PASS: expected and got error code VERSION_ERR -
trunk/LayoutTests/storage/sql-error-codes.js
r61352 r62094 65 65 badString.toString = function() { throw "Cannot call toString() on this object." }; 66 66 67 // JSC will throw an exception when calling badString.toString(). V8 will catch it. 68 // So we run this transaction using a custom success callback. 69 db.transaction(function(tx) { 67 testTransaction(db, function(tx) { 70 68 tx.executeSql("CREATE TABLE IF NOT EXISTS BadBindTypeTest (Foo TEXT)"); 71 69 tx.executeSql("INSERT INTO BadBindTypeTest VALUES (?)", [badString]); 72 }, function(error) { 73 transactionErrorCallback(error, "UNKNOWN_ERR"); 74 }, function() { 75 log("The transaction in testBindParameterOfWrongType() was successful."); 76 testsRun++; 77 }); 70 }, "UNKNOWN_ERR"); 78 71 } 79 72 -
trunk/WebCore/ChangeLog
r62093 r62094 1 2010-06-29 Dumitru Daniliuc <dumi@chromium.org> 2 3 Reviewed by Adam Barth. 4 5 Catch toString() exceptions in all DB-related code. 6 https://bugs.webkit.org/show_bug.cgi?id=41297 7 8 * bindings/v8/custom/V8BindingMacros.h: 9 * bindings/v8/custom/V8DOMWindowCustom.cpp: 10 (WebCore::V8DOMWindow::openDatabaseCallback): 11 * bindings/v8/custom/V8DatabaseCustom.cpp: 12 (WebCore::V8Database::changeVersionCallback): 13 * bindings/v8/custom/V8DatabaseSyncCustom.cpp: 14 (WebCore::V8DatabaseSync::changeVersionCallback): 15 * bindings/v8/custom/V8SQLTransactionCustom.cpp: 16 (WebCore::V8SQLTransaction::executeSqlCallback): 17 * bindings/v8/custom/V8SQLTransactionSyncCustom.cpp: 18 (WebCore::V8SQLTransactionSync::executeSqlCallback): 19 * bindings/v8/custom/V8WorkerContextCustom.cpp: 20 (WebCore::V8WorkerContext::openDatabaseCallback): 21 (WebCore::V8WorkerContext::openDatabaseSyncCallback): 22 1 23 2010-06-29 Herczeg Zoltan <zherczeg@webkit.org> 2 24 -
trunk/WebCore/bindings/v8/custom/V8BindingMacros.h
r58989 r62094 29 29 */ 30 30 31 #define EXCEPTION_BLOCK(type, var, value) 32 type var; 33 { 34 v8::TryCatch block; 35 var = value;\36 if (block.HasCaught()) 37 return throwError(block.Exception());\31 #define EXCEPTION_BLOCK(type, var, value) \ 32 type var; \ 33 { \ 34 v8::TryCatch block; \ 35 var = (value); \ 36 if (block.HasCaught()) \ 37 return block.ReThrow(); \ 38 38 } 39 40 #define TO_WEBCORE_STRING_EXCEPTION_BLOCK(var, value) \ 41 String var; \ 42 { \ 43 v8::TryCatch block; \ 44 v8::Handle<v8::String> v8String = (value)->ToString(); \ 45 if (block.HasCaught()) \ 46 return block.ReThrow(); \ 47 var = v8StringToWebCoreString<String>(v8String, DoNotExternalize); \ 48 } -
trunk/WebCore/bindings/v8/custom/V8DOMWindowCustom.cpp
r60902 r62094 796 796 return throwError(SYNTAX_ERR); 797 797 798 EXCEPTION_BLOCK(String, name, toWebCoreString(args[0]));799 EXCEPTION_BLOCK(String, version, toWebCoreString(args[1]));800 EXCEPTION_BLOCK(String, displayName, toWebCoreString(args[2]));798 TO_WEBCORE_STRING_EXCEPTION_BLOCK(name, args[0]); 799 TO_WEBCORE_STRING_EXCEPTION_BLOCK(version, args[1]); 800 TO_WEBCORE_STRING_EXCEPTION_BLOCK(displayName, args[2]); 801 801 EXCEPTION_BLOCK(unsigned long, estimatedSize, args[3]->Uint32Value()); 802 802 -
trunk/WebCore/bindings/v8/custom/V8DatabaseCustom.cpp
r60330 r62094 51 51 return throwError(SYNTAX_ERR); 52 52 53 EXCEPTION_BLOCK(String, oldVersion, toWebCoreString(args[0]));54 EXCEPTION_BLOCK(String, newVersion, toWebCoreString(args[1]));53 TO_WEBCORE_STRING_EXCEPTION_BLOCK(oldVersion, args[0]); 54 TO_WEBCORE_STRING_EXCEPTION_BLOCK(newVersion, args[1]); 55 55 56 56 Database* database = V8Database::toNative(args.Holder()); -
trunk/WebCore/bindings/v8/custom/V8DatabaseSyncCustom.cpp
r60330 r62094 49 49 return throwError(SYNTAX_ERR); 50 50 51 EXCEPTION_BLOCK(String, oldVersion, toWebCoreString(args[0]));52 EXCEPTION_BLOCK(String, newVersion, toWebCoreString(args[1]));51 TO_WEBCORE_STRING_EXCEPTION_BLOCK(oldVersion, args[0]); 52 TO_WEBCORE_STRING_EXCEPTION_BLOCK(newVersion, args[1]); 53 53 54 54 DatabaseSync* database = V8DatabaseSync::toNative(args.Holder()); -
trunk/WebCore/bindings/v8/custom/V8SQLTransactionCustom.cpp
r60330 r62094 55 55 return throwError(SYNTAX_ERR); 56 56 57 EXCEPTION_BLOCK(String, statement, toWebCoreString(args[0]));57 TO_WEBCORE_STRING_EXCEPTION_BLOCK(statement, args[0]); 58 58 59 59 Vector<SQLValue> sqlValues; … … 82 82 sqlValues.append(SQLValue(sqlValue)); 83 83 } else { 84 EXCEPTION_BLOCK(String, sqlValue, toWebCoreString(value));84 TO_WEBCORE_STRING_EXCEPTION_BLOCK(sqlValue, value); 85 85 sqlValues.append(SQLValue(sqlValue)); 86 86 } -
trunk/WebCore/bindings/v8/custom/V8SQLTransactionSyncCustom.cpp
r59096 r62094 54 54 return throwError(SYNTAX_ERR); 55 55 56 EXCEPTION_BLOCK(String, statement, toWebCoreString(args[0]));56 TO_WEBCORE_STRING_EXCEPTION_BLOCK(statement, args[0]); 57 57 58 58 Vector<SQLValue> sqlValues; … … 81 81 sqlValues.append(SQLValue(sqlValue)); 82 82 } else { 83 EXCEPTION_BLOCK(String, sqlValue, toWebCoreString(value));83 TO_WEBCORE_STRING_EXCEPTION_BLOCK(sqlValue, value); 84 84 sqlValues.append(SQLValue(sqlValue)); 85 85 } -
trunk/WebCore/bindings/v8/custom/V8WorkerContextCustom.cpp
r60330 r62094 151 151 return throwError(SYNTAX_ERR); 152 152 153 EXCEPTION_BLOCK(String, name, toWebCoreString(args[0]));154 EXCEPTION_BLOCK(String, version, toWebCoreString(args[1]));155 EXCEPTION_BLOCK(String, displayName, toWebCoreString(args[2]));153 TO_WEBCORE_STRING_EXCEPTION_BLOCK(name, args[0]); 154 TO_WEBCORE_STRING_EXCEPTION_BLOCK(version, args[1]); 155 TO_WEBCORE_STRING_EXCEPTION_BLOCK(displayName, args[2]); 156 156 EXCEPTION_BLOCK(unsigned long, estimatedSize, args[3]->Uint32Value()); 157 157 … … 179 179 return throwError(SYNTAX_ERR); 180 180 181 EXCEPTION_BLOCK(String, name, toWebCoreString(args[0]));182 EXCEPTION_BLOCK(String, version, toWebCoreString(args[1]));183 EXCEPTION_BLOCK(String, displayName, toWebCoreString(args[2]));181 TO_WEBCORE_STRING_EXCEPTION_BLOCK(name, args[0]); 182 TO_WEBCORE_STRING_EXCEPTION_BLOCK(version, args[1]); 183 TO_WEBCORE_STRING_EXCEPTION_BLOCK(displayName, args[2]); 184 184 EXCEPTION_BLOCK(unsigned long, estimatedSize, args[3]->Uint32Value()); 185 185
Note: See TracChangeset
for help on using the changeset viewer.