Closed Bug 1445113 Opened 6 years ago Closed 6 years ago

Remove duplicate static atoms

Categories

(Core :: XPCOM, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla61
Tracking Status
firefox61 --- fixed

People

(Reporter: n.nethercote, Assigned: n.nethercote)

References

Details

Attachments

(1 file)

There are 148 static atoms that are duplicated, i.e. we end up with multiple handles to the same unique static. For example nsGkAtoms::set and nsGkAtoms::set_, or nsGkAtoms::abbr and nsHTMLTags::sTagAtomTable[eHTML_abbr].

This affects how static atoms are represented: it requires a level of indirection, so that two handles can point to the same actual atom. Eventually I want to avoid this indirection and just refer to static atoms directly with static addresses -- e.g. nsGkAtom::set is the actual atom, rather than a pointer to the atom, and we can just use &nsGkAtom::set directly. But that won't work if there are duplicates like &nsGkAtom::set_, because it would break atom pointer equality.

So I want to remove all the duplicates.
Depends on: 1445114
Depends on: 1445117
Depends on: 1445142
Depends on: 1445892
Blocks: 1449395
Depends on: 1449491
Comment on attachment 8963291 [details]
Bug 1445113 - Disallow duplicate static atoms.

https://reviewboard.mozilla.org/r/232196/#review237696

\o/
Attachment #8963291 - Flags: review?(nfroyd) → review+
https://hg.mozilla.org/mozilla-central/rev/c1f212076daf
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: