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
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
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
nsAHtml5TreeOpSink.h
nsHtml5ArrayCopy.h
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
nsHtml5AttributeName.cpp
nsHtml5AttributeName.h
nsHtml5AutoPauseUpdate.h
nsHtml5ByteReadable.h
nsHtml5ContentCreatorFunction.h
nsHtml5DependentUTF16Buffer.cpp
nsHtml5DependentUTF16Buffer.h
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
nsHtml5ElementName.cpp
nsHtml5ElementName.h
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
nsHtml5HtmlAttributes.cpp
nsHtml5HtmlAttributes.h
nsHtml5Macros.h
nsHtml5MetaScanner.cpp
nsHtml5MetaScanner.h
nsHtml5MetaScannerCppSupplement.h
nsHtml5MetaScannerHSupplement.h
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
nsHtml5NamedCharacters.h
nsHtml5NamedCharactersAccel.cpp
nsHtml5NamedCharactersAccel.h
nsHtml5NamedCharactersInclude.h
nsHtml5OplessBuilder.cpp
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
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
nsHtml5PlainTextUtils.cpp
nsHtml5PlainTextUtils.h
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
nsHtml5SVGLoadDispatcher.h
nsHtml5Speculation.cpp Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj 2018-06-01 10:45:27 +02:00
nsHtml5Speculation.h
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
nsHtml5StateSnapshot.cpp
nsHtml5StateSnapshot.h
nsHtml5StreamListener.cpp
nsHtml5StreamListener.h
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
nsHtml5Tokenizer.cpp Bug 1453795 - Parser/HTML - Initialize member fields in classes/ structures. r=hsivonen 2018-06-14 11:46:13 +03:00
nsHtml5Tokenizer.h
nsHtml5TokenizerCppSupplement.h
nsHtml5TokenizerHSupplement.h
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
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
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
nsHtml5UTF16Buffer.h
nsHtml5UTF16BufferCppSupplement.h
nsHtml5UTF16BufferHSupplement.h
nsHtml5ViewSourceUtils.cpp Bug 1489363 - Replace some string.Assign* with AssignLiteral. r=froydnj 2018-09-07 22:12:01 +00:00
nsHtml5ViewSourceUtils.h
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