| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2013 Apple Inc. All rights reserved. | 3 * Copyright (C) 2013 Apple Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 SQLTransactionBackend* transaction) { | 72 SQLTransactionBackend* transaction) { |
| 73 ASSERT(!m_isShuttingDown); | 73 ASSERT(!m_isShuttingDown); |
| 74 | 74 |
| 75 String dbIdentifier = getDatabaseIdentifier(transaction); | 75 String dbIdentifier = getDatabaseIdentifier(transaction); |
| 76 | 76 |
| 77 CoordinationInfoHeapMap::iterator coordinationInfoIterator = | 77 CoordinationInfoHeapMap::iterator coordinationInfoIterator = |
| 78 m_coordinationInfoMap.find(dbIdentifier); | 78 m_coordinationInfoMap.find(dbIdentifier); |
| 79 if (coordinationInfoIterator == m_coordinationInfoMap.end()) { | 79 if (coordinationInfoIterator == m_coordinationInfoMap.end()) { |
| 80 // No pending transactions for this DB | 80 // No pending transactions for this DB |
| 81 CoordinationInfo& info = | 81 CoordinationInfo& info = |
| 82 m_coordinationInfoMap.add(dbIdentifier, CoordinationInfo()) | 82 m_coordinationInfoMap.insert(dbIdentifier, CoordinationInfo()) |
| 83 .storedValue->value; | 83 .storedValue->value; |
| 84 info.pendingTransactions.append(transaction); | 84 info.pendingTransactions.append(transaction); |
| 85 processPendingTransactions(info); | 85 processPendingTransactions(info); |
| 86 } else { | 86 } else { |
| 87 CoordinationInfo& info = coordinationInfoIterator->value; | 87 CoordinationInfo& info = coordinationInfoIterator->value; |
| 88 info.pendingTransactions.append(transaction); | 88 info.pendingTransactions.append(transaction); |
| 89 processPendingTransactions(info); | 89 processPendingTransactions(info); |
| 90 } | 90 } |
| 91 } | 91 } |
| 92 | 92 |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 SQLTransactionBackend* transaction = info.pendingTransactions.takeFirst(); | 142 SQLTransactionBackend* transaction = info.pendingTransactions.takeFirst(); |
| 143 transaction->notifyDatabaseThreadIsShuttingDown(); | 143 transaction->notifyDatabaseThreadIsShuttingDown(); |
| 144 } | 144 } |
| 145 } | 145 } |
| 146 | 146 |
| 147 // Clean up all pending transactions for all databases | 147 // Clean up all pending transactions for all databases |
| 148 m_coordinationInfoMap.clear(); | 148 m_coordinationInfoMap.clear(); |
| 149 } | 149 } |
| 150 | 150 |
| 151 } // namespace blink | 151 } // namespace blink |
| OLD | NEW |