gecko-dev/dom
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
..
abort
animation Bug 1415980 - make hash keys movable and not copyable; r=erahm 2018-09-20 11:20:36 -04:00
asmjscache
audiochannel
base Bug 1415980 - make hash keys movable and not copyable; r=erahm 2018-09-20 11:20:36 -04:00
battery
bindings Bug 1490009 - Clear CallbackObject fields after use for promise job to avoid tenuring objects unnecessarily r=mccr8 2018-09-20 13:28:59 +01:00
broadcastchannel
browser-element
cache
canvas Bug 1472894 - Part 2: Regenerate webgl-conf/generated-mochitest.ini. r=jgilbert 2018-09-19 19:11:49 +00:00
chrome-webidl Backed out 5 changesets (bug 1485040) for causing build bustages on test_mozwebidlcodegen. CLOSED TREE 2018-09-13 23:04:55 +03:00
clients
commandhandler Bug 1415980 - make hash keys movable and not copyable; r=erahm 2018-09-20 11:20:36 -04:00
console
credentialmanagement
crypto Bug 1491558 follow-up: Address mats' review comments 2018-09-17 02:23:06 -04:00
encoding
events Backed out 10 changesets (bug 1485305)for failing browser chrome tests on browser_loadDisallowInherit.js 2018-09-18 20:30:07 +03:00
fetch
file
filehandle Bug 1491558 - Remove the XPCOM registration for nsThreadPool; r=froydnj 2018-09-15 12:13:57 -04:00
filesystem
flex
gamepad
geolocation
grid
html Bug 1415980 - make hash keys movable and not copyable; r=erahm 2018-09-20 11:20:36 -04:00
imptests
indexedDB Backed out 10 changesets (bug 1485305)for failing browser chrome tests on browser_loadDisallowInherit.js 2018-09-18 20:30:07 +03:00
interfaces Bug 1492046 - get rid of nsIDOMXULLabeledControlElement, r=smaug 2018-09-19 15:11:02 +08:00
ipc Merge inbound to mozilla-central a=merge 2018-09-19 05:18:50 +03:00
jsurl
locales
manifest
mathml
media Bug 1368843: Enable libaom on Android. r=jya 2018-09-20 08:25:35 +00:00
messagechannel
midi
network
notification
offline
payments Bug 1491996 - Add a pref to disable the user activation/gesture requirement for PaymentRequest.show(). r=baku 2018-09-19 15:32:22 +00:00
performance
permission
plugins Bug 1399870 - make DEFFILE a Path instead of a string; r=gps 2018-09-18 15:50:19 -04:00
power
presentation
prio Bug 1485620 - add gtest for PrioEncoder r=bholley,hsivonen 2018-09-17 17:38:36 +00:00
promise
push
quota Backed out 10 changesets (bug 1485305)for failing browser chrome tests on browser_loadDisallowInherit.js 2018-09-18 20:30:07 +03:00
res
script
security Bug 1490977: Assert content privileged about page has CSP. r=smaug 2018-09-19 06:50:23 +02:00
serviceworkers Backed out 10 changesets (bug 1485305)for failing browser chrome tests on browser_loadDisallowInherit.js 2018-09-18 20:30:07 +03:00
simpledb
smil Bug 1415980 - make hash keys movable and not copyable; r=erahm 2018-09-20 11:20:36 -04:00
storage Bug 1415980 - make hash keys movable and not copyable; r=erahm 2018-09-20 11:20:36 -04:00
svg Bug 1417699 - Remove PrimitiveType enum r=mstange 2018-09-19 17:18:44 +00:00
system
tests Backed out 10 changesets (bug 1485305)for failing browser chrome tests on browser_loadDisallowInherit.js 2018-09-18 20:30:07 +03:00
u2f
url Backed out 10 changesets (bug 1485305)for failing browser chrome tests on browser_loadDisallowInherit.js 2018-09-18 20:30:07 +03:00
vr
webauthn
webbrowserpersist
webgpu
webidl Merge inbound to mozilla-central. a=merge 2018-09-19 19:42:36 +03:00
websocket
workers Backed out 10 changesets (bug 1485305)for failing browser chrome tests on browser_loadDisallowInherit.js 2018-09-18 20:30:07 +03:00
worklet
xbl Bug 1487568 - Ignore whitespace only text nodes for XBL compatibility hack for unmatched children dropping content;r=smaug 2018-09-13 18:53:41 +00:00
xhr Bug 1454325 - have XHRs adjust content type of uploads per spec using the MIME Sniffing standard; r=hsivonen 2018-09-20 01:04:51 +00:00
xml
xslt Bug 1415980 - make hash keys movable and not copyable; r=erahm 2018-09-20 11:20:36 -04:00
xul Bug 1478372, allow QueryInterface to be used for custom element implemented interfaces, r=bz,bgrins 2018-09-19 06:46:41 -04:00
jar.mn
moz.build