Closed
Bug 1290239
Opened 9 years ago
Closed 8 years ago
HashNativeKey computes incorrect hash value when |mBaseSet| is null
Categories
(Core :: XPConnect, defect)
Core
XPConnect
Tracking
()
RESOLVED
FIXED
mozilla51
People
(Reporter: mccr8, Assigned: mccr8)
References
Details
Attachments
(2 files)
The hashing function for XPCNativeSetKey can be called with a null mBaseSet. In this case, it is supposed to compute the hash value for a new XPCNativeSet with mAddition added. It does this by computing the hash for a native set containing _only_ mAddition, but all XPCNativeSets also contain nsISupports as the first value, so that must be added into the hash value, too. I think the worst that can happen is that sometimes we end up with two copies of a native set floating around.
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → continuation
Assignee | ||
Comment 1•9 years ago
|
||
In my patches for bug 1288909, I have to remove native sets from the native set map when they die, but this bug means that the map can contain a pointer to the set that is not removed when you call Remove() on that set.
Blocks: 1288909
Assignee | ||
Comment 2•9 years ago
|
||
Assignee | ||
Comment 3•9 years ago
|
||
You should review bug 1290614 first, if only to get a better sense of XPCNativeSetKey.
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 6•9 years ago
|
||
mozreview-review |
Comment on attachment 8779380 [details]
Bug 1290239, part 1 - Compute the correct hash value for an XPCNativeSetKey when mBaseSet is null.
https://reviewboard.mozilla.org/r/70370/#review67864
Attachment #8779380 -
Flags: review?(mrbkap) → review+
Comment 7•9 years ago
|
||
mozreview-review |
Comment on attachment 8779381 [details]
Bug 1290239, part 2 - Add assertions about inserting into NativeSetMap.
https://reviewboard.mozilla.org/r/70372/#review67868
Attachment #8779381 -
Flags: review?(mrbkap) → review+
Pushed by amccreight@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e582ee72021c
part 1 - Compute the correct hash value for an XPCNativeSetKey when mBaseSet is null. r=mrbkap
https://hg.mozilla.org/integration/autoland/rev/4eda5a74d949
part 2 - Add assertions about inserting into NativeSetMap. r=mrbkap
Comment 9•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/e582ee72021c
https://hg.mozilla.org/mozilla-central/rev/4eda5a74d949
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox51:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
You need to log in
before you can comment on or make changes to this bug.
Description
•