| 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 if (!m_closePending && m_backend) | 87 if (!m_closePending && m_backend) |
| 88 m_backend->close(); | 88 m_backend->close(); |
| 89 } | 89 } |
| 90 | 90 |
| 91 DEFINE_TRACE(IDBDatabase) | 91 DEFINE_TRACE(IDBDatabase) |
| 92 { | 92 { |
| 93 visitor->trace(m_versionChangeTransaction); | 93 visitor->trace(m_versionChangeTransaction); |
| 94 visitor->trace(m_transactions); | 94 visitor->trace(m_transactions); |
| 95 visitor->trace(m_enqueuedEvents); | 95 visitor->trace(m_enqueuedEvents); |
| 96 visitor->trace(m_databaseCallbacks); | 96 visitor->trace(m_databaseCallbacks); |
| 97 RefCountedGarbageCollectedEventTargetWithInlineData<IDBDatabase>::trace(visi
tor); | 97 EventTargetWithInlineData::trace(visitor); |
| 98 ActiveDOMObject::trace(visitor); | 98 ActiveDOMObject::trace(visitor); |
| 99 } | 99 } |
| 100 | 100 |
| 101 int64_t IDBDatabase::nextTransactionId() | 101 int64_t IDBDatabase::nextTransactionId() |
| 102 { | 102 { |
| 103 // Only keep a 32-bit counter to allow ports to use the other 32 | 103 // Only keep a 32-bit counter to allow ports to use the other 32 |
| 104 // bits of the id. | 104 // bits of the id. |
| 105 static int currentTransactionId = 0; | 105 static int currentTransactionId = 0; |
| 106 return atomicIncrement(¤tTransactionId); | 106 return atomicIncrement(¤tTransactionId); |
| 107 } | 107 } |
| (...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 446 return ActiveDOMObject::getExecutionContext(); | 446 return ActiveDOMObject::getExecutionContext(); |
| 447 } | 447 } |
| 448 | 448 |
| 449 void IDBDatabase::recordApiCallsHistogram(IndexedDatabaseMethods method) | 449 void IDBDatabase::recordApiCallsHistogram(IndexedDatabaseMethods method) |
| 450 { | 450 { |
| 451 DEFINE_THREAD_SAFE_STATIC_LOCAL(EnumerationHistogram, apiCallsHistogram, new
EnumerationHistogram("WebCore.IndexedDB.FrontEndAPICalls", IDBMethodsMax)); | 451 DEFINE_THREAD_SAFE_STATIC_LOCAL(EnumerationHistogram, apiCallsHistogram, new
EnumerationHistogram("WebCore.IndexedDB.FrontEndAPICalls", IDBMethodsMax)); |
| 452 apiCallsHistogram.count(method); | 452 apiCallsHistogram.count(method); |
| 453 } | 453 } |
| 454 | 454 |
| 455 } // namespace blink | 455 } // namespace blink |
| OLD | NEW |