Closed
Bug 1445079
Opened 6 years ago
Closed 6 years ago
Remove nsHTMLTags::sTagAtomTable[]
Categories
(Core :: DOM: HTML Parser, enhancement)
Core
DOM: HTML Parser
Tracking
()
RESOLVED
FIXED
mozilla61
Tracking | Status | |
---|---|---|
firefox61 | --- | fixed |
People
(Reporter: n.nethercote, Assigned: n.nethercote)
References
Details
Attachments
(2 files)
nsHTMLTags::sTagAtomTable[] is completely unnecessary; we just end up with a pile of duplicate atom pointers.
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 3•6 years ago
|
||
mozreview-review |
Comment on attachment 8958267 [details] Bug 1445079 - Rename nsHTMLTags::sTagUnicodeTable[] as sTagNames[]. https://reviewboard.mozilla.org/r/227196/#review233160
Attachment #8958267 -
Flags: review?(nfroyd) → review+
Comment 4•6 years ago
|
||
mozreview-review |
Comment on attachment 8958268 [details] Bug 1445079 - Remove nsHTMLTags::sTagAtomTable[]. https://reviewboard.mozilla.org/r/227198/#review233244 This seems like a win, even if the debug checking is a little more complicated. ::: parser/htmlparser/nsHTMLTags.cpp:48 (Diff revision 1) > +#ifdef DEBUG > + uint32_t maxTagNameLength = 0; > +#endif Making this a `DebugOnly<uint32_t>` would enable getting rid of the preprocessor conditional here and at the `MOZ_ASSERT` outside of the loop. You'd still want the conditional inside the loop, though, because you wouldn't want to do the string stuff...so not sure this change would be worth it.
Attachment #8958268 -
Flags: review?(nfroyd) → review+
Assignee | ||
Comment 5•6 years ago
|
||
> Making this a `DebugOnly<uint32_t>` would enable getting rid of the
> preprocessor conditional here and at the `MOZ_ASSERT` outside of the loop.
> You'd still want the conditional inside the loop, though, because you
> wouldn't want to do the string stuff...so not sure this change would be
> worth it.
I tried DebugOnly<> but it didn't play nicely with std::max().
I will move all the checking stuff into a second loop. The loop header will be repeated, but I think that's worth it to have a single DEBUG block for all the checking.
Assignee | ||
Comment 6•6 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/f82612511ab33500b0e4c7f161bc49b7a7618c60 Bug 1445079 - Rename nsHTMLTags::sTagUnicodeTable[] as sTagNames[]. r=froydnj https://hg.mozilla.org/integration/mozilla-inbound/rev/cffdea92ed42a8fce6dff6e1fbba9a7e8b25ea91 Bug 1445079 - Remove nsHTMLTags::sTagAtomTable[]. r=froydnj
Comment 7•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/f82612511ab3 https://hg.mozilla.org/mozilla-central/rev/cffdea92ed42
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.
Description
•