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 28 matching lines...) Expand all Loading... |
39 static String getDatabaseIdentifier(SQLTransactionBackend* transaction) | 39 static String getDatabaseIdentifier(SQLTransactionBackend* transaction) |
40 { | 40 { |
41 Database* database = transaction->database(); | 41 Database* database = transaction->database(); |
42 ASSERT(database); | 42 ASSERT(database); |
43 return database->stringIdentifier(); | 43 return database->stringIdentifier(); |
44 } | 44 } |
45 | 45 |
46 SQLTransactionCoordinator::SQLTransactionCoordinator() | 46 SQLTransactionCoordinator::SQLTransactionCoordinator() |
47 : m_isShuttingDown(false) | 47 : m_isShuttingDown(false) |
48 { | 48 { |
| 49 ASSERT(isMainThread()); |
49 } | 50 } |
50 | 51 |
51 DEFINE_TRACE(SQLTransactionCoordinator) | 52 DEFINE_TRACE(SQLTransactionCoordinator) |
52 { | 53 { |
53 visitor->trace(m_coordinationInfoMap); | 54 visitor->trace(m_coordinationInfoMap); |
54 } | 55 } |
55 | 56 |
56 void SQLTransactionCoordinator::processPendingTransactions(CoordinationInfo& inf
o) | 57 void SQLTransactionCoordinator::processPendingTransactions(CoordinationInfo& inf
o) |
57 { | 58 { |
58 if (info.activeWriteTransaction || info.pendingTransactions.isEmpty()) | 59 if (info.activeWriteTransaction || info.pendingTransactions.isEmpty()) |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 SQLTransactionBackend* transaction = info.pendingTransactions.takeFi
rst(); | 145 SQLTransactionBackend* transaction = info.pendingTransactions.takeFi
rst(); |
145 transaction->notifyDatabaseThreadIsShuttingDown(); | 146 transaction->notifyDatabaseThreadIsShuttingDown(); |
146 } | 147 } |
147 } | 148 } |
148 | 149 |
149 // Clean up all pending transactions for all databases | 150 // Clean up all pending transactions for all databases |
150 m_coordinationInfoMap.clear(); | 151 m_coordinationInfoMap.clear(); |
151 } | 152 } |
152 | 153 |
153 } // namespace blink | 154 } // namespace blink |
OLD | NEW |