| OLD | NEW |
| 1 // Copyright 2011, Google Inc. | 1 // Copyright 2011, Google Inc. |
| 2 // All rights reserved. | 2 // All rights reserved. |
| 3 // | 3 // |
| 4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
| 5 // modification, are permitted provided that the following conditions are | 5 // modification, are permitted provided that the following conditions are |
| 6 // met: | 6 // met: |
| 7 // | 7 // |
| 8 // * Redistributions of source code must retain the above copyright | 8 // * Redistributions of source code must retain the above copyright |
| 9 // notice, this list of conditions and the following disclaimer. | 9 // notice, this list of conditions and the following disclaimer. |
| 10 // * Redistributions in binary form must reproduce the above | 10 // * Redistributions in binary form must reproduce the above |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 | 52 |
| 53 DartStringAdapter statement = DartUtilities::dartToString(args, 1, excep
tion); | 53 DartStringAdapter statement = DartUtilities::dartToString(args, 1, excep
tion); |
| 54 if (exception) | 54 if (exception) |
| 55 goto fail; | 55 goto fail; |
| 56 | 56 |
| 57 Vector<SQLValue> sqlValues; | 57 Vector<SQLValue> sqlValues; |
| 58 DartUtilities::toVector(&DartUtilities::toSQLValue, Dart_GetNativeArgume
nt(args, 2), sqlValues, exception); | 58 DartUtilities::toVector(&DartUtilities::toSQLValue, Dart_GetNativeArgume
nt(args, 2), sqlValues, exception); |
| 59 if (exception) | 59 if (exception) |
| 60 goto fail; | 60 goto fail; |
| 61 | 61 |
| 62 OwnPtr<SQLStatementCallback> callback = DartSQLStatementCallback::create
WithNullCheck(Dart_GetNativeArgument(args, 3), exception); | 62 SQLStatementCallback* callback = DartSQLStatementCallback::createWithNul
lCheck(Dart_GetNativeArgument(args, 3), exception); |
| 63 if (exception) | 63 if (exception) |
| 64 goto fail; | 64 goto fail; |
| 65 | 65 |
| 66 OwnPtr<SQLStatementErrorCallback> errorCallback = DartSQLStatementErrorC
allback::createWithNullCheck(Dart_GetNativeArgument(args, 4), exception); | 66 SQLStatementErrorCallback* errorCallback = DartSQLStatementErrorCallback
::createWithNullCheck(Dart_GetNativeArgument(args, 4), exception); |
| 67 if (exception) | 67 if (exception) |
| 68 goto fail; | 68 goto fail; |
| 69 | 69 |
| 70 DartExceptionState es; | 70 DartExceptionState es; |
| 71 receiver->executeSQL(statement, sqlValues, callback.release(), errorCall
back.release(), es); | 71 receiver->executeSQL(statement, sqlValues, callback, errorCallback, es); |
| 72 if (es.hadException()) { | 72 if (es.hadException()) { |
| 73 exception = es.toDart(args); | 73 exception = es.toDart(args); |
| 74 goto fail; | 74 goto fail; |
| 75 } | 75 } |
| 76 | 76 |
| 77 return; | 77 return; |
| 78 } | 78 } |
| 79 | 79 |
| 80 fail: | 80 fail: |
| 81 Dart_ThrowException(exception); | 81 Dart_ThrowException(exception); |
| 82 ASSERT_NOT_REACHED(); | 82 ASSERT_NOT_REACHED(); |
| 83 } | 83 } |
| 84 | 84 |
| 85 } | 85 } |
| 86 | 86 |
| 87 } | 87 } |
| OLD | NEW |