OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google 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 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
299 if (isVersionChange()) { | 299 if (isVersionChange()) { |
300 for (IDBObjectStoreMetadataMap::iterator it = m_objectStoreCleanupMap.be
gin(); it != m_objectStoreCleanupMap.end(); ++it) | 300 for (IDBObjectStoreMetadataMap::iterator it = m_objectStoreCleanupMap.be
gin(); it != m_objectStoreCleanupMap.end(); ++it) |
301 it->key->setMetadata(it->value); | 301 it->key->setMetadata(it->value); |
302 m_database->setMetadata(m_previousMetadata); | 302 m_database->setMetadata(m_previousMetadata); |
303 m_database->close(); | 303 m_database->close(); |
304 } | 304 } |
305 m_objectStoreCleanupMap.clear(); | 305 m_objectStoreCleanupMap.clear(); |
306 closeOpenCursors(); | 306 closeOpenCursors(); |
307 | 307 |
308 // Enqueue events before notifying database, as database may close which enq
ueues more events and order matters. | 308 // Enqueue events before notifying database, as database may close which enq
ueues more events and order matters. |
309 enqueueEvent(Event::create(eventNames().abortEvent, true, false)); | 309 enqueueEvent(Event::createBubble(eventNames().abortEvent)); |
310 m_database->transactionFinished(this); | 310 m_database->transactionFinished(this); |
311 } | 311 } |
312 | 312 |
313 void IDBTransaction::onComplete() | 313 void IDBTransaction::onComplete() |
314 { | 314 { |
315 IDB_TRACE("IDBTransaction::onComplete"); | 315 IDB_TRACE("IDBTransaction::onComplete"); |
316 ASSERT(m_state != Finished); | 316 ASSERT(m_state != Finished); |
317 m_state = Finishing; | 317 m_state = Finishing; |
318 m_objectStoreCleanupMap.clear(); | 318 m_objectStoreCleanupMap.clear(); |
319 closeOpenCursors(); | 319 closeOpenCursors(); |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
444 { | 444 { |
445 return &m_eventTargetData; | 445 return &m_eventTargetData; |
446 } | 446 } |
447 | 447 |
448 IDBDatabaseBackendInterface* IDBTransaction::backendDB() const | 448 IDBDatabaseBackendInterface* IDBTransaction::backendDB() const |
449 { | 449 { |
450 return db()->backend(); | 450 return db()->backend(); |
451 } | 451 } |
452 | 452 |
453 } // namespace WebCore | 453 } // namespace WebCore |
OLD | NEW |