Title: [238088] trunk/Source/WebCore
- Revision
- 238088
- Author
- [email protected]
- Date
- 2018-11-12 08:48:22 -0800 (Mon, 12 Nov 2018)
Log Message
WTFMove(xxx) is used in arguments while other arguments touch xxx
https://bugs.webkit.org/show_bug.cgi?id=191544
Reviewed by Alex Christensen.
The order of the evaluation of C++ arguments is undefined. If we use WTFMove(xxx),
xxx should not be touched in the other arguments. This patch fixes such uses in
IDB code.
* Modules/indexeddb/IDBObjectStore.cpp:
(WebCore::IDBObjectStore::deleteIndex):
* Modules/indexeddb/IDBTransaction.cpp:
(WebCore::IDBTransaction::scheduleOperation):
* Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
(WebCore::IDBServer::MemoryIDBBackingStore::registerObjectStore):
* Modules/indexeddb/server/MemoryObjectStore.cpp:
(WebCore::IDBServer::MemoryObjectStore::registerIndex):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (238087 => 238088)
--- trunk/Source/WebCore/ChangeLog 2018-11-12 16:18:08 UTC (rev 238087)
+++ trunk/Source/WebCore/ChangeLog 2018-11-12 16:48:22 UTC (rev 238088)
@@ -1,3 +1,23 @@
+2018-11-12 Yusuke Suzuki <[email protected]>
+
+ WTFMove(xxx) is used in arguments while other arguments touch xxx
+ https://bugs.webkit.org/show_bug.cgi?id=191544
+
+ Reviewed by Alex Christensen.
+
+ The order of the evaluation of C++ arguments is undefined. If we use WTFMove(xxx),
+ xxx should not be touched in the other arguments. This patch fixes such uses in
+ IDB code.
+
+ * Modules/indexeddb/IDBObjectStore.cpp:
+ (WebCore::IDBObjectStore::deleteIndex):
+ * Modules/indexeddb/IDBTransaction.cpp:
+ (WebCore::IDBTransaction::scheduleOperation):
+ * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
+ (WebCore::IDBServer::MemoryIDBBackingStore::registerObjectStore):
+ * Modules/indexeddb/server/MemoryObjectStore.cpp:
+ (WebCore::IDBServer::MemoryObjectStore::registerIndex):
+
2018-11-12 Zalan Bujtas <[email protected]>
[LFC][IFC] Construct dedicated runs when the inline element requires it.
Modified: trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp (238087 => 238088)
--- trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp 2018-11-12 16:18:08 UTC (rev 238087)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp 2018-11-12 16:48:22 UTC (rev 238088)
@@ -521,7 +521,8 @@
Locker<Lock> locker(m_referencedIndexLock);
if (auto index = m_referencedIndexes.take(name)) {
index->markAsDeleted();
- m_deletedIndexes.add(index->info().identifier(), WTFMove(index));
+ auto identifier = index->info().identifier();
+ m_deletedIndexes.add(identifier, WTFMove(index));
}
}
Modified: trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp (238087 => 238088)
--- trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp 2018-11-12 16:18:08 UTC (rev 238087)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp 2018-11-12 16:48:22 UTC (rev 238088)
@@ -377,8 +377,9 @@
ASSERT(!m_transactionOperationMap.contains(operation->identifier()));
ASSERT(&m_database->originThread() == &Thread::current());
+ auto identifier = operation->identifier();
m_pendingTransactionOperationQueue.append(operation);
- m_transactionOperationMap.set(operation->identifier(), WTFMove(operation));
+ m_transactionOperationMap.set(identifier, WTFMove(operation));
schedulePendingOperationTimer();
}
Modified: trunk/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.cpp (238087 => 238088)
--- trunk/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.cpp 2018-11-12 16:18:08 UTC (rev 238087)
+++ trunk/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.cpp 2018-11-12 16:48:22 UTC (rev 238088)
@@ -555,8 +555,9 @@
ASSERT(!m_objectStoresByIdentifier.contains(objectStore->info().identifier()));
ASSERT(!m_objectStoresByName.contains(objectStore->info().name()));
+ auto identifier = objectStore->info().identifier();
m_objectStoresByName.set(objectStore->info().name(), &objectStore.get());
- m_objectStoresByIdentifier.set(objectStore->info().identifier(), WTFMove(objectStore));
+ m_objectStoresByIdentifier.set(identifier, WTFMove(objectStore));
}
void MemoryIDBBackingStore::unregisterObjectStore(MemoryObjectStore& objectStore)
Modified: trunk/Source/WebCore/Modules/indexeddb/server/MemoryObjectStore.cpp (238087 => 238088)
--- trunk/Source/WebCore/Modules/indexeddb/server/MemoryObjectStore.cpp 2018-11-12 16:18:08 UTC (rev 238087)
+++ trunk/Source/WebCore/Modules/indexeddb/server/MemoryObjectStore.cpp 2018-11-12 16:48:22 UTC (rev 238088)
@@ -479,8 +479,9 @@
ASSERT(!m_indexesByIdentifier.contains(index->info().identifier()));
ASSERT(!m_indexesByName.contains(index->info().name()));
+ auto identifier = index->info().identifier();
m_indexesByName.set(index->info().name(), &index.get());
- m_indexesByIdentifier.set(index->info().identifier(), WTFMove(index));
+ m_indexesByIdentifier.set(identifier, WTFMove(index));
}
void MemoryObjectStore::unregisterIndex(MemoryIndex& index)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes