Skip to content

Commit e7b3b31

Browse files
committed
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.
1 parent 31e8ed3 commit e7b3b31

34 files changed

+175
-98
lines changed

accessible/base/NotificationController.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,10 @@ class NotificationController final : public EventQueue,
367367
typedef const T* KeyTypePointer;
368368

369369
explicit nsCOMPtrHashKey(const T* aKey) : mKey(const_cast<T*>(aKey)) {}
370-
explicit nsCOMPtrHashKey(const nsPtrHashKey<T> &aToCopy) : mKey(aToCopy.mKey) {}
370+
nsCOMPtrHashKey(nsCOMPtrHashKey<T>&& aOther)
371+
: PLDHashEntryHdr(std::move(aOther))
372+
, mKey(std::move(aOther.mKey))
373+
{}
371374
~nsCOMPtrHashKey() { }
372375

373376
KeyType GetKey() const { return mKey; }

dom/animation/PseudoElementHashEntry.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class PseudoElementHashEntry : public PLDHashEntryHdr
2424
explicit PseudoElementHashEntry(KeyTypePointer aKey)
2525
: mElement(aKey->mElement)
2626
, mPseudoType(aKey->mPseudoType) { }
27-
explicit PseudoElementHashEntry(const PseudoElementHashEntry& aCopy)=default;
27+
PseudoElementHashEntry(PseudoElementHashEntry&& aOther) = default;
2828

2929
~PseudoElementHashEntry() = default;
3030

dom/base/nsDocument.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,8 @@ nsIdentifierMapEntry::~nsIdentifierMapEntry()
392392
{}
393393

394394
nsIdentifierMapEntry::nsIdentifierMapEntry(nsIdentifierMapEntry&& aOther)
395-
: mKey(std::move(aOther.mKey))
395+
: PLDHashEntryHdr(std::move(aOther))
396+
, mKey(std::move(aOther.mKey))
396397
, mIdContentList(std::move(aOther.mIdContentList))
397398
, mNameContentList(std::move(aOther.mNameContentList))
398399
, mChangeCallbacks(std::move(aOther.mChangeCallbacks))

dom/base/nsIdentifierMapEntry.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,9 @@ class nsIdentifierMapEntry : public PLDHashEntryHdr
182182

183183
explicit ChangeCallbackEntry(const ChangeCallback* aKey) :
184184
mKey(*aKey) { }
185-
ChangeCallbackEntry(const ChangeCallbackEntry& toCopy) :
186-
mKey(toCopy.mKey) { }
185+
ChangeCallbackEntry(ChangeCallbackEntry&& aOther) :
186+
PLDHashEntryHdr(std::move(aOther)),
187+
mKey(std::move(aOther.mKey)) { }
187188

188189
KeyType GetKey() const { return mKey; }
189190
bool KeyEquals(KeyTypePointer aKey) const {

dom/base/nsNodeInfoManager.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ class nsNodeInfoManager final
148148
{
149149
public:
150150
explicit NodeInfoInnerKey(KeyTypePointer aKey) : nsPtrHashKey(aKey) {}
151+
NodeInfoInnerKey(NodeInfoInnerKey&&) = default;
151152
~NodeInfoInnerKey() = default;
152153
bool KeyEquals(KeyTypePointer aKey) const { return *mKey == *aKey; }
153154
static PLDHashNumber HashKey(KeyTypePointer aKey) { return aKey->Hash(); }

dom/commandhandler/nsCommandParams.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,10 +336,10 @@ nsCommandParams::HashMoveEntry(PLDHashTable* aTable,
336336
const PLDHashEntryHdr* aFrom,
337337
PLDHashEntryHdr* aTo)
338338
{
339-
const HashEntry* fromEntry = static_cast<const HashEntry*>(aFrom);
339+
auto* fromEntry = const_cast<HashEntry*>(static_cast<const HashEntry*>(aFrom));
340340
HashEntry* toEntry = static_cast<HashEntry*>(aTo);
341341

342-
new (toEntry) HashEntry(*fromEntry);
342+
new (KnownNotNull, toEntry) HashEntry(std::move(*fromEntry));
343343

344344
fromEntry->~HashEntry();
345345
}

dom/commandhandler/nsCommandParams.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ class nsCommandParams : public nsICommandParams
8686
Reset(mEntryType);
8787
}
8888

89-
HashEntry(const HashEntry& aRHS)
89+
explicit HashEntry(const HashEntry& aRHS)
9090
: mEntryType(aRHS.mEntryType)
9191
{
9292
Reset(mEntryType);

dom/html/HTMLMediaElement.cpp

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3689,15 +3689,10 @@ HTMLMediaElement::MozCaptureStreamUntilEnded(ErrorResult& aRv)
36893689
class MediaElementSetForURI : public nsURIHashKey
36903690
{
36913691
public:
3692-
explicit MediaElementSetForURI(const nsIURI* aKey)
3693-
: nsURIHashKey(aKey)
3694-
{
3695-
}
3696-
MediaElementSetForURI(const MediaElementSetForURI& toCopy)
3697-
: nsURIHashKey(toCopy)
3698-
, mElements(toCopy.mElements)
3699-
{
3700-
}
3692+
explicit MediaElementSetForURI(const nsIURI* aKey) : nsURIHashKey(aKey) {}
3693+
MediaElementSetForURI(MediaElementSetForURI&& aOther)
3694+
: nsURIHashKey(std::move(aOther))
3695+
, mElements(std::move(aOther.mElements)) {}
37013696
nsTArray<HTMLMediaElement*> mElements;
37023697
};
37033698

dom/smil/nsSMILCompositor.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ class nsSMILCompositor : public PLDHashEntryHdr
3535
mForceCompositing(false)
3636
{ }
3737
nsSMILCompositor(nsSMILCompositor&& toMove)
38-
: mKey(std::move(toMove.mKey)),
38+
: PLDHashEntryHdr(std::move(toMove)),
39+
mKey(std::move(toMove.mKey)),
3940
mAnimationFunctions(std::move(toMove.mAnimationFunctions)),
4041
mForceCompositing(false)
4142
{ }

dom/storage/LocalStorageManager.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,10 @@ class LocalStorageManager final : public nsIDOMStorageManager
6666
, mCache(new LocalStorageCache(aKey))
6767
{}
6868

69-
LocalStorageCacheHashKey(const LocalStorageCacheHashKey& aOther)
70-
: nsCStringHashKey(aOther)
69+
LocalStorageCacheHashKey(LocalStorageCacheHashKey&& aOther)
70+
: nsCStringHashKey(std::move(aOther))
71+
, mCache(std::move(aOther.mCache))
72+
, mCacheRef(std::move(aOther.mCacheRef))
7173
{
7274
NS_ERROR("Shouldn't be called");
7375
}

dom/xslt/xslt/txExecutionState.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,10 @@ class txLoadedDocumentEntry : public nsStringHashKey
2929
mLoadResult(NS_OK)
3030
{
3131
}
32-
txLoadedDocumentEntry(const txLoadedDocumentEntry& aToCopy)
33-
: nsStringHashKey(aToCopy)
32+
txLoadedDocumentEntry(txLoadedDocumentEntry&& aOther)
33+
: nsStringHashKey(std::move(aOther))
34+
, mDocument(std::move(aOther.mDocument))
35+
, mLoadResult(std::move(aOther.mLoadResult))
3436
{
3537
NS_ERROR("We're horked.");
3638
}

gfx/thebes/gfxFontFeatures.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,10 @@ class gfxFontFeatureValueSet final {
112112
typedef const FeatureValueHashKey *KeyTypePointer;
113113

114114
explicit FeatureValueHashEntry(KeyTypePointer aKey) { }
115-
FeatureValueHashEntry(const FeatureValueHashEntry& toCopy)
115+
FeatureValueHashEntry(FeatureValueHashEntry&& other)
116+
: PLDHashEntryHdr(std::move(other))
117+
, mKey(std::move(other.mKey))
118+
, mValues(std::move(other.mValues))
116119
{
117120
NS_ERROR("Should not be called");
118121
}

gfx/thebes/gfxGlyphExtents.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,12 @@ class gfxGlyphExtents {
9494
, y(0.0)
9595
, width(0.0)
9696
, height(0.0) {}
97-
HashEntry(const HashEntry& toCopy)
98-
: nsUint32HashKey(toCopy) {
99-
x = toCopy.x;
100-
y = toCopy.y;
101-
width = toCopy.width;
102-
height = toCopy.height;
97+
HashEntry(HashEntry&& aOther)
98+
: nsUint32HashKey(std::move(aOther))
99+
, x(aOther.x)
100+
, y(aOther.y)
101+
, width(aOther.width)
102+
, height(aOther.height) {
103103
}
104104

105105
float x, y, width, height;

gfx/thebes/gfxUserFontSet.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,8 @@ class gfxUserFontSet {
394394
{ }
395395

396396
Entry(Entry&& aOther)
397-
: mURI(std::move(aOther.mURI))
397+
: PLDHashEntryHdr(std::move(aOther))
398+
, mURI(std::move(aOther.mURI))
398399
, mPrincipal(std::move(aOther.mPrincipal))
399400
, mFontEntry(std::move(aOther.mFontEntry))
400401
, mPrivate(std::move(aOther.mPrivate))

layout/painting/RetainedDisplayListHelpers.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class DisplayItemHashEntry : public PLDHashEntryHdr
3030
: mKey(*aKey)
3131
{
3232
}
33-
explicit DisplayItemHashEntry(const DisplayItemHashEntry& aCopy) = default;
33+
DisplayItemHashEntry(DisplayItemHashEntry&&) = default;
3434

3535
~DisplayItemHashEntry() = default;
3636

layout/style/Loader.h

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include "mozilla/StyleSheetInlines.h"
2525
#include "mozilla/Maybe.h"
2626
#include "mozilla/MemoryReporting.h"
27+
#include "mozilla/Move.h"
2728
#include "mozilla/StyleSheet.h"
2829
#include "mozilla/UniquePtr.h"
2930
#include "mozilla/net/ReferrerPolicy.h"
@@ -70,11 +71,11 @@ class URIPrincipalReferrerPolicyAndCORSModeHashKey : public nsURIHashKey
7071
MOZ_COUNT_CTOR(URIPrincipalReferrerPolicyAndCORSModeHashKey);
7172
}
7273

73-
URIPrincipalReferrerPolicyAndCORSModeHashKey(const URIPrincipalReferrerPolicyAndCORSModeHashKey& toCopy)
74-
: nsURIHashKey(toCopy),
75-
mPrincipal(toCopy.mPrincipal),
76-
mCORSMode(toCopy.mCORSMode),
77-
mReferrerPolicy(toCopy.mReferrerPolicy)
74+
URIPrincipalReferrerPolicyAndCORSModeHashKey(URIPrincipalReferrerPolicyAndCORSModeHashKey&& toMove)
75+
: nsURIHashKey(std::move(toMove)),
76+
mPrincipal(std::move(toMove.mPrincipal)),
77+
mCORSMode(std::move(toMove.mCORSMode)),
78+
mReferrerPolicy(std::move(toMove.mReferrerPolicy))
7879
{
7980
MOZ_COUNT_CTOR(URIPrincipalReferrerPolicyAndCORSModeHashKey);
8081
}

modules/libpref/Preferences.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2052,7 +2052,7 @@ class PrefCallback : public PLDHashEntryHdr
20522052
mCanonical = canonical;
20532053
}
20542054

2055-
// Copy constructor needs to be explicit or the linker complains.
2055+
// This is explicitly not a copy constructor.
20562056
explicit PrefCallback(const PrefCallback*& aCopy)
20572057
: mDomain(aCopy->mDomain)
20582058
, mBranch(aCopy->mBranch)
@@ -2063,6 +2063,9 @@ class PrefCallback : public PLDHashEntryHdr
20632063
MOZ_COUNT_CTOR(PrefCallback);
20642064
}
20652065

2066+
PrefCallback(const PrefCallback&) = delete;
2067+
PrefCallback(PrefCallback&&) = default;
2068+
20662069
~PrefCallback() { MOZ_COUNT_DTOR(PrefCallback); }
20672070

20682071
bool KeyEquals(const PrefCallback* aKey) const

netwerk/base/nsURIHashKey.h

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#include "nsCOMPtr.h"
1010
#include "nsIURI.h"
1111
#include "nsHashKeys.h"
12+
#include "mozilla/Move.h"
1213
#include "mozilla/Unused.h"
1314

1415
/**
@@ -22,8 +23,12 @@ class nsURIHashKey : public PLDHashEntryHdr
2223

2324
explicit nsURIHashKey(const nsIURI* aKey) :
2425
mKey(const_cast<nsIURI*>(aKey)) { MOZ_COUNT_CTOR(nsURIHashKey); }
25-
nsURIHashKey(const nsURIHashKey& toCopy) :
26-
mKey(toCopy.mKey) { MOZ_COUNT_CTOR(nsURIHashKey); }
26+
nsURIHashKey(nsURIHashKey&& toMove)
27+
: PLDHashEntryHdr(std::move(toMove))
28+
, mKey(std::move(toMove.mKey))
29+
{
30+
MOZ_COUNT_CTOR(nsURIHashKey);
31+
}
2732
~nsURIHashKey() { MOZ_COUNT_DTOR(nsURIHashKey); }
2833

2934
nsIURI* GetKey() const { return mKey; }

netwerk/cache/nsCacheEntry.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -502,8 +502,8 @@ nsCacheEntryHashTable::MoveEntry(PLDHashTable * /* table */,
502502
const PLDHashEntryHdr *from,
503503
PLDHashEntryHdr *to)
504504
{
505-
((nsCacheEntryHashTableEntry *)to)->cacheEntry =
506-
((nsCacheEntryHashTableEntry *)from)->cacheEntry;
505+
new (KnownNotNull, to) nsCacheEntryHashTableEntry(std::move(*((nsCacheEntryHashTableEntry *)from)));
506+
// No need to destroy `from`.
507507
}
508508
509509

netwerk/cache/nsDiskCacheBinding.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ MoveEntry(PLDHashTable * /* table */,
4343
const PLDHashEntryHdr * src,
4444
PLDHashEntryHdr * dst)
4545
{
46-
((HashTableEntry *)dst)->mBinding = ((HashTableEntry *)src)->mBinding;
46+
new (KnownNotNull, dst) HashTableEntry(std::move(*(HashTableEntry*)src));
47+
// No need to delete `src`.
4748
}
4849

4950

netwerk/cookie/nsCookieKey.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,8 @@ class nsCookieKey : public PLDHashEntryHdr
2828
, mOriginAttributes(other->mOriginAttributes)
2929
{}
3030

31-
nsCookieKey(KeyType other)
32-
: mBaseDomain(other.mBaseDomain)
33-
, mOriginAttributes(other.mOriginAttributes)
34-
{}
31+
nsCookieKey(nsCookieKey&& other) = default;
32+
nsCookieKey& operator=(nsCookieKey&&) = default;
3533

3634
bool KeyEquals(KeyTypePointer other) const
3735
{

netwerk/cookie/nsCookieService.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2958,7 +2958,7 @@ nsCookieService::Read()
29582958

29592959
nsCookieKey key(baseDomain, attrs);
29602960
CookieDomainTuple* tuple = mReadArray.AppendElement();
2961-
tuple->key = key;
2961+
tuple->key = std::move(key);
29622962
tuple->cookie = GetCookieFromRow(stmt, attrs);
29632963
}
29642964

parser/html/nsHtml5AtomTable.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ nsHtml5AtomEntry::nsHtml5AtomEntry(KeyTypePointer aStr)
1111
{
1212
}
1313

14-
nsHtml5AtomEntry::nsHtml5AtomEntry(const nsHtml5AtomEntry& aOther)
15-
: nsStringHashKey(aOther)
14+
nsHtml5AtomEntry::nsHtml5AtomEntry(nsHtml5AtomEntry&& aOther)
15+
: nsStringHashKey(std::move(aOther))
1616
, mAtom(nullptr)
1717
{
1818
MOZ_ASSERT_UNREACHABLE("nsHtml5AtomTable is broken; tried to copy an entry");

parser/html/nsHtml5AtomTable.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class nsHtml5AtomEntry : public nsStringHashKey
1616
{
1717
public:
1818
explicit nsHtml5AtomEntry(KeyTypePointer aStr);
19-
nsHtml5AtomEntry(const nsHtml5AtomEntry& aOther);
19+
nsHtml5AtomEntry(nsHtml5AtomEntry&& aOther);
2020
~nsHtml5AtomEntry();
2121
inline nsAtom* GetAtom() { return mAtom; }
2222

security/manager/ssl/nsCertOverrideService.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,8 @@ class nsCertOverrideEntry final : public PLDHashEntryHdr
8181
}
8282

8383
nsCertOverrideEntry(nsCertOverrideEntry&& toMove)
84-
: mSettings(std::move(toMove.mSettings))
84+
: PLDHashEntryHdr(std::move(toMove))
85+
, mSettings(std::move(toMove.mSettings))
8586
, mHostWithPort(std::move(toMove.mHostWithPort))
8687
{
8788
}

security/manager/ssl/nsClientAuthRemember.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ class nsClientAuthRememberEntry final : public PLDHashEntryHdr
6565
}
6666

6767
nsClientAuthRememberEntry(nsClientAuthRememberEntry&& aToMove)
68-
: mSettings(std::move(aToMove.mSettings))
68+
: PLDHashEntryHdr(std::move(aToMove))
69+
, mSettings(std::move(aToMove.mSettings))
6970
, mEntryKey(std::move(aToMove.mEntryKey))
7071
{
7172
}

toolkit/components/places/History.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
#include "mozilla/IHistory.h"
1111
#include "mozilla/MemoryReporting.h"
12+
#include "mozilla/Move.h"
1213
#include "mozilla/Mutex.h"
1314
#include "mozIAsyncHistory.h"
1415
#include "Database.h"
@@ -209,8 +210,10 @@ class History final : public IHistory
209210
: nsURIHashKey(aURI)
210211
{
211212
}
212-
KeyClass(const KeyClass& aOther)
213-
: nsURIHashKey(aOther)
213+
KeyClass(KeyClass&& aOther)
214+
: nsURIHashKey(std::move(aOther))
215+
, array(std::move(aOther.array))
216+
, mVisited(std::move(aOther.mVisited))
214217
{
215218
MOZ_ASSERT_UNREACHABLE("Do not call me!");
216219
}
@@ -234,7 +237,7 @@ class History final : public IHistory
234237
explicit RecentURIKey(const nsIURI* aURI) : nsURIHashKey(aURI)
235238
{
236239
}
237-
RecentURIKey(const RecentURIKey& aOther) : nsURIHashKey(aOther)
240+
RecentURIKey(RecentURIKey&& aOther) : nsURIHashKey(std::move(aOther))
238241
{
239242
MOZ_ASSERT_UNREACHABLE("Do not call me!");
240243
}

toolkit/components/places/nsFaviconService.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#include "imgITools.h"
2222
#include "mozilla/storage.h"
2323
#include "mozilla/Attributes.h"
24+
#include "mozilla/Move.h"
2425

2526
#include "FaviconHelpers.h"
2627

@@ -37,11 +38,13 @@ class UnassociatedIconHashKey : public nsURIHashKey
3738
{
3839
public:
3940
explicit UnassociatedIconHashKey(const nsIURI* aURI)
40-
: nsURIHashKey(aURI)
41+
: nsURIHashKey(aURI)
4142
{
4243
}
43-
UnassociatedIconHashKey(const UnassociatedIconHashKey& aOther)
44-
: nsURIHashKey(aOther)
44+
UnassociatedIconHashKey(UnassociatedIconHashKey&& aOther)
45+
: nsURIHashKey(std::move(aOther))
46+
, iconData(std::move(aOther.iconData))
47+
, created(std::move(aOther.created))
4548
{
4649
MOZ_ASSERT_UNREACHABLE("Do not call me!");
4750
}

toolkit/components/places/nsNavHistory.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -532,8 +532,8 @@ class nsNavHistory final : public nsSupportsWeakReference
532532
: nsURIHashKey(aURI)
533533
{
534534
}
535-
VisitHashKey(const VisitHashKey& aOther)
536-
: nsURIHashKey(aOther)
535+
VisitHashKey(VisitHashKey&& aOther)
536+
: nsURIHashKey(std::move(aOther))
537537
{
538538
MOZ_ASSERT_UNREACHABLE("Do not call me!");
539539
}

0 commit comments

Comments
 (0)