Minor tweak to hashkey calculation. Bug 240934.

git-svn-id: svn://10.0.0.236/trunk@155840 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bzbarsky%mit.edu
2004-05-02 19:56:06 +00:00
parent 8ba276ba57
commit 96e46e00ab
2 changed files with 10 additions and 8 deletions

View File

@@ -1031,11 +1031,12 @@ ReflowCommandHashHashKey(PLDHashTable *table, const void *key)
const nsHTMLReflowCommand* command =
NS_STATIC_CAST(const nsHTMLReflowCommand*, key);
// The target is going to be reasonbly unique, the type comes from an enum
// and we just don't have that many types, and the child list name is either
// null or has the same high-order bits as all the other child list names.
// The target is going to be reasonably unique, if we shift out the
// always-zero low-order bits, the type comes from an enum and we just don't
// have that many types, and the child list name is either null or has the
// same high-order bits as all the other child list names.
return
NS_PTR_TO_INT32(command->GetTarget()) ^
(NS_PTR_TO_INT32(command->GetTarget()) >> 2) ^
(command->GetType() << 17) ^
(NS_PTR_TO_INT32(command->GetChildListName()) << 20);
}