Title: [194872] trunk
- Revision
- 194872
- Author
- beid...@apple.com
- Date
- 2016-01-11 15:44:03 -0800 (Mon, 11 Jan 2016)
Log Message
Modern IDB: storage/indexeddb/index-multientry.html fails under GuardMalloc/ASAN.
https://bugs.webkit.org/show_bug.cgi?id=152990
Reviewed by Alex Christensen.
Source/WebCore:
No new tests (Covered by re-enabling existing test).
* Modules/indexeddb/client/IDBRequestImpl.cpp:
(WebCore::IDBClient::IDBRequest::dispatchEvent): Use String::utf8() instead of AtomicString::characters8() for
the format string, as the latter fails under ASAN.
* Modules/indexeddb/server/IndexValueStore.cpp:
(WebCore::IDBServer::IndexValueStore::removeEntriesWithValueKey): We can't save off pointers to IDBKeyDatas
used as keys in the map, because the moment we start mutating the map the keys can be rehashed, invalidating
our pointers. Save off the IDBKeyDatas by value instead.
LayoutTests:
* platform/mac-wk1/TestExpectations:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (194871 => 194872)
--- trunk/LayoutTests/ChangeLog 2016-01-11 23:34:43 UTC (rev 194871)
+++ trunk/LayoutTests/ChangeLog 2016-01-11 23:44:03 UTC (rev 194872)
@@ -1,3 +1,12 @@
+2016-01-11 Brady Eidson <beid...@apple.com>
+
+ Modern IDB: storage/indexeddb/index-multientry.html fails under GuardMalloc/ASAN.
+ https://bugs.webkit.org/show_bug.cgi?id=152990
+
+ Reviewed by Alex Christensen.
+
+ * platform/mac-wk1/TestExpectations:
+
2016-01-11 Joseph Pecoraro <pecor...@apple.com>
Web Inspector: Migrate Page Timeline recording to ScriptProfiler
Modified: trunk/LayoutTests/platform/mac-wk1/TestExpectations (194871 => 194872)
--- trunk/LayoutTests/platform/mac-wk1/TestExpectations 2016-01-11 23:34:43 UTC (rev 194871)
+++ trunk/LayoutTests/platform/mac-wk1/TestExpectations 2016-01-11 23:44:03 UTC (rev 194872)
@@ -76,9 +76,6 @@
imported/w3c/indexeddb/idbindex_openCursor2.htm [ Failure ]
imported/w3c/indexeddb/idbindex_openKeyCursor3.htm [ Failure ]
-# Crashes with GuardMalloc or ASan
-storage/indexeddb/index-multientry.html [ Skip ]
-
# Times out for unexplored reasons
storage/indexeddb/database-quota.html [ Skip ]
Modified: trunk/Source/WebCore/ChangeLog (194871 => 194872)
--- trunk/Source/WebCore/ChangeLog 2016-01-11 23:34:43 UTC (rev 194871)
+++ trunk/Source/WebCore/ChangeLog 2016-01-11 23:44:03 UTC (rev 194872)
@@ -1,3 +1,21 @@
+2016-01-11 Brady Eidson <beid...@apple.com>
+
+ Modern IDB: storage/indexeddb/index-multientry.html fails under GuardMalloc/ASAN.
+ https://bugs.webkit.org/show_bug.cgi?id=152990
+
+ Reviewed by Alex Christensen.
+
+ No new tests (Covered by re-enabling existing test).
+
+ * Modules/indexeddb/client/IDBRequestImpl.cpp:
+ (WebCore::IDBClient::IDBRequest::dispatchEvent): Use String::utf8() instead of AtomicString::characters8() for
+ the format string, as the latter fails under ASAN.
+
+ * Modules/indexeddb/server/IndexValueStore.cpp:
+ (WebCore::IDBServer::IndexValueStore::removeEntriesWithValueKey): We can't save off pointers to IDBKeyDatas
+ used as keys in the map, because the moment we start mutating the map the keys can be rehashed, invalidating
+ our pointers. Save off the IDBKeyDatas by value instead.
+
2016-01-11 Joseph Pecoraro <pecor...@apple.com>
Web Inspector: Migrate Page Timeline recording to ScriptProfiler
Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBRequestImpl.cpp (194871 => 194872)
--- trunk/Source/WebCore/Modules/indexeddb/client/IDBRequestImpl.cpp 2016-01-11 23:34:43 UTC (rev 194871)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBRequestImpl.cpp 2016-01-11 23:44:03 UTC (rev 194872)
@@ -263,7 +263,7 @@
bool IDBRequest::dispatchEvent(Event& event)
{
- LOG(IndexedDB, "IDBRequest::dispatchEvent - %s (%p)", event.type().characters8(), this);
+ LOG(IndexedDB, "IDBRequest::dispatchEvent - %s (%p)", event.type().string().utf8().data(), this);
ASSERT(m_hasPendingActivity);
ASSERT(!m_contextStopped);
Modified: trunk/Source/WebCore/Modules/indexeddb/server/IndexValueStore.cpp (194871 => 194872)
--- trunk/Source/WebCore/Modules/indexeddb/server/IndexValueStore.cpp 2016-01-11 23:34:43 UTC (rev 194871)
+++ trunk/Source/WebCore/Modules/indexeddb/server/IndexValueStore.cpp 2016-01-11 23:44:03 UTC (rev 194872)
@@ -98,18 +98,19 @@
void IndexValueStore::removeEntriesWithValueKey(MemoryIndex& index, const IDBKeyData& valueKey)
{
- HashSet<IDBKeyData*> entryKeysToRemove;
+ Vector<IDBKeyData> entryKeysToRemove;
+ entryKeysToRemove.reserveInitialCapacity(m_records.size());
for (auto& entry : m_records) {
if (entry.value->removeKey(valueKey))
index.notifyCursorsOfValueChange(entry.key, valueKey);
if (!entry.value->getCount())
- entryKeysToRemove.add(&entry.key);
+ entryKeysToRemove.uncheckedAppend(entry.key);
}
- for (auto* entry : entryKeysToRemove) {
- m_orderedKeys.erase(*entry);
- m_records.remove(*entry);
+ for (auto& entry : entryKeysToRemove) {
+ m_orderedKeys.erase(entry);
+ m_records.remove(entry);
}
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes