Switch PluginSys off KTrie (bug 5884 part 3, r=ds).
This commit is contained in:
@@ -61,7 +61,8 @@ class NameHashSet : public SystemAllocatorPolicy
|
||||
|
||||
// Default policy type: the two types are different. Use them directly.
|
||||
template <typename KeyType, typename KeyPolicyType>
|
||||
struct Policy {
|
||||
struct Policy
|
||||
{
|
||||
typedef KeyType Payload;
|
||||
|
||||
static uint32_t hash(const CharsAndLength &key)
|
||||
|
||||
@@ -120,7 +120,7 @@ public:
|
||||
bool retrieve(const char *aKey, T *aResult = NULL)
|
||||
{
|
||||
CharsAndLength key(aKey);
|
||||
typename Internal::Result r = internal_.find(key);
|
||||
Result r = internal_.find(key);
|
||||
if (!r.found())
|
||||
return false;
|
||||
if (aResult)
|
||||
@@ -137,7 +137,7 @@ public:
|
||||
bool contains(const char *aKey)
|
||||
{
|
||||
CharsAndLength key(aKey);
|
||||
typename Internal::Result r = internal_.find(key);
|
||||
Result r = internal_.find(key);
|
||||
return r.found();
|
||||
}
|
||||
|
||||
@@ -173,7 +173,7 @@ public:
|
||||
bool remove(const char *aKey)
|
||||
{
|
||||
CharsAndLength key(aKey);
|
||||
typename Internal::Result r = internal_.find(key);
|
||||
Result r = internal_.find(key);
|
||||
if (!r.found())
|
||||
return false;
|
||||
memory_used_ -= key.length() + 1;
|
||||
@@ -181,6 +181,11 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
void remove(Result &r)
|
||||
{
|
||||
internal_.remove(r);
|
||||
}
|
||||
|
||||
void clear()
|
||||
{
|
||||
internal_.clear();
|
||||
|
||||
Reference in New Issue
Block a user