Bug 1866402 - Rename nsCStringHashKeyDM to nsCStringHashKeyWithDisabledMemmove; r=dom-storage-reviewers,jari
Differential Revision: https://phabricator.services.mozilla.com/D223302
This commit is contained in:
@@ -56,7 +56,8 @@ namespace {
|
||||
// The assertion type must be the same as the assertion type used for defining
|
||||
// the base class for FileSystemDataManager in FileSystemDataManager.h!
|
||||
using FileSystemDataManagerHashKey =
|
||||
std::conditional<ReleaseAssertEnabled::value, quota::nsCStringHashKeyDM,
|
||||
std::conditional<ReleaseAssertEnabled::value,
|
||||
quota::nsCStringHashKeyWithDisabledMemmove,
|
||||
nsCStringHashKey>::type;
|
||||
|
||||
// Raw (but checked when the diagnostic assert is enabled) references as we
|
||||
|
||||
@@ -2757,9 +2757,9 @@ StaticAutoPtr<PrepareDatastoreOpArray> gPrepareDatastoreOps;
|
||||
// When CheckedUnsafePtr's checking is enabled, it's necessary to ensure that
|
||||
// the hashtable uses the copy constructor instead of memmove for moving entries
|
||||
// since memmove will break CheckedUnsafePtr in a memory-corrupting way.
|
||||
using DatastoreHashKey =
|
||||
std::conditional<DiagnosticAssertEnabled::value, nsCStringHashKeyDM,
|
||||
nsCStringHashKey>::type;
|
||||
using DatastoreHashKey = std::conditional<DiagnosticAssertEnabled::value,
|
||||
nsCStringHashKeyWithDisabledMemmove,
|
||||
nsCStringHashKey>::type;
|
||||
|
||||
using DatastoreHashtable =
|
||||
nsBaseHashtable<DatastoreHashKey, NotNull<CheckedUnsafePtr<Datastore>>,
|
||||
|
||||
@@ -12,9 +12,10 @@
|
||||
namespace mozilla::dom::quota {
|
||||
|
||||
// nsCStringHashKey with disabled memmove
|
||||
class nsCStringHashKeyDM : public nsCStringHashKey {
|
||||
class nsCStringHashKeyWithDisabledMemmove : public nsCStringHashKey {
|
||||
public:
|
||||
explicit nsCStringHashKeyDM(const nsCStringHashKey::KeyTypePointer aKey)
|
||||
explicit nsCStringHashKeyWithDisabledMemmove(
|
||||
const nsCStringHashKey::KeyTypePointer aKey)
|
||||
: nsCStringHashKey(aKey) {}
|
||||
enum { ALLOW_MEMMOVE = false };
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user