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 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
366 return; | 366 return; |
367 | 367 |
368 if (m_closePending) { | 368 if (m_closePending) { |
369 // If we're pending, that means there's a busy transaction. We won't | 369 // If we're pending, that means there's a busy transaction. We won't |
370 // fire 'versionchange' but since we're not closing immediately the | 370 // fire 'versionchange' but since we're not closing immediately the |
371 // back-end should still send out 'blocked'. | 371 // back-end should still send out 'blocked'. |
372 m_backend->versionChangeIgnored(); | 372 m_backend->versionChangeIgnored(); |
373 return; | 373 return; |
374 } | 374 } |
375 | 375 |
376 Nullable<unsigned long long> newVersionNullable = (newVersion == IDBDatabase
Metadata::NoIntVersion) ? Nullable<unsigned long long>() : Nullable<unsigned lon
g long>(newVersion); | 376 Nullable<unsigned long long> newVersionNullable = (newVersion == IDBDatabase
Metadata::NoVersion) ? Nullable<unsigned long long>() : Nullable<unsigned long l
ong>(newVersion); |
377 enqueueEvent(IDBVersionChangeEvent::create(EventTypeNames::versionchange, ol
dVersion, newVersionNullable)); | 377 enqueueEvent(IDBVersionChangeEvent::create(EventTypeNames::versionchange, ol
dVersion, newVersionNullable)); |
378 } | 378 } |
379 | 379 |
380 void IDBDatabase::enqueueEvent(PassRefPtrWillBeRawPtr<Event> event) | 380 void IDBDatabase::enqueueEvent(PassRefPtrWillBeRawPtr<Event> event) |
381 { | 381 { |
382 ASSERT(!m_contextStopped); | 382 ASSERT(!m_contextStopped); |
383 ASSERT(executionContext()); | 383 ASSERT(executionContext()); |
384 EventQueue* eventQueue = executionContext()->eventQueue(); | 384 EventQueue* eventQueue = executionContext()->eventQueue(); |
385 event->setTarget(this); | 385 event->setTarget(this); |
386 eventQueue->enqueueEvent(event.get()); | 386 eventQueue->enqueueEvent(event.get()); |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
445 return ActiveDOMObject::executionContext(); | 445 return ActiveDOMObject::executionContext(); |
446 } | 446 } |
447 | 447 |
448 void IDBDatabase::recordApiCallsHistogram(IndexedDatabaseMethods method) | 448 void IDBDatabase::recordApiCallsHistogram(IndexedDatabaseMethods method) |
449 { | 449 { |
450 DEFINE_THREAD_SAFE_STATIC_LOCAL(EnumerationHistogram, apiCallsHistogram, new
EnumerationHistogram("WebCore.IndexedDB.FrontEndAPICalls", IDBMethodsMax)); | 450 DEFINE_THREAD_SAFE_STATIC_LOCAL(EnumerationHistogram, apiCallsHistogram, new
EnumerationHistogram("WebCore.IndexedDB.FrontEndAPICalls", IDBMethodsMax)); |
451 apiCallsHistogram.count(method); | 451 apiCallsHistogram.count(method); |
452 } | 452 } |
453 | 453 |
454 } // namespace blink | 454 } // namespace blink |
OLD | NEW |