Unreviewed PlayStation / clang-cl build fix following r261533.
authorross.kirsling@sony.com <ross.kirsling@sony.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 12 May 2020 20:34:31 +0000 (20:34 +0000)
committerross.kirsling@sony.com <ross.kirsling@sony.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 12 May 2020 20:34:31 +0000 (20:34 +0000)
Apparently r261572 only caught half of the cases.

* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::estimateSize):
* bindings/js/IDBBindingUtilities.cpp:
(WebCore::generateIndexKeyMapForValue):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@261574 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp
Source/WebCore/bindings/js/IDBBindingUtilities.cpp

index 6160d1d..2aa386f 100644 (file)
@@ -1,3 +1,14 @@
+2020-05-12  Ross Kirsling  <ross.kirsling@sony.com>
+
+        Unreviewed PlayStation / clang-cl build fix following r261533.
+
+        Apparently r261572 only caught half of the cases.
+
+        * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
+        (WebCore::IDBServer::estimateSize):
+        * bindings/js/IDBBindingUtilities.cpp:
+        (WebCore::generateIndexKeyMapForValue):
+
 2020-05-12  Myles C. Maxfield  <mmaxfield@apple.com>
 
         Text is clipped when rendered with fonts which have a negative line gap metric
index 3c8b7cc..055564d 100644 (file)
@@ -80,15 +80,15 @@ static inline uint64_t estimateSize(const IDBObjectStoreInfo& info, const IndexI
     static constexpr uint64_t baseIndexRowSize = 12;
     uint64_t size = 0;
 
-    for (const auto& [indexID, indexKey] : indexKeys) {
-        auto indexIterator = info.indexMap().find(indexID);
+    for (const auto& entry : indexKeys) {
+        auto indexIterator = info.indexMap().find(entry.key);
         ASSERT(indexIterator != info.indexMap().end());
 
         if (indexIterator != info.indexMap().end() && indexIterator->value.multiEntry()) {
-            for (const auto& secondaryKey : indexKey.multiEntry())
+            for (const auto& secondaryKey : entry.value.multiEntry())
                 size += (baseIndexRowSize + primaryKeySize + estimateSize(secondaryKey));
         } else
-            size += (baseIndexRowSize + primaryKeySize + estimateSize(indexKey.asOneKey()));
+            size += (baseIndexRowSize + primaryKeySize + estimateSize(entry.value.asOneKey()));
     }
 
     return size;
index 2f5af6c..ddc46ac 100644 (file)
@@ -479,14 +479,14 @@ IndexIDToIndexKeyMap generateIndexKeyMapForValue(JSC::JSGlobalObject& lexicalGlo
     IndexIDToIndexKeyMap indexKeys;
     indexKeys.reserveInitialCapacity(indexCount);
 
-    for (const auto& [indexID, indexInfo] : indexMap) {
+    for (const auto& entry : indexMap) {
         IndexKey indexKey;
-        generateIndexKeyForValue(lexicalGlobalObject, indexInfo, jsValue, indexKey, storeInfo.keyPath(), key);
+        generateIndexKeyForValue(lexicalGlobalObject, entry.value, jsValue, indexKey, storeInfo.keyPath(), key);
 
         if (indexKey.isNull())
             continue;
 
-        indexKeys.add(indexID, WTFMove(indexKey));
+        indexKeys.add(entry.key, WTFMove(indexKey));
     }
 
     return indexKeys;