| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008, 2013 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008, 2013 Apple Inc. 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 m_backend->requestTransitToState(m_nextState); | 244 m_backend->requestTransitToState(m_nextState); |
| 245 return SQLTransactionState::Idle; | 245 return SQLTransactionState::Idle; |
| 246 } | 246 } |
| 247 | 247 |
| 248 void SQLTransaction::performPendingCallback() | 248 void SQLTransaction::performPendingCallback() |
| 249 { | 249 { |
| 250 computeNextStateAndCleanupIfNeeded(); | 250 computeNextStateAndCleanupIfNeeded(); |
| 251 runStateMachine(); | 251 runStateMachine(); |
| 252 } | 252 } |
| 253 | 253 |
| 254 void SQLTransaction::executeSQL(const String& sqlStatement, const Vector<SQLValu
e>& arguments, PassRefPtr<SQLStatementCallback> callback, PassRefPtr<SQLStatemen
tErrorCallback> callbackError, ExceptionState& es) | 254 void SQLTransaction::executeSQL(const String& sqlStatement, const Vector<SQLValu
e>& arguments, PassRefPtr<SQLStatementCallback> callback, PassRefPtr<SQLStatemen
tErrorCallback> callbackError, ExceptionState& exceptionState) |
| 255 { | 255 { |
| 256 if (!m_executeSqlAllowed || !m_database->opened()) { | 256 if (!m_executeSqlAllowed || !m_database->opened()) { |
| 257 es.throwUninformativeAndGenericDOMException(InvalidStateError); | 257 exceptionState.throwUninformativeAndGenericDOMException(InvalidStateErro
r); |
| 258 return; | 258 return; |
| 259 } | 259 } |
| 260 | 260 |
| 261 int permissions = DatabaseAuthorizer::ReadWriteMask; | 261 int permissions = DatabaseAuthorizer::ReadWriteMask; |
| 262 if (!m_database->databaseContext()->allowDatabaseAccess()) | 262 if (!m_database->databaseContext()->allowDatabaseAccess()) |
| 263 permissions |= DatabaseAuthorizer::NoAccessMask; | 263 permissions |= DatabaseAuthorizer::NoAccessMask; |
| 264 else if (m_readOnly) | 264 else if (m_readOnly) |
| 265 permissions |= DatabaseAuthorizer::ReadOnlyMask; | 265 permissions |= DatabaseAuthorizer::ReadOnlyMask; |
| 266 | 266 |
| 267 OwnPtr<SQLStatement> statement = SQLStatement::create(m_database.get(), call
back, callbackError); | 267 OwnPtr<SQLStatement> statement = SQLStatement::create(m_database.get(), call
back, callbackError); |
| (...skipping 25 matching lines...) Expand all Loading... |
| 293 | 293 |
| 294 void SQLTransaction::clearCallbackWrappers() | 294 void SQLTransaction::clearCallbackWrappers() |
| 295 { | 295 { |
| 296 // Release the unneeded callbacks, to break reference cycles. | 296 // Release the unneeded callbacks, to break reference cycles. |
| 297 m_callbackWrapper.clear(); | 297 m_callbackWrapper.clear(); |
| 298 m_successCallbackWrapper.clear(); | 298 m_successCallbackWrapper.clear(); |
| 299 m_errorCallbackWrapper.clear(); | 299 m_errorCallbackWrapper.clear(); |
| 300 } | 300 } |
| 301 | 301 |
| 302 } // namespace WebCore | 302 } // namespace WebCore |
| OLD | NEW |