gecko-dev/parser/htmlparser
Nicholas Nethercote f2d1f3b005 Bug 1407117 - Simplify static atom representation. r=froydnj,bz.
Currently nsAtom::mString points to the interior of an nsStringBuffer. For
static atoms this requires the use of nsFakeStringBuffer, which is pretty
gross.

This patch changes things so that nsAtom::mString points to a static char
buffer for static atoms. This simplifies a number of things:

- nsFakeStringBuffer and CheckStaticAtomSizes are no longer needed.

- FakeBufferRefCountHelper is no longer needed.

- nsAtom's constructor for static atoms is simpler.

- RegisterStaticAtoms() is simpler.

On the flip-side, a couple of things get more complicated.

- nsAtom::ToString() treats static and dynamic atoms differently.

- nsAtom::GetStringBuffer() is now only valid for dynamic atoms. This
  function is only used in two places, both involving DOMString, so those
  locations are updated appropriately. This also requires updating some other
  code assigning nsStrings to DOMStrings, because we can't assume that
  nsStrings are shared.

On Linux64 this change reduces the size of the binary by 8752 B, and moves
81968 B from the .data to the .rodata section, where it can be shared between
processes.

--HG--
extra : rebase_source : 0f6fcdec1c525aa66222e208b66a9f9026f69bcb
2017-10-12 10:52:17 +11:00
..
tests Bug 863246 - Fix test failures r=Gijs 2017-07-19 17:30:01 +08:00
CNavDTD.cpp
CNavDTD.h
CParserContext.cpp Bug 1400460 - Rename nsIAtom as nsAtom. r=hiro. 2017-10-03 09:05:19 +11:00
CParserContext.h
moz.build Bug 1395828 (part 4) - Remove nsIParserService/nsParserService. r=mrbkap. 2017-09-05 20:19:06 +10:00
nsElementTable.cpp Bug 1402941 - Add HTMLSlotElement (disabled for now), r=hsivonen 2017-10-02 13:22:12 +03:00
nsElementTable.h Bug 1400777 (part 5) - Clean up nsElementTable.{cpp,h}. r=mrbkap. 2017-09-20 08:32:51 +10:00
nsExpatDriver.cpp
nsExpatDriver.h
nsHTMLTagList.h Bug 1402941 - Add HTMLSlotElement (disabled for now), r=hsivonen 2017-10-02 13:22:12 +03:00
nsHTMLTags.cpp Bug 1407117 - Simplify static atom representation. r=froydnj,bz. 2017-10-12 10:52:17 +11:00
nsHTMLTags.h Bug 1400460 - Rename nsIAtom as nsAtom. r=hiro. 2017-10-03 09:05:19 +11:00
nsHTMLTokenizer.cpp
nsHTMLTokenizer.h
nsIContentSink.h
nsIDTD.h
nsIExpatSink.idl
nsIExtendedExpatSink.idl
nsIFragmentContentSink.h
nsIHTMLContentSink.h
nsIParser.h Bug 1400460 - Rename nsIAtom as nsAtom. r=hiro. 2017-10-03 09:05:19 +11:00
nsITokenizer.h
nsParser.cpp Bug 1400460 - Rename nsIAtom as nsAtom. r=hiro. 2017-10-03 09:05:19 +11:00
nsParser.h
nsParserBase.h
nsParserCIID.h Bug 1402769 - Remove unused stuff in and around nsParserModule.cpp. r=mrbkap. 2017-09-05 20:43:30 +10:00
nsParserConstants.h
nsParserModule.cpp Bug 1402769 - Remove unused stuff in and around nsParserModule.cpp. r=mrbkap. 2017-09-05 20:43:30 +10:00
nsParserMsgUtils.cpp
nsParserMsgUtils.h
nsScanner.cpp
nsScanner.h
nsScannerString.cpp
nsScannerString.h