[Webkit-unassigned] [Bug 33269] Improve HTMLElement::tagPriority()

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jan 7 09:39:10 PST 2010


https://bugs.webkit.org/show_bug.cgi?id=33269





--- Comment #11 from Darin Adler <darin at apple.com>  2010-01-07 09:39:10 PST ---
(In reply to comment #8)
> I read the code of HashTable.h and HashMap.h, and still wonder why it is not
> safe.
> You are talking about a case of empty HashTable, and it's safe for non-empty
> HashTable, right?

I am talking about a non-empty map.

HashTable::lookup will hash the empty key and get a hash value of 0, then the
loop will look at the 0'th bucket in the hash table and if it is an empty
bucket, will return a pointer to it. I believe the empty bucket is guaranteed
to have a key of zero, but could easily have a value that's non-zero.

That's how I understand the code. There may be something wrong with my
analysis.

In general, I have long believed that both the empty and deleted values are
illegal as arguments to the HashTable::lookup function. I believe we need
assertions to catch cases like that to make correct programming with this class
template easier.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list