Closed
Bug 1266639
Opened 8 years ago
Closed 8 years ago
Don't separately heap-allocate PLDHashTables within XPCMaps
Categories
(Core :: XPConnect, defect)
Core
XPConnect
Tracking
()
RESOLVED
FIXED
mozilla49
Tracking | Status | |
---|---|---|
firefox49 | --- | fixed |
People
(Reporter: n.nethercote, Assigned: n.nethercote)
Details
(Whiteboard: btpp-active)
Attachments
(1 file)
24.47 KB,
patch
|
mrbkap
:
review+
|
Details | Diff | Splinter Review |
I was looking at a crash report involving XPCMaps
(https://crash-stats.mozilla.com/report/index/10b7f3fb-224a-4862-b0e5-c802a2160421)
which made me ask "can ClassInfo2WrappedNativeProtoMap:mTable be null?" and I
realized it couldn't because that member is infallibly initialized in the
constructor and only deleted in the destructor.
Which means it doesn't need to be heap-allocated, it can just be an inline
member. And the same is true for all the PLDHashTables in the other XPCMaps.
Assignee | ||
Comment 1•8 years ago
|
||
Most of the XPCMap classes contain a |PLDHashTable*|. This can be changed to a
|PLDHashTable|, which avoids some malloc/free calls, removes the needs for
explicit destructors, and removes "can this pointer be null?" questions.
The patch also cleans up the iterators provided by XPCMap classes a little.
Attachment #8744160 -
Flags: review?(mrbkap)
Updated•8 years ago
|
Whiteboard: btpp-active
Updated•8 years ago
|
Attachment #8744160 -
Flags: review?(mrbkap) → review+
Assignee | ||
Comment 2•8 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/048c047097a97068fa5e4f2592c53e59449ab8fd
Bug 1266639 - Don't separately heap-allocate PLDHashTables within XPCMaps. r=mrbkap.
Comment 3•8 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox49:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
Updated•8 years ago
|
Target Milestone: mozilla48 → mozilla49
You need to log in
before you can comment on or make changes to this bug.
Description
•