Closed
Bug 1289550
Opened 8 years ago
Closed 8 years ago
Remove "fun little hack" from XPCNativeSetKey
Categories
(Core :: XPConnect, defect)
Core
XPConnect
Tracking
()
RESOLVED
FIXED
mozilla50
Tracking | Status | |
---|---|---|
firefox50 | --- | fixed |
People
(Reporter: mccr8, Assigned: mccr8)
Details
Attachments
(1 file, 1 obsolete file)
6.34 KB,
patch
|
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
XPCNativeSetKey has a huge comment about this weird hack it does, where it tags the first 16 bytes with a magic value. The purpose of this seem to be that PLDHashtable used to require that the Match() operation handle both the desired "key" type and the actual entry type (NativeSetMap::Entry in this case), with the latter needed for resizing. However, that duality in the match operation has not been needed since bug 374906, which landed in 2007, so this class can be greatly simplified.
Assignee | ||
Comment 1•8 years ago
|
||
IsAKey() can be replaced with true, which simplifies some hash operations.
Assignee | ||
Comment 2•8 years ago
|
||
HashNativeKey is also only called with the key type. try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=de6442645240
Attachment #8775206 -
Flags: review?(bzbarsky)
Assignee | ||
Updated•8 years ago
|
Attachment #8774874 -
Attachment is obsolete: true
Comment 3•8 years ago
|
||
Comment on attachment 8775206 [details] [diff] [review] Remove "fun little hack" from XPCNativeSetKey. r=me, I think.
Attachment #8775206 -
Flags: review?(bzbarsky) → review+
Pushed by amccreight@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/8830f07a659b Remove "fun little hack" from XPCNativeSetKey. r=bz
Comment 5•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/8830f07a659b
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
You need to log in
before you can comment on or make changes to this bug.
Description
•