Title: [184153] trunk/Source/_javascript_Core
- Revision
- 184153
- Author
- [email protected]
- Date
- 2015-05-11 22:51:21 -0700 (Mon, 11 May 2015)
Log Message
Unreviewed, rolling out r184009.
https://bugs.webkit.org/show_bug.cgi?id=144900
Caused crashes on inspector tests (Requested by ap on
#webkit).
Reverted changeset:
"MapDataImpl::add() shouldn't do the same hash lookup twice."
https://bugs.webkit.org/show_bug.cgi?id=144759
http://trac.webkit.org/changeset/184009
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (184152 => 184153)
--- trunk/Source/_javascript_Core/ChangeLog 2015-05-12 05:48:57 UTC (rev 184152)
+++ trunk/Source/_javascript_Core/ChangeLog 2015-05-12 05:51:21 UTC (rev 184153)
@@ -1,5 +1,19 @@
2015-05-11 Commit Queue <[email protected]>
+ Unreviewed, rolling out r184009.
+ https://bugs.webkit.org/show_bug.cgi?id=144900
+
+ Caused crashes on inspector tests (Requested by ap on
+ #webkit).
+
+ Reverted changeset:
+
+ "MapDataImpl::add() shouldn't do the same hash lookup twice."
+ https://bugs.webkit.org/show_bug.cgi?id=144759
+ http://trac.webkit.org/changeset/184009
+
+2015-05-11 Commit Queue <[email protected]>
+
Unreviewed, rolling out r184123.
https://bugs.webkit.org/show_bug.cgi?id=144899
Modified: trunk/Source/_javascript_Core/runtime/MapDataInlines.h (184152 => 184153)
--- trunk/Source/_javascript_Core/runtime/MapDataInlines.h 2015-05-12 05:48:57 UTC (rev 184152)
+++ trunk/Source/_javascript_Core/runtime/MapDataInlines.h 2015-05-12 05:51:21 UTC (rev 184153)
@@ -91,16 +91,15 @@
template <typename Map, typename Key>
inline Entry* MapDataImpl<Entry, JSIterator>::add(ExecState* exec, JSCell* owner, Map& map, Key key, KeyType keyValue)
{
- auto result = map.add(key, m_size);
- if (!result.isNewEntry)
- return &m_entries[result.iterator->value];
+ typename Map::iterator location = map.find(key);
+ if (location != map.end())
+ return &m_entries[location->value];
- if (!ensureSpaceForAppend(exec, owner)) {
- map.remove(result.iterator);
+ if (!ensureSpaceForAppend(exec, owner))
return 0;
- }
- result.iterator->value = m_size;
+ auto result = map.add(key, m_size);
+ RELEASE_ASSERT(result.isNewEntry);
Entry* entry = &m_entries[m_size++];
new (entry) Entry();
entry->setKey(exec->vm(), owner, keyValue.value);
@@ -175,9 +174,7 @@
{
ASSERT(shouldPack());
int32_t newEnd = 0;
- ASSERT(newCapacity > 0);
- RELEASE_ASSERT(newCapacity > m_size);
-
+ RELEASE_ASSERT(newCapacity > 0);
for (int32_t i = 0; i < m_size; i++) {
Entry& entry = m_entries[i];
if (!entry.key()) {
@@ -197,22 +194,14 @@
}
// Fixup for the hashmaps
- for (auto ptr = m_valueKeyedTable.begin(); ptr != m_valueKeyedTable.end(); ++ptr) {
- if (ptr->value < m_size)
- ptr->value = m_entries[ptr->value].key().get().asInt32();
- }
- for (auto ptr = m_cellKeyedTable.begin(); ptr != m_cellKeyedTable.end(); ++ptr) {
- if (ptr->value < m_size)
- ptr->value = m_entries[ptr->value].key().get().asInt32();
- }
- for (auto ptr = m_stringKeyedTable.begin(); ptr != m_stringKeyedTable.end(); ++ptr) {
- if (ptr->value < m_size)
- ptr->value = m_entries[ptr->value].key().get().asInt32();
- }
- for (auto ptr = m_symbolKeyedTable.begin(); ptr != m_symbolKeyedTable.end(); ++ptr) {
- if (ptr->value < m_size)
- ptr->value = m_entries[ptr->value].key().get().asInt32();
- }
+ for (auto ptr = m_valueKeyedTable.begin(); ptr != m_valueKeyedTable.end(); ++ptr)
+ ptr->value = m_entries[ptr->value].key().get().asInt32();
+ for (auto ptr = m_cellKeyedTable.begin(); ptr != m_cellKeyedTable.end(); ++ptr)
+ ptr->value = m_entries[ptr->value].key().get().asInt32();
+ for (auto ptr = m_stringKeyedTable.begin(); ptr != m_stringKeyedTable.end(); ++ptr)
+ ptr->value = m_entries[ptr->value].key().get().asInt32();
+ for (auto ptr = m_symbolKeyedTable.begin(); ptr != m_symbolKeyedTable.end(); ++ptr)
+ ptr->value = m_entries[ptr->value].key().get().asInt32();
ASSERT((m_size - newEnd) == m_deletedCount);
m_deletedCount = 0;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes