[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
mjs
mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:42:33 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit e48d3696580be4edce6fbde3c89ebe5d757c1240
Author: mjs <mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Sat May 17 04:55:26 2003 +0000
Reviewed by Ken.
- fixed 3254063 - REGRESSION: hang in KJS PropertyMap with many items in iDisk pictures folder
* kjs/property_map.cpp:
(PropertyMap::expand): Fixed to maintain key count properly - otherwise the hashtable
could get completely full, resulting in disaster.
(PropertyMap::checkConsistency): Fixed compilation. Fixed to know about deleted
sentinel. Fixed to search with double-hashing instead of linear probing.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@4391 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog
index faae8d0..69d561d 100644
--- a/JavaScriptCore/ChangeLog
+++ b/JavaScriptCore/ChangeLog
@@ -1,3 +1,15 @@
+2003-05-16 Maciej Stachowiak <mjs at apple.com>
+
+ Reviewed by Ken.
+
+ - fixed 3254063 - REGRESSION: hang in KJS PropertyMap with many items in iDisk pictures folder
+
+ * kjs/property_map.cpp:
+ (PropertyMap::expand): Fixed to maintain key count properly - otherwise the hashtable
+ could get completely full, resulting in disaster.
+ (PropertyMap::checkConsistency): Fixed compilation. Fixed to know about deleted
+ sentinel. Fixed to search with double-hashing instead of linear probing.
+
=== Safari-79 ===
2003-05-15 Maciej Stachowiak <mjs at apple.com>
diff --git a/JavaScriptCore/ChangeLog-2003-10-25 b/JavaScriptCore/ChangeLog-2003-10-25
index faae8d0..69d561d 100644
--- a/JavaScriptCore/ChangeLog-2003-10-25
+++ b/JavaScriptCore/ChangeLog-2003-10-25
@@ -1,3 +1,15 @@
+2003-05-16 Maciej Stachowiak <mjs at apple.com>
+
+ Reviewed by Ken.
+
+ - fixed 3254063 - REGRESSION: hang in KJS PropertyMap with many items in iDisk pictures folder
+
+ * kjs/property_map.cpp:
+ (PropertyMap::expand): Fixed to maintain key count properly - otherwise the hashtable
+ could get completely full, resulting in disaster.
+ (PropertyMap::checkConsistency): Fixed compilation. Fixed to know about deleted
+ sentinel. Fixed to search with double-hashing instead of linear probing.
+
=== Safari-79 ===
2003-05-15 Maciej Stachowiak <mjs at apple.com>
diff --git a/JavaScriptCore/kjs/property_map.cpp b/JavaScriptCore/kjs/property_map.cpp
index 345241d..0d647a1 100644
--- a/JavaScriptCore/kjs/property_map.cpp
+++ b/JavaScriptCore/kjs/property_map.cpp
@@ -329,17 +329,23 @@ void PropertyMap::expand()
Table *oldTable = _table;
int oldTableSize = oldTable ? oldTable->size : 0;
-
+ int oldTableKeyCount = oldTable ? oldTable->keyCount : 0;
+
int newTableSize = oldTableSize ? oldTableSize * 2 : 16;
_table = (Table *)calloc(1, sizeof(Table) + (newTableSize - 1) * sizeof(Entry) );
_table->size = newTableSize;
_table->sizeMask = newTableSize - 1;
+ _table->keyCount = oldTableKeyCount;
#if USE_SINGLE_ENTRY
UString::Rep *key = _singleEntry.key;
if (key) {
insert(key, _singleEntry.value, _singleEntry.attributes);
_singleEntry.key = 0;
+ // update the count, because single entries don't count towards
+ // the table key count
+ ++_table->keyCount;
+ assert(_table->keyCount == 1);
}
#endif
@@ -555,14 +561,17 @@ void PropertyMap::checkConsistency()
int count = 0;
for (int j = 0; j != _table->size; ++j) {
UString::Rep *rep = _table->entries[j].key;
- if (!rep)
+ if (!rep || rep == &UString::Rep::null)
continue;
unsigned h = rep->hash();
int i = h & _table->sizeMask;
+ int k = 0;
while (UString::Rep *key = _table->entries[i].key) {
if (rep == key)
break;
- i = (i + 1) & _tableSizeMask;
+ if (k == 0)
+ k = 1 | (h % _table->sizeMask);
+ i = (i + k) & _table->sizeMask;
}
assert(i == j);
count++;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list