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 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
400 | 400 |
401 int64_t transactionId = nextTransactionId(); | 401 int64_t transactionId = nextTransactionId(); |
402 m_backend->createTransaction(transactionId, objectStoreIds, mode); | 402 m_backend->createTransaction(transactionId, objectStoreIds, mode); |
403 | 403 |
404 return IDBTransaction::createNonVersionChange(scriptState, transactionId, | 404 return IDBTransaction::createNonVersionChange(scriptState, transactionId, |
405 scope, mode, this); | 405 scope, mode, this); |
406 } | 406 } |
407 | 407 |
408 void IDBDatabase::forceClose() { | 408 void IDBDatabase::forceClose() { |
409 for (const auto& it : m_transactions) | 409 for (const auto& it : m_transactions) |
410 it.value->abort(IGNORE_EXCEPTION); | 410 it.value->abort(IGNORE_EXCEPTION_FOR_TESTING); |
411 this->close(); | 411 this->close(); |
412 enqueueEvent(Event::create(EventTypeNames::close)); | 412 enqueueEvent(Event::create(EventTypeNames::close)); |
413 } | 413 } |
414 | 414 |
415 void IDBDatabase::close() { | 415 void IDBDatabase::close() { |
416 IDB_TRACE("IDBDatabase::close"); | 416 IDB_TRACE("IDBDatabase::close"); |
417 if (m_closePending) | 417 if (m_closePending) |
418 return; | 418 return; |
419 | 419 |
420 m_closePending = true; | 420 m_closePending = true; |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
579 | 579 |
580 void IDBDatabase::recordApiCallsHistogram(IndexedDatabaseMethods method) { | 580 void IDBDatabase::recordApiCallsHistogram(IndexedDatabaseMethods method) { |
581 DEFINE_THREAD_SAFE_STATIC_LOCAL( | 581 DEFINE_THREAD_SAFE_STATIC_LOCAL( |
582 EnumerationHistogram, apiCallsHistogram, | 582 EnumerationHistogram, apiCallsHistogram, |
583 new EnumerationHistogram("WebCore.IndexedDB.FrontEndAPICalls", | 583 new EnumerationHistogram("WebCore.IndexedDB.FrontEndAPICalls", |
584 IDBMethodsMax)); | 584 IDBMethodsMax)); |
585 apiCallsHistogram.count(method); | 585 apiCallsHistogram.count(method); |
586 } | 586 } |
587 | 587 |
588 } // namespace blink | 588 } // namespace blink |
OLD | NEW |