mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-13 05:15:45 +00:00
Minor tweak to hashkey calculation. Bug 240934.
This commit is contained in:
parent
022d627b12
commit
efb534bb2c
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user