Closed Bug 1290587 Opened 8 years ago Closed 8 years ago

Clean up XPCNativeSetKey hashing a little bit

Categories

(Core :: XPConnect, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla51
Tracking Status
firefox50 --- affected
firefox51 --- fixed

People

(Reporter: mccr8, Assigned: mccr8)

References

Details

Attachments

(6 files)

      No description provided.
This is just to make further more substantial changes easier.
Blocks: 1290614
Review commit: https://reviewboard.mozilla.org/r/68166/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/68166/
Attachment #8776393 - Flags: review?(mrbkap)
Attachment #8776394 - Flags: review?(mrbkap)
Attachment #8776395 - Flags: review?(mrbkap)
Attachment #8776396 - Flags: review?(mrbkap)
Attachment #8776397 - Flags: review?(mrbkap)
Attachment #8776398 - Flags: review?(mrbkap)
Also, use NS_PTR_TO_UINT32 instead of NS_PTR_TO_INT32 because it is not
undefined.

Get rid of the optimization of 0 ^ x which required a comment.

Review commit: https://reviewboard.mozilla.org/r/68174/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/68174/
There's a bunch of patches here but there's nothing too complex going on.

try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=d84c376c45ad
Attachment #8776397 - Flags: review?(mrbkap) → review+
Comment on attachment 8776397 [details]
Bug 1290587, part 5 - Add helper function to hash pointers in HashNativeKey.

https://reviewboard.mozilla.org/r/68174/#review65438
Comment on attachment 8776393 [details]
Bug 1290587, part 1 - Fix style for XPCNativeSetKey.

https://reviewboard.mozilla.org/r/68166/#review65440
Attachment #8776393 - Flags: review?(mrbkap) → review+
Comment on attachment 8776394 [details]
Bug 1290587, part 2 - Make XPCNativeSetKey hashing a method.

https://reviewboard.mozilla.org/r/68168/#review65444
Attachment #8776394 - Flags: review?(mrbkap) → review+
Attachment #8776395 - Flags: review?(mrbkap) → review+
Comment on attachment 8776396 [details]
Bug 1290587, part 4 - Lower case Current in XPCNativeSetKey::Hash().

https://reviewboard.mozilla.org/r/68172/#review65448
Attachment #8776396 - Flags: review?(mrbkap) → review+
Comment on attachment 8776398 [details]
Bug 1290587, part 6 - Remove unused method NativeSetMap::Add.

https://reviewboard.mozilla.org/r/68176/#review65436
Attachment #8776398 - Flags: review?(mrbkap) → review+
(In reply to Andrew McCreight [:mccr8] from comment #6)
> Also, use NS_PTR_TO_UINT32 instead of NS_PTR_TO_INT32 because it is not
> undefined.'

As a commit message this is pretty unclear. I'm actually not entirely sure what you mean by it. The change itself is correct, though.
(In reply to Blake Kaplan (:mrbkap) from comment #15)
> As a commit message this is pretty unclear. I'm actually not entirely sure
> what you mean by it. The change itself is correct, though.

Oh sorry. I just picked that up from bug 1047176. I think MSVC does or did complain about casting from a signed integer to an unsigned integer (PLDHashNumber is unsigned). I'm not sure if that is defined behavior or not.
Pushed by amccreight@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/59d623592228
part 1 - Fix style for XPCNativeSetKey. r=mrbkap
https://hg.mozilla.org/integration/autoland/rev/bcf7690fc657
part 2 - Make XPCNativeSetKey hashing a method. r=mrbkap
https://hg.mozilla.org/integration/autoland/rev/81072f3a058a
part 3 - Inline accessors in XPCNativeSetKey::Hash(). r=mrbkap
https://hg.mozilla.org/integration/autoland/rev/2376df9ef2b7
part 4 - Lower case Current in XPCNativeSetKey::Hash(). r=mrbkap
https://hg.mozilla.org/integration/autoland/rev/4dff23362d43
part 5 - Add helper function to hash pointers in HashNativeKey. r=mrbkap
https://hg.mozilla.org/integration/autoland/rev/4c2020735c69
part 6 - Remove unused method NativeSetMap::Add. r=mrbkap
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: