Title: [117338] trunk/Source/WebCore
Revision
117338
Author
jsb...@chromium.org
Date
2012-05-16 14:02:21 -0700 (Wed, 16 May 2012)

Log 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):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (117337 => 117338)


--- trunk/Source/WebCore/ChangeLog	2012-05-16 20:57:22 UTC (rev 117337)
+++ trunk/Source/WebCore/ChangeLog	2012-05-16 21:02:21 UTC (rev 117338)
@@ -1,3 +1,30 @@
+2012-05-16  Joshua Bell  <jsb...@chromium.org>
+
+        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):
+
 2012-05-16  Jeffrey Pfau  <jp...@apple.com>
 
         ImageLoader can still dispatch beforeload events for ImageDocuments

Modified: trunk/Source/WebCore/Modules/indexeddb/IDBKey.h (117337 => 117338)


--- trunk/Source/WebCore/Modules/indexeddb/IDBKey.h	2012-05-16 20:57:22 UTC (rev 117337)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBKey.h	2012-05-16 21:02:21 UTC (rev 117338)
@@ -98,7 +98,7 @@
     };
 
     Type type() const { return m_type; }
-    bool valid() const { return m_type != InvalidType; }
+    bool isValid() const { return m_type != InvalidType; }
 
     const KeyArray& array() const
     {

Modified: trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp (117337 => 117338)


--- trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp	2012-05-16 20:57:22 UTC (rev 117337)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp	2012-05-16 21:02:21 UTC (rev 117338)
@@ -177,7 +177,7 @@
 PassRefPtr<IDBRequest> IDBObjectStore::deleteFunction(ScriptExecutionContext* context, PassRefPtr<IDBKey> key, ExceptionCode& ec)
 {
     IDB_TRACE("IDBObjectStore::delete");
-    if (!key || !key->valid()) {
+    if (!key || !key->isValid()) {
         ec = IDBDatabaseException::DATA_ERR;
         return 0;
     }
@@ -231,7 +231,7 @@
 PassRefPtr<IDBIndex> IDBObjectStore::index(const String& name, ExceptionCode& ec)
 {
     IDB_TRACE("IDBObjectStore::index");
-    if (m_transaction->finished()) {
+    if (m_transaction->isFinished()) {
         ec = IDBDatabaseException::NOT_ALLOWED_ERR;
         return 0;
     }
@@ -324,7 +324,7 @@
 
 void IDBObjectStore::transactionFinished()
 {
-    ASSERT(m_transaction->finished());
+    ASSERT(m_transaction->isFinished());
 
     // Break reference cycles.
     m_indexMap.clear();

Modified: trunk/Source/WebCore/Modules/indexeddb/IDBObjectStoreBackendImpl.cpp (117337 => 117338)


--- trunk/Source/WebCore/Modules/indexeddb/IDBObjectStoreBackendImpl.cpp	2012-05-16 20:57:22 UTC (rev 117337)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBObjectStoreBackendImpl.cpp	2012-05-16 21:02:21 UTC (rev 117338)
@@ -184,7 +184,7 @@
         }
         if (hasKeyPath) {
             RefPtr<IDBKey> keyPathKey = fetchKeyFromKeyPath(value.get(), objectStore->m_keyPath);
-            if (keyPathKey && !keyPathKey->valid()) {
+            if (keyPathKey && !keyPathKey->isValid()) {
                 ec = IDBDatabaseException::DATA_ERR;
                 return;
             }
@@ -201,14 +201,14 @@
                 }
             }
         }
-        if (key && !key->valid()) {
+        if (key && !key->isValid()) {
             ec = IDBDatabaseException::DATA_ERR;
             return;
         }
         for (IndexMap::iterator it = m_indexes.begin(); it != m_indexes.end(); ++it) {
             const RefPtr<IDBIndexBackendImpl>& index = it->second;
             RefPtr<IDBKey> indexKey = fetchKeyFromKeyPath(value.get(), index->keyPath());
-            if (indexKey && !indexKey->valid()) {
+            if (indexKey && !indexKey->isValid()) {
                 ec = IDBDatabaseException::DATA_ERR;
                 return;
             }
@@ -255,7 +255,7 @@
         if (autoIncrement) {
             if (!key) {
                 RefPtr<IDBKey> autoIncKey = objectStore->genAutoIncrementKey();
-                if (!autoIncKey->valid()) {
+                if (!autoIncKey->isValid()) {
                     callbacks->onError(IDBDatabaseError::create(IDBDatabaseException::DATA_ERR, "Maximum key generator value reached."));
                     return;
                 }
@@ -279,7 +279,7 @@
         }
     }
 
-    ASSERT(key && key->valid());
+    ASSERT(key && key->isValid());
 
     RefPtr<IDBBackingStore::ObjectStoreRecordIdentifier> recordIdentifier = objectStore->backingStore()->createInvalidRecordIdentifier();
     if (putMode == AddOnly && objectStore->backingStore()->keyExistsInObjectStore(objectStore->databaseId(), objectStore->id(), *key, recordIdentifier.get())) {
@@ -297,7 +297,7 @@
             indexKeys.append(indexKey.release());
             continue;
         }
-        ASSERT(indexKey->valid());
+        ASSERT(indexKey->isValid());
 
         if ((!index->multiEntry() || indexKey->type() != IDBKey::ArrayType) && !index->addingKeyAllowed(indexKey.get(), key.get())) {
             objectStore->resetAutoIncrementKeyCache();
@@ -372,7 +372,7 @@
 {
     IDB_TRACE("IDBObjectStoreBackendImpl::delete");
     RefPtr<IDBKey> key = prpKey;
-    if (!key || !key->valid()) {
+    if (!key || !key->isValid()) {
         ec = IDBDatabaseException::DATA_ERR;
         return;
     }

Modified: trunk/Source/WebCore/Modules/indexeddb/IDBRequest.cpp (117337 => 117338)


--- trunk/Source/WebCore/Modules/indexeddb/IDBRequest.cpp	2012-05-16 20:57:22 UTC (rev 117337)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBRequest.cpp	2012-05-16 21:02:21 UTC (rev 117338)
@@ -251,7 +251,7 @@
 {
     IDB_TRACE("IDBRequest::onSuccess(IDBKey)");
     ASSERT(!m_errorCode && m_errorMessage.isNull() && !m_result);
-    if (idbKey && idbKey->valid())
+    if (idbKey && idbKey->isValid())
         m_result = IDBAny::create(idbKey);
     else
         m_result = IDBAny::create(SerializedScriptValue::undefinedValue());

Modified: trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp (117337 => 117338)


--- trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp	2012-05-16 20:57:22 UTC (rev 117337)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp	2012-05-16 21:02:21 UTC (rev 117338)
@@ -100,7 +100,7 @@
     return m_backend.get();
 }
 
-bool IDBTransaction::finished() const
+bool IDBTransaction::isFinished() const
 {
     return m_transactionFinished;
 }

Modified: trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.h (117337 => 117338)


--- trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.h	2012-05-16 20:57:22 UTC (rev 117337)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.h	2012-05-16 21:02:21 UTC (rev 117338)
@@ -66,7 +66,7 @@
     static const AtomicString& modeToString(unsigned short, ExceptionCode&);
 
     IDBTransactionBackendInterface* backend() const;
-    bool finished() const;
+    bool isFinished() const;
 
     const String& mode() const;
     IDBDatabase* db() const;

Modified: trunk/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp (117337 => 117338)


--- trunk/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp	2012-05-16 20:57:22 UTC (rev 117337)
+++ trunk/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp	2012-05-16 21:02:21 UTC (rev 117338)
@@ -361,7 +361,7 @@
 
 static PassRefPtr<Key> keyFromIDBKey(IDBKey* idbKey)
 {
-    if (!idbKey || !idbKey->valid())
+    if (!idbKey || !idbKey->isValid())
         return 0;
 
     RefPtr<Key> key;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to