gecko-dev/parser/html
Nathan Froyd e7b3b3140d Bug 1415980 - make hash keys movable and not copyable; r=erahm
Everything that goes in a PLDHashtable (and its derivatives, like
nsTHashtable) needs to inherit from PLDHashEntryHdr. But through a lack
of enforcement, copy constructors for these derived classes didn't
explicitly invoke the copy constructor for PLDHashEntryHdr (and the
compiler didn't invoke the copy constructor for us). Instead,
PLDHashTable explicitly copied around the bits that the copy constructor
would have.

The current setup has two problems:

1) Derived classes should be using move construction, not copy
   construction, since anything that's shuffling hash table keys/entries
   around will be using move construction.

2) Derived classes should take responsibility for transferring bits of
   superclass state around, and not rely on something else to handle that.

The second point is not a huge problem for PLDHashTable (PLDHashTable
only has to copy PLDHashEntryHdr's bits in a single place), but future
hash table implementations that might move entries around more
aggressively would have to insert compensation code all over the
place. Additionally, if moving entries is implemented via memcpy (which
is quite common), PLDHashTable copying around bits *again* is
inefficient.

Let's fix all these problems in one go, by:

1) Explicitly declaring the set of constructors that PLDHashEntryHdr
   implements (and does not implement). In particular, the copy
   constructor is deleted, so any derived classes that attempt to make
   themselves copyable will be detected at compile time: the compiler
   will complain that the superclass type is not copyable.

This change on its own will result in many compiler errors, so...

2) Change any derived classes to implement move constructors instead of
   copy constructors. Note that some of these move constructors are,
   strictly speaking, unnecessary, since the relevant classes are moved
   via memcpy in nsTHashtable and its derivatives.
2018-09-20 11:20:36 -04:00
..
java Bug 1446097. Switch to "set" as the canonical nsGkAtoms name of the string "set", so it matches the actual tag name "set" in SVG. r=hsivonen,njn 2018-03-16 11:26:06 -04:00
javasrc Bug 1447480 - Add a MOZ_ASSERT to make it clear that it can never fall through r=hsivonen 2018-04-03 13:40:59 +02:00
jArray.h Bug 1446097. Switch to "set" as the canonical nsGkAtoms name of the string "set", so it matches the actual tag name "set" in SVG. r=hsivonen,njn 2018-03-16 11:26:06 -04:00
moz.build Bug 1488659 - Part 1: Remove the XPCOM registrations for character detector classes; r=hsivonen 2018-09-10 07:59:42 -04:00
nsAHtml5TreeBuilderState.h Bug 1446097. Switch to "set" as the canonical nsGkAtoms name of the string "set", so it matches the actual tag name "set" in SVG. r=hsivonen,njn 2018-03-16 11:26:06 -04:00
nsAHtml5TreeOpSink.h Bug 1446097. Switch to "set" as the canonical nsGkAtoms name of the string "set", so it matches the actual tag name "set" in SVG. r=hsivonen,njn 2018-03-16 11:26:06 -04:00
nsHtml5ArrayCopy.h Bug 1446097. Switch to "set" as the canonical nsGkAtoms name of the string "set", so it matches the actual tag name "set" in SVG. r=hsivonen,njn 2018-03-16 11:26:06 -04:00
nsHtml5AtomTable.cpp Bug 1415980 - make hash keys movable and not copyable; r=erahm 2018-09-20 11:20:36 -04:00
nsHtml5AtomTable.h Bug 1415980 - make hash keys movable and not copyable; r=erahm 2018-09-20 11:20:36 -04:00
nsHtml5AttributeEntry.h Bug 1444031 - Rename Is{Static,Dynamic,HTML5}Atom. r=froydnj 2018-03-07 15:17:34 +11:00
nsHtml5AttributeName.cpp Bug 1382020 - Don't preload nomodule scripts when modules are enabled r=hsivonen 2018-01-23 13:07:37 +00:00
nsHtml5AttributeName.h Bug 1446097. Switch to "set" as the canonical nsGkAtoms name of the string "set", so it matches the actual tag name "set" in SVG. r=hsivonen,njn 2018-03-16 11:26:06 -04:00
nsHtml5AutoPauseUpdate.h
nsHtml5ByteReadable.h Bug 1446097. Switch to "set" as the canonical nsGkAtoms name of the string "set", so it matches the actual tag name "set" in SVG. r=hsivonen,njn 2018-03-16 11:26:06 -04:00
nsHtml5ContentCreatorFunction.h Bug 1446097. Switch to "set" as the canonical nsGkAtoms name of the string "set", so it matches the actual tag name "set" in SVG. r=hsivonen,njn 2018-03-16 11:26:06 -04:00
nsHtml5DependentUTF16Buffer.cpp Bug 1446097. Switch to "set" as the canonical nsGkAtoms name of the string "set", so it matches the actual tag name "set" in SVG. r=hsivonen,njn 2018-03-16 11:26:06 -04:00
nsHtml5DependentUTF16Buffer.h Bug 1446097. Switch to "set" as the canonical nsGkAtoms name of the string "set", so it matches the actual tag name "set" in SVG. r=hsivonen,njn 2018-03-16 11:26:06 -04:00
nsHtml5DocumentBuilder.cpp Bug 1456435: Make UpdateStyleSheet less bool-happy. r=heycam 2018-04-26 16:43:52 +02:00
nsHtml5DocumentBuilder.h Bug 1461701: Remove nsUpdateType and UPDATE_CONTENT_MODEL. r=smaug 2018-05-15 18:47:16 +02:00
nsHtml5DocumentMode.h Bug 1446097. Switch to "set" as the canonical nsGkAtoms name of the string "set", so it matches the actual tag name "set" in SVG. r=hsivonen,njn 2018-03-16 11:26:06 -04:00
nsHtml5ElementName.cpp Bug 1445983. <bdi> should be an HTMLElement, not HTMLUnknownElement. r=hsivonen 2018-03-16 11:26:09 -04:00
nsHtml5ElementName.h Bug 1445983. <bdi> should be an HTMLElement, not HTMLUnknownElement. r=hsivonen 2018-03-16 11:26:09 -04:00
nsHtml5Highlighter.cpp Bug 1469769 - Part 6: Replace non-failing NS_NOTREACHED with MOZ_ASSERT_UNREACHABLE. r=froydnj 2018-06-17 22:43:11 -07:00
nsHtml5Highlighter.h Bug 1446097. Switch to "set" as the canonical nsGkAtoms name of the string "set", so it matches the actual tag name "set" in SVG. r=hsivonen,njn 2018-03-16 11:26:06 -04:00
nsHtml5HtmlAttributes.cpp Bug 1446097. Switch to "set" as the canonical nsGkAtoms name of the string "set", so it matches the actual tag name "set" in SVG. r=hsivonen,njn 2018-03-16 11:26:06 -04:00
nsHtml5HtmlAttributes.h Bug 1446097. Switch to "set" as the canonical nsGkAtoms name of the string "set", so it matches the actual tag name "set" in SVG. r=hsivonen,njn 2018-03-16 11:26:06 -04:00
nsHtml5Macros.h Bug 1446097. Switch to "set" as the canonical nsGkAtoms name of the string "set", so it matches the actual tag name "set" in SVG. r=hsivonen,njn 2018-03-16 11:26:06 -04:00
nsHtml5MetaScanner.cpp
nsHtml5MetaScanner.h Bug 1446097. Switch to "set" as the canonical nsGkAtoms name of the string "set", so it matches the actual tag name "set" in SVG. r=hsivonen,njn 2018-03-16 11:26:06 -04:00
nsHtml5MetaScannerCppSupplement.h Bug 1446097. Switch to "set" as the canonical nsGkAtoms name of the string "set", so it matches the actual tag name "set" in SVG. r=hsivonen,njn 2018-03-16 11:26:06 -04:00
nsHtml5MetaScannerHSupplement.h Bug 1446097. Switch to "set" as the canonical nsGkAtoms name of the string "set", so it matches the actual tag name "set" in SVG. r=hsivonen,njn 2018-03-16 11:26:06 -04:00
nsHtml5Module.cpp Bug 1449064 (attempt 2) - Convert view_source.editor.external to a StaticPref. r=hsivonen 2018-03-29 15:29:00 +11:00
nsHtml5Module.h Bug 1449064 - Convert html.* prefs to StaticPrefs. r=hsivonen 2018-03-27 11:59:48 +11:00
nsHtml5NamedCharacters.cpp Bug 1446097. Switch to "set" as the canonical nsGkAtoms name of the string "set", so it matches the actual tag name "set" in SVG. r=hsivonen,njn 2018-03-16 11:26:06 -04:00
nsHtml5NamedCharacters.h Bug 1446097. Switch to "set" as the canonical nsGkAtoms name of the string "set", so it matches the actual tag name "set" in SVG. r=hsivonen,njn 2018-03-16 11:26:06 -04:00
nsHtml5NamedCharactersAccel.cpp Bug 1446097. Switch to "set" as the canonical nsGkAtoms name of the string "set", so it matches the actual tag name "set" in SVG. r=hsivonen,njn 2018-03-16 11:26:06 -04:00
nsHtml5NamedCharactersAccel.h Bug 1446097. Switch to "set" as the canonical nsGkAtoms name of the string "set", so it matches the actual tag name "set" in SVG. r=hsivonen,njn 2018-03-16 11:26:06 -04:00
nsHtml5NamedCharactersInclude.h Bug 1446097. Switch to "set" as the canonical nsGkAtoms name of the string "set", so it matches the actual tag name "set" in SVG. r=hsivonen,njn 2018-03-16 11:26:06 -04:00
nsHtml5OplessBuilder.cpp Bug 1446097. Switch to "set" as the canonical nsGkAtoms name of the string "set", so it matches the actual tag name "set" in SVG. r=hsivonen,njn 2018-03-16 11:26:06 -04:00
nsHtml5OplessBuilder.h
nsHtml5OwningUTF16Buffer.cpp Bug 1457813 - Part 2: Replace non-asserting NS_PRECONDITIONs with MOZ_ASSERTs. r=froydnj 2018-04-28 12:50:58 -07:00
nsHtml5OwningUTF16Buffer.h Bug 1446097. Switch to "set" as the canonical nsGkAtoms name of the string "set", so it matches the actual tag name "set" in SVG. r=hsivonen,njn 2018-03-16 11:26:06 -04:00
nsHtml5Parser.cpp Bug 1469769 - Part 6: Replace non-failing NS_NOTREACHED with MOZ_ASSERT_UNREACHABLE. r=froydnj 2018-06-17 22:43:11 -07:00
nsHtml5Parser.h Bug 1446097. Switch to "set" as the canonical nsGkAtoms name of the string "set", so it matches the actual tag name "set" in SVG. r=hsivonen,njn 2018-03-16 11:26:06 -04:00
nsHtml5PlainTextUtils.cpp Bug 1446097. Switch to "set" as the canonical nsGkAtoms name of the string "set", so it matches the actual tag name "set" in SVG. r=hsivonen,njn 2018-03-16 11:26:06 -04:00
nsHtml5PlainTextUtils.h Bug 1446097. Switch to "set" as the canonical nsGkAtoms name of the string "set", so it matches the actual tag name "set" in SVG. r=hsivonen,njn 2018-03-16 11:26:06 -04:00
nsHtml5Portability.cpp Bug 1457813 - Part 2: Replace non-asserting NS_PRECONDITIONs with MOZ_ASSERTs. r=froydnj 2018-04-28 12:50:58 -07:00
nsHtml5Portability.h
nsHtml5SVGLoadDispatcher.cpp Bug 1446097. Switch to "set" as the canonical nsGkAtoms name of the string "set", so it matches the actual tag name "set" in SVG. r=hsivonen,njn 2018-03-16 11:26:06 -04:00
nsHtml5SVGLoadDispatcher.h Bug 1446097. Switch to "set" as the canonical nsGkAtoms name of the string "set", so it matches the actual tag name "set" in SVG. r=hsivonen,njn 2018-03-16 11:26:06 -04:00
nsHtml5Speculation.cpp Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj 2018-06-01 10:45:27 +02:00
nsHtml5Speculation.h Bug 1446097. Switch to "set" as the canonical nsGkAtoms name of the string "set", so it matches the actual tag name "set" in SVG. r=hsivonen,njn 2018-03-16 11:26:06 -04:00
nsHtml5SpeculativeLoad.cpp Bug 1469769 - Part 6: Replace non-failing NS_NOTREACHED with MOZ_ASSERT_UNREACHABLE. r=froydnj 2018-06-17 22:43:11 -07:00
nsHtml5SpeculativeLoad.h Bug 1453795 - Parser/HTML - Initialize member fields in classes/ structures. r=hsivonen 2018-06-14 11:46:13 +03:00
nsHtml5StackNode.cpp Bug 1453795 - Parser/HTML - Initialize member fields in classes/ structures. r=hsivonen 2018-06-14 11:46:13 +03:00
nsHtml5StackNode.h Bug 1446097. Switch to "set" as the canonical nsGkAtoms name of the string "set", so it matches the actual tag name "set" in SVG. r=hsivonen,njn 2018-03-16 11:26:06 -04:00
nsHtml5StateSnapshot.cpp
nsHtml5StateSnapshot.h Bug 1446097. Switch to "set" as the canonical nsGkAtoms name of the string "set", so it matches the actual tag name "set" in SVG. r=hsivonen,njn 2018-03-16 11:26:06 -04:00
nsHtml5StreamListener.cpp Bug 1446097. Switch to "set" as the canonical nsGkAtoms name of the string "set", so it matches the actual tag name "set" in SVG. r=hsivonen,njn 2018-03-16 11:26:06 -04:00
nsHtml5StreamListener.h Bug 1446097. Switch to "set" as the canonical nsGkAtoms name of the string "set", so it matches the actual tag name "set" in SVG. r=hsivonen,njn 2018-03-16 11:26:06 -04:00
nsHtml5StreamParser.cpp Bug 1488659 - Part 1: Remove the XPCOM registrations for character detector classes; r=hsivonen 2018-09-10 07:59:42 -04:00
nsHtml5StreamParser.h Bug 1457813 - Part 2: Replace non-asserting NS_PRECONDITIONs with MOZ_ASSERTs. r=froydnj 2018-04-28 12:50:58 -07:00
nsHtml5StreamParserPtr.h Bug 1457813 - Part 2: Replace non-asserting NS_PRECONDITIONs with MOZ_ASSERTs. r=froydnj 2018-04-28 12:50:58 -07:00
nsHtml5String.cpp Bug 1402247 - Use encoding_rs for XPCOM string encoding conversions. r=Nika,erahm,froydnj. 2018-08-14 14:43:42 +03:00
nsHtml5String.h Bug 1447951 - Store nsDynamicAtom's chars after the end of the object. r=froydnj 2018-06-22 09:38:42 +10:00
nsHtml5StringParser.cpp Bug 1452183 part 3. Stop using nsIDOMDocumentFragment in C++. r=mccr8 2018-04-17 21:13:03 -04:00
nsHtml5StringParser.h Bug 1446097. Switch to "set" as the canonical nsGkAtoms name of the string "set", so it matches the actual tag name "set" in SVG. r=hsivonen,njn 2018-03-16 11:26:06 -04:00
nsHtml5Tokenizer.cpp Bug 1453795 - Parser/HTML - Initialize member fields in classes/ structures. r=hsivonen 2018-06-14 11:46:13 +03:00
nsHtml5Tokenizer.h Bug 1446097. Switch to "set" as the canonical nsGkAtoms name of the string "set", so it matches the actual tag name "set" in SVG. r=hsivonen,njn 2018-03-16 11:26:06 -04:00
nsHtml5TokenizerCppSupplement.h Bug 1446097. Switch to "set" as the canonical nsGkAtoms name of the string "set", so it matches the actual tag name "set" in SVG. r=hsivonen,njn 2018-03-16 11:26:06 -04:00
nsHtml5TokenizerHSupplement.h Bug 1446097. Switch to "set" as the canonical nsGkAtoms name of the string "set", so it matches the actual tag name "set" in SVG. r=hsivonen,njn 2018-03-16 11:26:06 -04:00
nsHtml5TokenizerLoopPolicies.h
nsHtml5TreeBuilder.cpp Bug 1447480 - Add a MOZ_ASSERT to make it clear that it can never fall through r=hsivonen 2018-04-03 13:40:59 +02:00
nsHtml5TreeBuilder.h Bug 1446097. Switch to "set" as the canonical nsGkAtoms name of the string "set", so it matches the actual tag name "set" in SVG. r=hsivonen,njn 2018-03-16 11:26:06 -04:00
nsHtml5TreeBuilderCppSupplement.h Bug 1478823: Add a chrome DOM event signalling that the head element's children have been parsed. r=bzbarsky 2018-08-03 21:16:04 +00:00
nsHtml5TreeBuilderHSupplement.h Bug 1445541 - Enable the character encoding menu when the document is decoded as UTF-8 and an error is found, instead of disabling it when no errors are found. r=hsivonen 2018-04-06 06:20:28 +09:00
nsHtml5TreeOpExecutor.cpp Bug 1480628 - Remove nsIWebShellServices; r=nika 2018-08-07 15:12:55 -07:00
nsHtml5TreeOpExecutor.h Bug 1469769 - Part 6: Replace non-failing NS_NOTREACHED with MOZ_ASSERT_UNREACHABLE. r=froydnj 2018-06-17 22:43:11 -07:00
nsHtml5TreeOpStage.cpp Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj 2018-06-01 10:45:27 +02:00
nsHtml5TreeOpStage.h Bug 1446097. Switch to "set" as the canonical nsGkAtoms name of the string "set", so it matches the actual tag name "set" in SVG. r=hsivonen,njn 2018-03-16 11:26:06 -04:00
nsHtml5TreeOperation.cpp Bug 1480465: Infer the namespace for custom elements at definition time by following the class hierarchy. r=smaug 2018-08-15 10:31:16 +00:00
nsHtml5TreeOperation.h Bug 1457813 - Part 2: Replace non-asserting NS_PRECONDITIONs with MOZ_ASSERTs. r=froydnj 2018-04-28 12:50:58 -07:00
nsHtml5UTF16Buffer.cpp Bug 1445983. <bdi> should be an HTMLElement, not HTMLUnknownElement. r=hsivonen 2018-03-16 11:26:09 -04:00
nsHtml5UTF16Buffer.h Bug 1446097. Switch to "set" as the canonical nsGkAtoms name of the string "set", so it matches the actual tag name "set" in SVG. r=hsivonen,njn 2018-03-16 11:26:06 -04:00
nsHtml5UTF16BufferCppSupplement.h
nsHtml5UTF16BufferHSupplement.h Bug 1446097. Switch to "set" as the canonical nsGkAtoms name of the string "set", so it matches the actual tag name "set" in SVG. r=hsivonen,njn 2018-03-16 11:26:06 -04:00
nsHtml5ViewSourceUtils.cpp Bug 1489363 - Replace some string.Assign* with AssignLiteral. r=froydnj 2018-09-07 22:12:01 +00:00
nsHtml5ViewSourceUtils.h Bug 1446097. Switch to "set" as the canonical nsGkAtoms name of the string "set", so it matches the actual tag name "set" in SVG. r=hsivonen,njn 2018-03-16 11:26:06 -04:00
nsIContentHandle.h
nsIParserUtils.idl Bug 1455674 part 13. Remove remaining xpidl uses of nsIDOMElement. r=qdot 2018-04-26 23:37:29 -04:00
nsIScriptableUnescapeHTML.idl Bug 1455674 part 13. Remove remaining xpidl uses of nsIDOMElement. r=qdot 2018-04-26 23:37:29 -04:00
nsParserUtils.cpp Bug 1476306 - Moving NullPrincipal/ContentPrincipal/SystemPrincipal under mozilla namespace - part 1 - NullPrincipal, r=ckerschb 2018-07-17 21:37:48 +02:00
nsParserUtils.h Bug 1446097. Switch to "set" as the canonical nsGkAtoms name of the string "set", so it matches the actual tag name "set" in SVG. r=hsivonen,njn 2018-03-16 11:26:06 -04:00