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 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
477 void SQLTransactionBackend::enqueueStatementBackend(PassRefPtrWillBeRawPtr<SQLSt
atementBackend> statementBackend) | 477 void SQLTransactionBackend::enqueueStatementBackend(PassRefPtrWillBeRawPtr<SQLSt
atementBackend> statementBackend) |
478 { | 478 { |
479 MutexLocker locker(m_statementMutex); | 479 MutexLocker locker(m_statementMutex); |
480 m_statementQueue.append(statementBackend); | 480 m_statementQueue.append(statementBackend); |
481 } | 481 } |
482 | 482 |
483 void SQLTransactionBackend::computeNextStateAndCleanupIfNeeded() | 483 void SQLTransactionBackend::computeNextStateAndCleanupIfNeeded() |
484 { | 484 { |
485 // Only honor the requested state transition if we're not supposed to be | 485 // Only honor the requested state transition if we're not supposed to be |
486 // cleaning up and shutting down: | 486 // cleaning up and shutting down: |
487 if (m_database->opened() && !m_database->isInterrupted()) { | 487 if (m_database->opened()) { |
488 setStateToRequestedState(); | 488 setStateToRequestedState(); |
489 ASSERT(m_nextState == SQLTransactionState::AcquireLock | 489 ASSERT(m_nextState == SQLTransactionState::AcquireLock |
490 || m_nextState == SQLTransactionState::OpenTransactionAndPreflight | 490 || m_nextState == SQLTransactionState::OpenTransactionAndPreflight |
491 || m_nextState == SQLTransactionState::RunStatements | 491 || m_nextState == SQLTransactionState::RunStatements |
492 || m_nextState == SQLTransactionState::PostflightAndCommit | 492 || m_nextState == SQLTransactionState::PostflightAndCommit |
493 || m_nextState == SQLTransactionState::CleanupAndTerminate | 493 || m_nextState == SQLTransactionState::CleanupAndTerminate |
494 || m_nextState == SQLTransactionState::CleanupAfterTransactionErrorC
allback); | 494 || m_nextState == SQLTransactionState::CleanupAfterTransactionErrorC
allback); |
495 | 495 |
496 WTF_LOG(StorageAPI, "State %s\n", nameForSQLTransactionState(m_nextState
)); | 496 WTF_LOG(StorageAPI, "State %s\n", nameForSQLTransactionState(m_nextState
)); |
497 return; | 497 return; |
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
827 } | 827 } |
828 | 828 |
829 SQLTransactionState SQLTransactionBackend::sendToFrontendState() | 829 SQLTransactionState SQLTransactionBackend::sendToFrontendState() |
830 { | 830 { |
831 ASSERT(m_nextState != SQLTransactionState::Idle); | 831 ASSERT(m_nextState != SQLTransactionState::Idle); |
832 m_frontend->requestTransitToState(m_nextState); | 832 m_frontend->requestTransitToState(m_nextState); |
833 return SQLTransactionState::Idle; | 833 return SQLTransactionState::Idle; |
834 } | 834 } |
835 | 835 |
836 } // namespace blink | 836 } // namespace blink |
OLD | NEW |