mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1246013 (part 1) - Store a copy of the ETLDEntry directly in DomainEntry instead of a pointer to it. r=jduell.
This reduces the size of nsEffectiveTLDService from 256 KiB to 128 KiB on 64-bit platforms.
This commit is contained in:
parent
2c7fcb4d59
commit
e25ba5a78a
@ -90,7 +90,7 @@ nsEffectiveTLDService::Init()
|
||||
#endif
|
||||
nsDomainEntry *entry = mHash.PutEntry(domain);
|
||||
NS_ENSURE_TRUE(entry, NS_ERROR_OUT_OF_MEMORY);
|
||||
entry->SetData(&entries[i]);
|
||||
entry->SetData(entries[i]);
|
||||
}
|
||||
|
||||
MOZ_ASSERT(!gService);
|
||||
|
@ -53,7 +53,7 @@ public:
|
||||
|
||||
KeyType GetKey() const
|
||||
{
|
||||
return GetEffectiveTLDName(mData->strtab_index);
|
||||
return GetEffectiveTLDName(mData.strtab_index);
|
||||
}
|
||||
|
||||
bool KeyEquals(KeyTypePointer aKey) const
|
||||
@ -75,11 +75,11 @@ public:
|
||||
|
||||
enum { ALLOW_MEMMOVE = true };
|
||||
|
||||
void SetData(const ETLDEntry* entry) { mData = entry; }
|
||||
void SetData(ETLDEntry entry) { mData = entry; }
|
||||
|
||||
bool IsNormal() { return mData->wild || !mData->exception; }
|
||||
bool IsException() { return mData->exception; }
|
||||
bool IsWild() { return mData->wild; }
|
||||
bool IsNormal() { return mData.wild || !mData.exception; }
|
||||
bool IsException() { return mData.exception; }
|
||||
bool IsWild() { return mData.wild; }
|
||||
|
||||
static const char *GetEffectiveTLDName(size_t idx)
|
||||
{
|
||||
@ -87,7 +87,7 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
const ETLDEntry* mData;
|
||||
ETLDEntry mData;
|
||||
#define ETLD_STR_NUM_1(line) str##line
|
||||
#define ETLD_STR_NUM(line) ETLD_STR_NUM_1(line)
|
||||
struct etld_string_list {
|
||||
|
Loading…
Reference in New Issue
Block a user