Bug 1170416 (part 3) - Remove the PLDHashTable2 typedef. r=froydnj.

This commit is contained in:
Nicholas Nethercote 2015-05-19 16:46:17 -07:00
parent c61daa7222
commit 662f90fecb
43 changed files with 121 additions and 124 deletions

View File

@ -153,7 +153,7 @@ nsSimpleContentList::WrapObject(JSContext *cx, JS::Handle<JSObject*> aGivenProto
}
// Hashtable for storing nsContentLists
static PLDHashTable2* gContentListHashTable;
static PLDHashTable* gContentListHashTable;
#define RECENTLY_USED_CONTENT_LIST_CACHE_SIZE 31
static nsContentList*
@ -217,7 +217,7 @@ NS_GetContentList(nsINode* aRootNode,
// Initialize the hashtable if needed.
if (!gContentListHashTable) {
gContentListHashTable =
new PLDHashTable2(&hash_table_ops, sizeof(ContentListHashEntry));
new PLDHashTable(&hash_table_ops, sizeof(ContentListHashEntry));
}
ContentListHashEntry *entry = nullptr;
@ -270,7 +270,7 @@ nsCacheableFuncStringHTMLCollection::WrapObject(JSContext *cx, JS::Handle<JSObje
}
// Hashtable for storing nsCacheableFuncStringContentList
static PLDHashTable2* gFuncStringContentListHashTable;
static PLDHashTable* gFuncStringContentListHashTable;
struct FuncStringContentListHashEntry : public PLDHashEntryHdr
{
@ -321,7 +321,7 @@ GetFuncStringContentList(nsINode* aRootNode,
// Initialize the hashtable if needed.
if (!gFuncStringContentListHashTable) {
gFuncStringContentListHashTable =
new PLDHashTable2(&hash_table_ops, sizeof(FuncStringContentListHashEntry));
new PLDHashTable(&hash_table_ops, sizeof(FuncStringContentListHashEntry));
}
FuncStringContentListHashEntry *entry = nullptr;

View File

@ -336,7 +336,7 @@ namespace {
static NS_DEFINE_CID(kParserServiceCID, NS_PARSERSERVICE_CID);
static NS_DEFINE_CID(kCParserCID, NS_PARSER_CID);
static PLDHashTable2* sEventListenerManagersHash;
static PLDHashTable* sEventListenerManagersHash;
class DOMEventListenerManagersHashReporter final : public nsIMemoryReporter
{
@ -498,7 +498,7 @@ nsContentUtils::Init()
};
sEventListenerManagersHash =
new PLDHashTable2(&hash_table_ops, sizeof(EventListenerManagerMapEntry));
new PLDHashTable(&hash_table_ops, sizeof(EventListenerManagerMapEntry));
RegisterStrongMemoryReporter(new DOMEventListenerManagersHashReporter());
}

View File

@ -3986,7 +3986,7 @@ nsDocument::SetSubDocumentFor(Element* aElement, nsIDocument* aSubDoc)
SubDocInitEntry
};
mSubDocuments = new PLDHashTable2(&hash_table_ops, sizeof(SubDocMapEntry));
mSubDocuments = new PLDHashTable(&hash_table_ops, sizeof(SubDocMapEntry));
}
// Add a mapping to the hash table

View File

@ -1520,7 +1520,7 @@ protected:
nsTArray<nsIObserver*> mCharSetObservers;
PLDHashTable2 *mSubDocuments;
PLDHashTable *mSubDocuments;
// Array of owning references to all children
nsAttrAndChildArray mChildren;

View File

@ -57,7 +57,7 @@ public:
size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf);
nsCOMPtr<nsIAtom> mName; // property name
PLDHashTable2 mObjectValueMap; // map of object/value pairs
PLDHashTable mObjectValueMap; // map of object/value pairs
NSPropertyDtorFunc mDtorFunc; // property specific value dtor function
void* mDtorData; // pointer to pass to dtor
bool mTransfer; // whether to transfer in

View File

@ -234,8 +234,8 @@ private:
nsGlobalNameStruct* LookupNameInternal(const nsAString& aName,
const char16_t **aClassName = nullptr);
PLDHashTable2 mGlobalNames;
PLDHashTable2 mNavigatorNames;
PLDHashTable mGlobalNames;
PLDHashTable mNavigatorNames;
};
#endif /* nsScriptNameSpaceManager_h__ */

View File

@ -83,7 +83,7 @@ static JSObjWrapperTable sJSObjWrappers;
static bool sJSObjWrappersAccessible = false;
// Hash of NPObject wrappers that wrap NPObjects as JSObjects.
static PLDHashTable2* sNPObjWrappers;
static PLDHashTable* sNPObjWrappers;
// Global wrapper count. This includes JSObject wrappers *and*
// NPObject wrappers. When this count goes to zero, there are no more
@ -408,7 +408,7 @@ CreateNPObjWrapperTable()
}
sNPObjWrappers =
new PLDHashTable2(PL_DHashGetStubOps(), sizeof(NPObjWrapperHashEntry));
new PLDHashTable(PL_DHashGetStubOps(), sizeof(NPObjWrapperHashEntry));
return true;
}
@ -1970,7 +1970,7 @@ NPObjWrapperPluginDestroyedCallback(PLDHashTable *table, PLDHashEntryHdr *hdr,
if (entry->mNpp == nppcx->npp) {
// HACK: temporarily hide the hash we're enumerating so that invalidate()
// and deallocate() don't touch it.
PLDHashTable2 *tmp = static_cast<PLDHashTable2*>(table);
PLDHashTable *tmp = static_cast<PLDHashTable*>(table);
sNPObjWrappers = nullptr;
NPObject *npobj = entry->mNPObj;

View File

@ -765,7 +765,7 @@ XULDocument::AddBroadcastListenerFor(Element& aBroadcaster, Element& aListener,
};
if (! mBroadcasterMap) {
mBroadcasterMap = new PLDHashTable2(&gOps, sizeof(BroadcasterMapEntry));
mBroadcasterMap = new PLDHashTable(&gOps, sizeof(BroadcasterMapEntry));
}
BroadcasterMapEntry* entry =

View File

@ -719,7 +719,7 @@ protected:
/**
* A map from a broadcaster element to a list of listener elements.
*/
PLDHashTable2* mBroadcasterMap;
PLDHashTable* mBroadcasterMap;
nsAutoPtr<nsInterfaceHashtable<nsURIHashKey,nsIObserver> > mOverlayLoadObservers;
nsAutoPtr<nsInterfaceHashtable<nsURIHashKey,nsIObserver> > mPendingOverlayLoadNotifications;

View File

@ -52,7 +52,7 @@ public:
void Clear() { mMap.Clear(); }
protected:
PLDHashTable2 mMap;
PLDHashTable mMap;
struct Entry : public PLDHashEntryHdr {
nsIContent* mContent;

View File

@ -16,7 +16,7 @@ protected:
nsIContent* mTemplate;
};
PLDHashTable2 mTable;
PLDHashTable mTable;
public:
nsTemplateMap() : mTable(PL_DHashGetStubOps(), sizeof(Entry)) { }

View File

@ -124,7 +124,7 @@ protected:
static void HashClearEntry(PLDHashTable* aTable, PLDHashEntryHdr* aEntry);
PLDHashTable2 mValuesHash;
PLDHashTable mValuesHash;
static const PLDHashTableOps sHashOps;
};

View File

@ -749,7 +749,7 @@ public:
private:
mozilla::scache::StartupCache* mCache;
PLDHashTable2 mMap;
PLDHashTable mMap;
bool mWriteNeeded;
PLDHashTableOps mOps;

View File

@ -174,7 +174,7 @@ Native2WrappedNativeMap::newMap(int length)
Native2WrappedNativeMap::Native2WrappedNativeMap(int length)
{
mTable = new PLDHashTable2(PL_DHashGetStubOps(), sizeof(Entry), length);
mTable = new PLDHashTable(PL_DHashGetStubOps(), sizeof(Entry), length);
}
Native2WrappedNativeMap::~Native2WrappedNativeMap()
@ -222,7 +222,7 @@ IID2WrappedJSClassMap::newMap(int length)
IID2WrappedJSClassMap::IID2WrappedJSClassMap(int length)
{
mTable = new PLDHashTable2(&Entry::sOps, sizeof(Entry), length);
mTable = new PLDHashTable(&Entry::sOps, sizeof(Entry), length);
}
IID2WrappedJSClassMap::~IID2WrappedJSClassMap()
@ -255,7 +255,7 @@ IID2NativeInterfaceMap::newMap(int length)
IID2NativeInterfaceMap::IID2NativeInterfaceMap(int length)
{
mTable = new PLDHashTable2(&Entry::sOps, sizeof(Entry), length);
mTable = new PLDHashTable(&Entry::sOps, sizeof(Entry), length);
}
IID2NativeInterfaceMap::~IID2NativeInterfaceMap()
@ -296,7 +296,7 @@ ClassInfo2NativeSetMap::newMap(int length)
ClassInfo2NativeSetMap::ClassInfo2NativeSetMap(int length)
{
mTable = new PLDHashTable2(PL_DHashGetStubOps(), sizeof(Entry), length);
mTable = new PLDHashTable(PL_DHashGetStubOps(), sizeof(Entry), length);
}
ClassInfo2NativeSetMap::~ClassInfo2NativeSetMap()
@ -326,7 +326,7 @@ ClassInfo2WrappedNativeProtoMap::newMap(int length)
ClassInfo2WrappedNativeProtoMap::ClassInfo2WrappedNativeProtoMap(int length)
{
mTable = new PLDHashTable2(PL_DHashGetStubOps(), sizeof(Entry), length);
mTable = new PLDHashTable(PL_DHashGetStubOps(), sizeof(Entry), length);
}
ClassInfo2WrappedNativeProtoMap::~ClassInfo2WrappedNativeProtoMap()
@ -446,7 +446,7 @@ NativeSetMap::newMap(int length)
NativeSetMap::NativeSetMap(int length)
{
mTable = new PLDHashTable2(&Entry::sOps, sizeof(Entry), length);
mTable = new PLDHashTable(&Entry::sOps, sizeof(Entry), length);
}
NativeSetMap::~NativeSetMap()
@ -509,7 +509,7 @@ IID2ThisTranslatorMap::newMap(int length)
IID2ThisTranslatorMap::IID2ThisTranslatorMap(int length)
{
mTable = new PLDHashTable2(&Entry::sOps, sizeof(Entry), length);
mTable = new PLDHashTable(&Entry::sOps, sizeof(Entry), length);
}
IID2ThisTranslatorMap::~IID2ThisTranslatorMap()
@ -585,7 +585,7 @@ XPCNativeScriptableSharedMap::newMap(int length)
XPCNativeScriptableSharedMap::XPCNativeScriptableSharedMap(int length)
{
mTable = new PLDHashTable2(&Entry::sOps, sizeof(Entry), length);
mTable = new PLDHashTable(&Entry::sOps, sizeof(Entry), length);
}
XPCNativeScriptableSharedMap::~XPCNativeScriptableSharedMap()
@ -636,8 +636,8 @@ XPCWrappedNativeProtoMap::newMap(int length)
XPCWrappedNativeProtoMap::XPCWrappedNativeProtoMap(int length)
{
mTable = new PLDHashTable2(PL_DHashGetStubOps(),
sizeof(PLDHashEntryStub), length);
mTable = new PLDHashTable(PL_DHashGetStubOps(),
sizeof(PLDHashEntryStub), length);
}
XPCWrappedNativeProtoMap::~XPCWrappedNativeProtoMap()

View File

@ -158,7 +158,7 @@ private:
static size_t SizeOfEntryExcludingThis(PLDHashEntryHdr* hdr, mozilla::MallocSizeOf mallocSizeOf, void*);
private:
PLDHashTable2* mTable;
PLDHashTable* mTable;
};
/*************************/
@ -212,7 +212,7 @@ private:
IID2WrappedJSClassMap(); // no implementation
explicit IID2WrappedJSClassMap(int size);
private:
PLDHashTable2* mTable;
PLDHashTable* mTable;
};
/*************************/
@ -271,7 +271,7 @@ private:
static size_t SizeOfEntryExcludingThis(PLDHashEntryHdr* hdr, mozilla::MallocSizeOf mallocSizeOf, void*);
private:
PLDHashTable2* mTable;
PLDHashTable* mTable;
};
/*************************/
@ -328,7 +328,7 @@ private:
ClassInfo2NativeSetMap(); // no implementation
explicit ClassInfo2NativeSetMap(int size);
private:
PLDHashTable2* mTable;
PLDHashTable* mTable;
};
/*************************/
@ -384,7 +384,7 @@ private:
static size_t SizeOfEntryExcludingThis(PLDHashEntryHdr* hdr, mozilla::MallocSizeOf mallocSizeOf, void*);
private:
PLDHashTable2* mTable;
PLDHashTable* mTable;
};
/*************************/
@ -454,7 +454,7 @@ private:
static size_t SizeOfEntryExcludingThis(PLDHashEntryHdr* hdr, mozilla::MallocSizeOf mallocSizeOf, void*);
private:
PLDHashTable2* mTable;
PLDHashTable* mTable;
};
/***************************************************************************/
@ -512,7 +512,7 @@ private:
IID2ThisTranslatorMap(); // no implementation
explicit IID2ThisTranslatorMap(int size);
private:
PLDHashTable2* mTable;
PLDHashTable* mTable;
};
/***************************************************************************/
@ -548,7 +548,7 @@ private:
XPCNativeScriptableSharedMap(); // no implementation
explicit XPCNativeScriptableSharedMap(int size);
private:
PLDHashTable2* mTable;
PLDHashTable* mTable;
};
/***************************************************************************/
@ -586,7 +586,7 @@ private:
XPCWrappedNativeProtoMap(); // no implementation
explicit XPCWrappedNativeProtoMap(int size);
private:
PLDHashTable2* mTable;
PLDHashTable* mTable;
};
/***************************************************************************/

View File

@ -166,7 +166,7 @@ nsFrameManager::GetPlaceholderFrameFor(const nsIFrame* aFrame)
if (mPlaceholderMap.IsInitialized()) {
PlaceholderMapEntry *entry = static_cast<PlaceholderMapEntry*>
(PL_DHashTableSearch(const_cast<PLDHashTable2*>(&mPlaceholderMap),
(PL_DHashTableSearch(const_cast<PLDHashTable*>(&mPlaceholderMap),
aFrame));
if (entry) {
return entry->placeholderFrame;

View File

@ -56,7 +56,7 @@ protected:
// the pres shell owns the style set
nsStyleSet* mStyleSet;
nsIFrame* mRootFrame;
PLDHashTable2 mPlaceholderMap;
PLDHashTable mPlaceholderMap;
UndisplayedMap* mUndisplayedMap;
UndisplayedMap* mDisplayContentsMap;
bool mIsDestroyingFrames; // The frame manager is destroying some frame(s).

View File

@ -450,10 +450,10 @@ protected:
int32_t mRuleCount;
PLDHashTable2 mIdTable;
PLDHashTable2 mClassTable;
PLDHashTable2 mTagTable;
PLDHashTable2 mNameSpaceTable;
PLDHashTable mIdTable;
PLDHashTable mClassTable;
PLDHashTable mTagTable;
PLDHashTable mNameSpaceTable;
RuleValueList mUniversalRules;
struct EnumData {
@ -892,14 +892,14 @@ struct RuleCascadeData {
mPseudoElementRuleHashes[nsCSSPseudoElements::ePseudo_PseudoElementCount];
nsTArray<nsCSSRuleProcessor::StateSelector> mStateSelectors;
EventStates mSelectorDocumentStates;
PLDHashTable2 mClassSelectors;
PLDHashTable2 mIdSelectors;
PLDHashTable mClassSelectors;
PLDHashTable mIdSelectors;
nsTArray<nsCSSSelector*> mPossiblyNegatedClassSelectors;
nsTArray<nsCSSSelector*> mPossiblyNegatedIDSelectors;
PLDHashTable2 mAttributeSelectors;
PLDHashTable2 mAnonBoxRules;
PLDHashTable mAttributeSelectors;
PLDHashTable mAnonBoxRules;
#ifdef MOZ_XUL
PLDHashTable2 mXULTreeRules;
PLDHashTable mXULTreeRules;
#endif
nsTArray<nsFontFaceRuleContainer> mFontFaceRules;
@ -3321,7 +3321,7 @@ struct CascadeEnumData {
PLArenaPool mArena;
// Hooray, a manual PLDHashTable since nsClassHashtable doesn't
// provide a getter that gives me a *reference* to the value.
PLDHashTable2 mRulesByWeight; // of PerWeightDataListItem linked lists
PLDHashTable mRulesByWeight; // of PerWeightDataListItem linked lists
uint8_t mSheetType;
};

View File

@ -159,8 +159,8 @@ private:
nsRefPtr<TableQuirkColorRule> mTableQuirkColorRule;
nsRefPtr<TableTHRule> mTableTHRule;
PLDHashTable2 mMappedAttrTable;
PLDHashTable2 mLangRuleTable;
PLDHashTable mMappedAttrTable;
PLDHashTable mLangRuleTable;
};
#endif /* !defined(nsHTMLStyleSheet_h_) */

View File

@ -1427,7 +1427,7 @@ nsRuleNode::DestroyInternal(nsRuleNode ***aDestroyQueueTail)
}
if (ChildrenAreHashed()) {
PLDHashTable2 *children = ChildrenHash();
PLDHashTable *children = ChildrenHash();
PL_DHashTableEnumerate(children, EnqueueRuleNodeChildren,
&destroyQueueTail);
*destroyQueueTail = nullptr; // ensure null-termination
@ -1614,9 +1614,9 @@ nsRuleNode::ConvertChildrenToHash(int32_t aNumKids)
{
NS_ASSERTION(!ChildrenAreHashed() && HaveChildren(),
"must have a non-empty list of children");
PLDHashTable2 *hash = new PLDHashTable2(&ChildrenHashOps,
sizeof(ChildrenHashEntry),
aNumKids);
PLDHashTable *hash = new PLDHashTable(&ChildrenHashOps,
sizeof(ChildrenHashEntry),
aNumKids);
for (nsRuleNode* curr = ChildrenList(); curr; curr = curr->mNextSibling) {
// This will never fail because of the initial size we gave the table.
ChildrenHashEntry *entry = static_cast<ChildrenHashEntry*>(
@ -9374,7 +9374,7 @@ nsRuleNode::SweepChildren(nsTArray<nsRuleNode*>& aSweepQueue)
uint32_t childrenDestroyed = 0;
nsRuleNode* survivorsWithChildren = nullptr;
if (ChildrenAreHashed()) {
PLDHashTable2* children = ChildrenHash();
PLDHashTable* children = ChildrenHash();
uint32_t oldChildCount = children->EntryCount();
PL_DHashTableEnumerate(children, SweepHashEntry, &survivorsWithChildren);
childrenDestroyed = oldChildCount - children->EntryCount();

View File

@ -317,7 +317,7 @@ private:
union {
void* asVoid;
nsRuleNode* asList;
PLDHashTable2* asHash;
PLDHashTable* asHash;
} mChildren; // Accessed only through the methods below.
enum {
@ -343,18 +343,18 @@ private:
nsRuleNode** ChildrenListPtr() {
return &mChildren.asList;
}
PLDHashTable2* ChildrenHash() {
return (PLDHashTable2*) (intptr_t(mChildren.asHash) & ~intptr_t(kTypeMask));
PLDHashTable* ChildrenHash() {
return (PLDHashTable*) (intptr_t(mChildren.asHash) & ~intptr_t(kTypeMask));
}
void SetChildrenList(nsRuleNode *aList) {
NS_ASSERTION(!(intptr_t(aList) & kTypeMask),
"pointer not 2-byte aligned");
mChildren.asList = aList;
}
void SetChildrenHash(PLDHashTable2 *aHashtable) {
void SetChildrenHash(PLDHashTable *aHashtable) {
NS_ASSERTION(!(intptr_t(aHashtable) & kTypeMask),
"pointer not 2-byte aligned");
mChildren.asHash = (PLDHashTable2*)(intptr_t(aHashtable) | kHashType);
mChildren.asHash = (PLDHashTable*)(intptr_t(aHashtable) | kHashType);
}
void ConvertChildrenToHash(int32_t aNumKids);

View File

@ -62,7 +62,7 @@ private:
return SpanToIndex(aSpan) < ARRAY_SIZE;
}
PLDHashTable2 mHashTable;
PLDHashTable mHashTable;
struct HashTableEntry : public PLDHashEntryHdr {
int32_t mColSpan;
Item *mItems;

View File

@ -68,7 +68,7 @@ matchPrefEntry(PLDHashTable*, const PLDHashEntryHdr* entry,
return (strcmp(prefEntry->key, otherKey) == 0);
}
PLDHashTable2* gHashTable;
PLDHashTable* gHashTable;
static PLArenaPool gPrefNameArena;
bool gDirty = false;
@ -150,9 +150,9 @@ static nsresult pref_HashPref(const char *key, PrefValue value, PrefType type, u
nsresult PREF_Init()
{
if (!gHashTable) {
gHashTable = new PLDHashTable2(&pref_HashTableOps,
sizeof(PrefHashEntry),
PREF_HASHTABLE_INITIAL_LENGTH);
gHashTable = new PLDHashTable(&pref_HashTableOps,
sizeof(PrefHashEntry),
PREF_HASHTABLE_INITIAL_LENGTH);
PL_INIT_ARENA_POOL(&gPrefNameArena, "PrefNameArena",
PREFNAME_ARENA_SIZE);

View File

@ -10,7 +10,7 @@
#include "mozilla/MemoryReporting.h"
extern PLDHashTable2* gHashTable;
extern PLDHashTable* gHashTable;
extern bool gDirty;
namespace mozilla {

View File

@ -70,7 +70,7 @@ protected:
nsCOMPtr<nsILoadGroupConnectionInfo> mConnectionInfo;
nsCOMPtr<nsIRequest> mDefaultLoadRequest;
PLDHashTable2 mRequests;
PLDHashTable mRequests;
nsWeakPtr mObserver;
nsWeakPtr mParentLoadGroup;

View File

@ -305,7 +305,7 @@ private:
// member variables
static const PLDHashTableOps ops;
PLDHashTable2 table;
PLDHashTable table;
bool initialized;
static const uint32_t kInitialTableLength = 256;

View File

@ -114,7 +114,7 @@ private:
// member variables
static const PLDHashTableOps ops;
PLDHashTable2 table;
PLDHashTable table;
bool initialized;
static const uint32_t kInitialTableLength = 0;

View File

@ -345,7 +345,7 @@ private:
uint32_t mNumIdleThreads;
uint32_t mThreadCount;
uint32_t mActiveAnyThreadCount;
PLDHashTable2 mDB;
PLDHashTable mDB;
PRCList mHighQ;
PRCList mMediumQ;
PRCList mLowQ;

View File

@ -40,7 +40,7 @@ struct HttpHeapAtom {
char value[1];
};
static PLDHashTable2 *sAtomTable;
static PLDHashTable *sAtomTable;
static struct HttpHeapAtom *sHeapAtoms = nullptr;
static Mutex *sLock = nullptr;
@ -103,8 +103,8 @@ nsHttp::CreateAtomTable()
// The initial length for this table is a value greater than the number of
// known atoms (NUM_HTTP_ATOMS) because we expect to encounter a few random
// headers right off the bat.
sAtomTable = new PLDHashTable2(&ops, sizeof(PLDHashEntryStub),
NUM_HTTP_ATOMS + 10);
sAtomTable = new PLDHashTable(&ops, sizeof(PLDHashEntryStub),
NUM_HTTP_ATOMS + 10);
// fill the table with our known atoms
const char *const atoms[] = {

View File

@ -65,8 +65,8 @@ static const PLDHashTableOps UnicodeToEntityOps = {
nullptr,
};
static PLDHashTable2* gEntityToUnicode;
static PLDHashTable2* gUnicodeToEntity;
static PLDHashTable* gEntityToUnicode;
static PLDHashTable* gUnicodeToEntity;
static nsrefcnt gTableRefCnt = 0;
#define HTML_ENTITY(_name, _value) { #_name, _value },
@ -81,12 +81,12 @@ nsresult
nsHTMLEntities::AddRefTable(void)
{
if (!gTableRefCnt) {
gEntityToUnicode = new PLDHashTable2(&EntityToUnicodeOps,
sizeof(EntityNodeEntry),
NS_HTML_ENTITY_COUNT);
gUnicodeToEntity = new PLDHashTable2(&UnicodeToEntityOps,
sizeof(EntityNodeEntry),
NS_HTML_ENTITY_COUNT);
gEntityToUnicode = new PLDHashTable(&EntityToUnicodeOps,
sizeof(EntityNodeEntry),
NS_HTML_ENTITY_COUNT);
gUnicodeToEntity = new PLDHashTable(&UnicodeToEntityOps,
sizeof(EntityNodeEntry),
NS_HTML_ENTITY_COUNT);
for (const EntityNode *node = gEntityArray,
*node_end = ArrayEnd(gEntityArray);
node < node_end; ++node) {

View File

@ -125,7 +125,7 @@ public:
{
struct hash
{
PLDHashTable2* mPropertyHash;
PLDHashTable* mPropertyHash;
} hash;
struct as
{
@ -163,7 +163,7 @@ Assertion::Assertion(nsIRDFResource* aSource)
NS_ADDREF(mSource);
u.hash.mPropertyHash =
new PLDHashTable2(PL_DHashGetStubOps(), sizeof(Entry));
new PLDHashTable(PL_DHashGetStubOps(), sizeof(Entry));
}
Assertion::Assertion(nsIRDFResource* aSource,
@ -250,8 +250,8 @@ protected:
// nsIRDFResource object per unique URI). The value of an entry is
// an Assertion struct, which is a linked list of (subject
// predicate object) triples.
PLDHashTable2 mForwardArcs;
PLDHashTable2 mReverseArcs;
PLDHashTable mForwardArcs;
PLDHashTable mReverseArcs;
nsCOMArray<nsIRDFObserver> mObservers;
uint32_t mNumObservers;

View File

@ -38,11 +38,11 @@ class RDFServiceImpl final : public nsIRDFService,
{
protected:
PLHashTable* mNamedDataSources;
PLDHashTable2 mResources;
PLDHashTable2 mLiterals;
PLDHashTable2 mInts;
PLDHashTable2 mDates;
PLDHashTable2 mBlobs;
PLDHashTable mResources;
PLDHashTable mLiterals;
PLDHashTable mInts;
PLDHashTable mDates;
PLDHashTable mBlobs;
nsAutoCString mLastURIPrefix;
nsCOMPtr<nsIFactory> mLastFactory;

View File

@ -124,7 +124,7 @@ private:
treeArrayEl *mTreeArray;
int32_t mNumOrgs;
int32_t mNumRows;
PLDHashTable2 mCompareCache;
PLDHashTable mCompareCache;
nsCOMPtr<nsINSSComponent> mNSSComponent;
nsCOMPtr<nsICertOverrideService> mOverrideService;
mozilla::RefPtr<nsCertOverrideService> mOriginalOverrideService;

View File

@ -158,8 +158,8 @@ protected:
mozilla::Mutex mListLock;
static nsNSSShutDownList *singleton;
uint32_t mActiveSSLSockets;
PLDHashTable2 mObjects;
PLDHashTable2 mPK11LogoutCancelObjects;
PLDHashTable mObjects;
PLDHashTable mPK11LogoutCancelObjects;
nsNSSActivityState mActivityState;
};

View File

@ -100,7 +100,7 @@ protected:
nsCOMPtr<nsISSLStatus> mSSLStatus;
nsCOMPtr<nsISupports> mCurrentToplevelSecurityInfo;
PLDHashTable2 mTransferringRequests;
PLDHashTable mTransferringRequests;
};

View File

@ -276,7 +276,7 @@ protected:
int64_t mCurrentTotalProgress;
int64_t mMaxTotalProgress;
PLDHashTable2 mRequestInfoHash;
PLDHashTable mRequestInfoHash;
int64_t mCompletedTotalProgress;
mozilla::LinkedList<nsStatusInfo> mStatusInfoList;

View File

@ -829,7 +829,7 @@ struct CCGraph
uint32_t mRootCount;
private:
PLDHashTable2 mPtrToNodeMap;
PLDHashTable mPtrToNodeMap;
bool mOutOfMemory;
static const uint32_t kInitialMapLength = 16384;

View File

@ -41,7 +41,7 @@ using namespace mozilla;
* sure it's only manipulated from the main thread. Probably the latter
* is better, since the former would hurt performance.
*/
static PLDHashTable2* gAtomTable;
static PLDHashTable* gAtomTable;
class StaticAtomEntry : public PLDHashEntryHdr
{
@ -543,8 +543,8 @@ static inline void
EnsureTableExists()
{
if (!gAtomTable) {
gAtomTable = new PLDHashTable2(&AtomTableOps, sizeof(AtomTableEntry),
ATOM_HASHTABLE_INITIAL_LENGTH);
gAtomTable = new PLDHashTable(&AtomTableOps, sizeof(AtomTableEntry),
ATOM_HASHTABLE_INITIAL_LENGTH);
}
}

View File

@ -33,7 +33,7 @@ private:
protected:
nsCOMPtr<nsIUnicharInputStream> mIn;
PLDHashTable2 mTable;
PLDHashTable mTable;
PLArenaPool mArena;
};

View File

@ -42,7 +42,7 @@ public:
private:
nsDependentCString* mNameArray;
PLDHashTable2 mNameTable;
PLDHashTable mNameTable;
nsDependentCString mNullStr;
};

View File

@ -328,7 +328,7 @@ public:
#endif
protected:
PLDHashTable2 mTable;
PLDHashTable mTable;
static const void* s_GetKey(PLDHashTable* aTable, PLDHashEntryHdr* aEntry);

View File

@ -341,9 +341,6 @@ private:
PLDHashTable& operator=(const PLDHashTable& aOther) = delete;
};
// XXX: this is a temporary typedef that will be removed shortly.
typedef PLDHashTable PLDHashTable2;
/*
* Compute the hash code for a given key to be looked up, added, or removed
* from aTable. A hash code may have any PLDHashNumber value.

View File

@ -27,8 +27,8 @@ static bool test_pldhash_Init_capacity_ok()
// of entry storage. That's very likely to fail on 32-bit platforms, so such
// a test wouldn't be reliable.
//
PLDHashTable2 t(PL_DHashGetStubOps(), sizeof(PLDHashEntryStub),
PL_DHASH_MAX_INITIAL_LENGTH);
PLDHashTable t(PL_DHashGetStubOps(), sizeof(PLDHashEntryStub),
PL_DHASH_MAX_INITIAL_LENGTH);
// Check that the constructor sets |ops|.
if (!t.IsInitialized()) {
@ -40,7 +40,7 @@ static bool test_pldhash_Init_capacity_ok()
static bool test_pldhash_lazy_storage()
{
PLDHashTable2 t(PL_DHashGetStubOps(), sizeof(PLDHashEntryStub));
PLDHashTable t(PL_DHashGetStubOps(), sizeof(PLDHashEntryStub));
// PLDHashTable allocates entry storage lazily. Check that all the non-add
// operations work appropriately when the table is empty and the storage
@ -115,40 +115,40 @@ static const PLDHashTableOps trivialOps = {
static bool test_pldhash_move_semantics()
{
PLDHashTable2 t1(&trivialOps, sizeof(PLDHashEntryStub));
PLDHashTable t1(&trivialOps, sizeof(PLDHashEntryStub));
PL_DHashTableAdd(&t1, (const void*)88);
PLDHashTable2 t2(&trivialOps, sizeof(PLDHashEntryStub));
PLDHashTable t2(&trivialOps, sizeof(PLDHashEntryStub));
PL_DHashTableAdd(&t2, (const void*)99);
t1 = mozilla::Move(t1); // self-move
t1 = mozilla::Move(t2); // empty overwritten with empty
PLDHashTable2 t3(&trivialOps, sizeof(PLDHashEntryStub));
PLDHashTable2 t4(&trivialOps, sizeof(PLDHashEntryStub));
PLDHashTable t3(&trivialOps, sizeof(PLDHashEntryStub));
PLDHashTable t4(&trivialOps, sizeof(PLDHashEntryStub));
PL_DHashTableAdd(&t3, (const void*)88);
t3 = mozilla::Move(t4); // non-empty overwritten with empty
PLDHashTable2 t5(&trivialOps, sizeof(PLDHashEntryStub));
PLDHashTable2 t6(&trivialOps, sizeof(PLDHashEntryStub));
PLDHashTable t5(&trivialOps, sizeof(PLDHashEntryStub));
PLDHashTable t6(&trivialOps, sizeof(PLDHashEntryStub));
PL_DHashTableAdd(&t6, (const void*)88);
t5 = mozilla::Move(t6); // empty overwritten with non-empty
PLDHashTable2 t7(&trivialOps, sizeof(PLDHashEntryStub));
PLDHashTable2 t8(mozilla::Move(t7)); // new table constructed with uninited
PLDHashTable t7(&trivialOps, sizeof(PLDHashEntryStub));
PLDHashTable t8(mozilla::Move(t7)); // new table constructed with uninited
PLDHashTable2 t9(&trivialOps, sizeof(PLDHashEntryStub));
PLDHashTable t9(&trivialOps, sizeof(PLDHashEntryStub));
PL_DHashTableAdd(&t9, (const void*)88);
PLDHashTable2 t10(mozilla::Move(t9)); // new table constructed with inited
PLDHashTable t10(mozilla::Move(t9)); // new table constructed with inited
return true;
}
static bool test_pldhash_Clear()
{
PLDHashTable2 t1(&trivialOps, sizeof(PLDHashEntryStub));
PLDHashTable t1(&trivialOps, sizeof(PLDHashEntryStub));
t1.Clear();
if (t1.EntryCount() != 0) {
@ -194,8 +194,8 @@ static bool test_pldhash_Clear()
static bool test_pldhash_grow_to_max_capacity()
{
// This is infallible.
PLDHashTable2* t =
new PLDHashTable2(&trivialOps, sizeof(PLDHashEntryStub), 128);
PLDHashTable* t =
new PLDHashTable(&trivialOps, sizeof(PLDHashEntryStub), 128);
// Check that New() sets |t->ops|.
if (!t->IsInitialized()) {