| 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 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 416 if (m_contextStopped || !getExecutionContext()) | 416 if (m_contextStopped || !getExecutionContext()) |
| 417 return; | 417 return; |
| 418 | 418 |
| 419 EventQueue* eventQueue = getExecutionContext()->getEventQueue(); | 419 EventQueue* eventQueue = getExecutionContext()->getEventQueue(); |
| 420 // Remove any pending versionchange events scheduled to fire on this | 420 // Remove any pending versionchange events scheduled to fire on this |
| 421 // connection. They would have been scheduled by the backend when another | 421 // connection. They would have been scheduled by the backend when another |
| 422 // connection attempted an upgrade, but the frontend connection is being | 422 // connection attempted an upgrade, but the frontend connection is being |
| 423 // closed before they could fire. | 423 // closed before they could fire. |
| 424 for (size_t i = 0; i < m_enqueuedEvents.size(); ++i) { | 424 for (size_t i = 0; i < m_enqueuedEvents.size(); ++i) { |
| 425 bool removed = eventQueue->cancelEvent(m_enqueuedEvents[i].get()); | 425 bool removed = eventQueue->cancelEvent(m_enqueuedEvents[i].get()); |
| 426 ASSERT_UNUSED(removed, removed); | 426 DCHECK(removed); |
| 427 } | 427 } |
| 428 } | 428 } |
| 429 | 429 |
| 430 void IDBDatabase::onVersionChange(int64_t oldVersion, int64_t newVersion) { | 430 void IDBDatabase::onVersionChange(int64_t oldVersion, int64_t newVersion) { |
| 431 IDB_TRACE("IDBDatabase::onVersionChange"); | 431 IDB_TRACE("IDBDatabase::onVersionChange"); |
| 432 if (m_contextStopped || !getExecutionContext()) | 432 if (m_contextStopped || !getExecutionContext()) |
| 433 return; | 433 return; |
| 434 | 434 |
| 435 if (m_closePending) { | 435 if (m_closePending) { |
| 436 // If we're pending, that means there's a busy transaction. We won't | 436 // If we're pending, that means there's a busy transaction. We won't |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 528 | 528 |
| 529 void IDBDatabase::recordApiCallsHistogram(IndexedDatabaseMethods method) { | 529 void IDBDatabase::recordApiCallsHistogram(IndexedDatabaseMethods method) { |
| 530 DEFINE_THREAD_SAFE_STATIC_LOCAL( | 530 DEFINE_THREAD_SAFE_STATIC_LOCAL( |
| 531 EnumerationHistogram, apiCallsHistogram, | 531 EnumerationHistogram, apiCallsHistogram, |
| 532 new EnumerationHistogram("WebCore.IndexedDB.FrontEndAPICalls", | 532 new EnumerationHistogram("WebCore.IndexedDB.FrontEndAPICalls", |
| 533 IDBMethodsMax)); | 533 IDBMethodsMax)); |
| 534 apiCallsHistogram.count(method); | 534 apiCallsHistogram.count(method); |
| 535 } | 535 } |
| 536 | 536 |
| 537 } // namespace blink | 537 } // namespace blink |
| OLD | NEW |