Changeset 117338 in webkit


Ignore:
Timestamp:
May 16, 2012 2:02:21 PM (12 years ago)
Author:
jsbell@chromium.org
Message:

IndexedDB: Rename valid/finished methods to isValid/isFinished to match coding standard
https://bugs.webkit.org/show_bug.cgi?id=86655

Reviewed by Tony Chang.

No new tests - no functional changes.

  • Modules/indexeddb/IDBKey.h:

(WebCore::IDBKey::isValid): valid() => isValid()

  • Modules/indexeddb/IDBObjectStore.cpp:

(WebCore::IDBObjectStore::deleteFunction):
(WebCore::IDBObjectStore::index):
(WebCore::IDBObjectStore::transactionFinished):

  • Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:

(WebCore::IDBObjectStoreBackendImpl::put):
(WebCore::IDBObjectStoreBackendImpl::putInternal):
(WebCore::IDBObjectStoreBackendImpl::deleteFunction):

  • Modules/indexeddb/IDBRequest.cpp:

(WebCore::IDBRequest::onSuccess):

  • Modules/indexeddb/IDBTransaction.cpp:

(WebCore::IDBTransaction::isFinished): finished() => isFinished()

  • Modules/indexeddb/IDBTransaction.h:
  • inspector/InspectorIndexedDBAgent.cpp:

(WebCore):

Location:
trunk/Source/WebCore
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r117336 r117338  
     12012-05-16  Joshua Bell  <jsbell@chromium.org>
     2
     3        IndexedDB: Rename valid/finished methods to isValid/isFinished to match coding standard
     4        https://bugs.webkit.org/show_bug.cgi?id=86655
     5
     6        Reviewed by Tony Chang.
     7
     8        No new tests - no functional changes.
     9
     10        * Modules/indexeddb/IDBKey.h:
     11        (WebCore::IDBKey::isValid): valid() => isValid()
     12        * Modules/indexeddb/IDBObjectStore.cpp:
     13        (WebCore::IDBObjectStore::deleteFunction):
     14        (WebCore::IDBObjectStore::index):
     15        (WebCore::IDBObjectStore::transactionFinished):
     16        * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
     17        (WebCore::IDBObjectStoreBackendImpl::put):
     18        (WebCore::IDBObjectStoreBackendImpl::putInternal):
     19        (WebCore::IDBObjectStoreBackendImpl::deleteFunction):
     20        * Modules/indexeddb/IDBRequest.cpp:
     21        (WebCore::IDBRequest::onSuccess):
     22        * Modules/indexeddb/IDBTransaction.cpp:
     23        (WebCore::IDBTransaction::isFinished): finished() => isFinished()
     24        * Modules/indexeddb/IDBTransaction.h:
     25        * inspector/InspectorIndexedDBAgent.cpp:
     26        (WebCore):
     27
    1282012-05-16  Jeffrey Pfau  <jpfau@apple.com>
    229
  • trunk/Source/WebCore/Modules/indexeddb/IDBKey.h

    r109493 r117338  
    9999
    100100    Type type() const { return m_type; }
    101     bool valid() const { return m_type != InvalidType; }
     101    bool isValid() const { return m_type != InvalidType; }
    102102
    103103    const KeyArray& array() const
  • trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp

    r116337 r117338  
    178178{
    179179    IDB_TRACE("IDBObjectStore::delete");
    180     if (!key || !key->valid()) {
     180    if (!key || !key->isValid()) {
    181181        ec = IDBDatabaseException::DATA_ERR;
    182182        return 0;
     
    232232{
    233233    IDB_TRACE("IDBObjectStore::index");
    234     if (m_transaction->finished()) {
     234    if (m_transaction->isFinished()) {
    235235        ec = IDBDatabaseException::NOT_ALLOWED_ERR;
    236236        return 0;
     
    325325void IDBObjectStore::transactionFinished()
    326326{
    327     ASSERT(m_transaction->finished());
     327    ASSERT(m_transaction->isFinished());
    328328
    329329    // Break reference cycles.
  • trunk/Source/WebCore/Modules/indexeddb/IDBObjectStoreBackendImpl.cpp

    r117334 r117338  
    185185        if (hasKeyPath) {
    186186            RefPtr<IDBKey> keyPathKey = fetchKeyFromKeyPath(value.get(), objectStore->m_keyPath);
    187             if (keyPathKey && !keyPathKey->valid()) {
     187            if (keyPathKey && !keyPathKey->isValid()) {
    188188                ec = IDBDatabaseException::DATA_ERR;
    189189                return;
     
    202202            }
    203203        }
    204         if (key && !key->valid()) {
     204        if (key && !key->isValid()) {
    205205            ec = IDBDatabaseException::DATA_ERR;
    206206            return;
     
    209209            const RefPtr<IDBIndexBackendImpl>& index = it->second;
    210210            RefPtr<IDBKey> indexKey = fetchKeyFromKeyPath(value.get(), index->keyPath());
    211             if (indexKey && !indexKey->valid()) {
     211            if (indexKey && !indexKey->isValid()) {
    212212                ec = IDBDatabaseException::DATA_ERR;
    213213                return;
     
    256256            if (!key) {
    257257                RefPtr<IDBKey> autoIncKey = objectStore->genAutoIncrementKey();
    258                 if (!autoIncKey->valid()) {
     258                if (!autoIncKey->isValid()) {
    259259                    callbacks->onError(IDBDatabaseError::create(IDBDatabaseException::DATA_ERR, "Maximum key generator value reached."));
    260260                    return;
     
    280280    }
    281281
    282     ASSERT(key && key->valid());
     282    ASSERT(key && key->isValid());
    283283
    284284    RefPtr<IDBBackingStore::ObjectStoreRecordIdentifier> recordIdentifier = objectStore->backingStore()->createInvalidRecordIdentifier();
     
    298298            continue;
    299299        }
    300         ASSERT(indexKey->valid());
     300        ASSERT(indexKey->isValid());
    301301
    302302        if ((!index->multiEntry() || indexKey->type() != IDBKey::ArrayType) && !index->addingKeyAllowed(indexKey.get(), key.get())) {
     
    373373    IDB_TRACE("IDBObjectStoreBackendImpl::delete");
    374374    RefPtr<IDBKey> key = prpKey;
    375     if (!key || !key->valid()) {
     375    if (!key || !key->isValid()) {
    376376        ec = IDBDatabaseException::DATA_ERR;
    377377        return;
  • trunk/Source/WebCore/Modules/indexeddb/IDBRequest.cpp

    r116337 r117338  
    252252    IDB_TRACE("IDBRequest::onSuccess(IDBKey)");
    253253    ASSERT(!m_errorCode && m_errorMessage.isNull() && !m_result);
    254     if (idbKey && idbKey->valid())
     254    if (idbKey && idbKey->isValid())
    255255        m_result = IDBAny::create(idbKey);
    256256    else
  • trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp

    r116337 r117338  
    101101}
    102102
    103 bool IDBTransaction::finished() const
     103bool IDBTransaction::isFinished() const
    104104{
    105105    return m_transactionFinished;
  • trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.h

    r116337 r117338  
    6767
    6868    IDBTransactionBackendInterface* backend() const;
    69     bool finished() const;
     69    bool isFinished() const;
    7070
    7171    const String& mode() const;
  • trunk/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp

    r114373 r117338  
    362362static PassRefPtr<Key> keyFromIDBKey(IDBKey* idbKey)
    363363{
    364     if (!idbKey || !idbKey->valid())
     364    if (!idbKey || !idbKey->isValid())
    365365        return 0;
    366366
Note: See TracChangeset for help on using the changeset viewer.