Closed
Bug 1053379
Opened 10 years ago
Closed 5 years ago
Reduce amount of boilerplate code required for CodeAddressService
Categories
(Core :: XPCOM, defect)
Core
XPCOM
Tracking
()
RESOLVED
FIXED
mozilla70
Tracking | Status | |
---|---|---|
firefox70 | --- | fixed |
People
(Reporter: erahm, Assigned: heycam)
References
Details
Attachments
(1 file)
In bug 1050445 a fair amount of duplicated template params for CodeAddressService were added to BlockingResourceBase (copied from nsTraceRefcnt). We can probably either factor these out to a shared header or add sensible defaults to CodeAddressService itself.
It seems like for CodeAddressService we could reduce the amount of template params to:
- writer
- allocator
- unlocker
The hashtable param could just be replaced w/ the standard implementation we have now and the allocator provided as a template param would be used.
We could go further and provide sensible defaults for allocator and unlocker and DMD could override those. So in theory a standard implementation would just look like this:
struct MyWriter { ... };
CodeAddressService<MyWriter> cas;
Comment 1•10 years ago
|
||
That sounds like a good idea. The parameters are basically needed because DMD is weird. I expect every usage in the browser itself will just use the standard set of arguments.
Comment 2•10 years ago
|
||
Bug 1061385 removed the |Writer| param, which was a big part of this.
Assignee | ||
Comment 3•5 years ago
|
||
None of the StringTable implementations were freeing their strdup'd
strings, either.
Assignee | ||
Comment 4•5 years ago
|
||
Assignee: nobody → cam
Status: NEW → ASSIGNED
Pushed by cmccormack@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6411cd0771a9
Simplify CodeAddressService so non-DMD users can rely on defaults. r=njn
Comment 6•5 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
status-firefox70:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla70
You need to log in
before you can comment on or make changes to this bug.
Description
•