mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +00:00
Reorder static and const to match tradition; reomve DEBUG_brendan cruft.
This commit is contained in:
parent
84551c90d5
commit
ae0c4d3804
@ -123,7 +123,7 @@ JS_DHashFinalizeStub(JSDHashTable *table)
|
||||
{
|
||||
}
|
||||
|
||||
const static JSDHashTableOps stub_ops = {
|
||||
static const JSDHashTableOps stub_ops = {
|
||||
JS_DHashAllocTable,
|
||||
JS_DHashFreeTable,
|
||||
JS_DHashGetKeyStub,
|
||||
@ -379,16 +379,6 @@ SearchTable(JSDHashTable *table, const void *key, JSDHashNumber keyHash,
|
||||
|
||||
entry = ADDRESS_ENTRY(table, hash1);
|
||||
if (JS_DHASH_ENTRY_IS_FREE(entry)) {
|
||||
#ifdef DEBUG_brendan
|
||||
extern char *getenv(const char *);
|
||||
static JSBool gotFirstRemovedEnvar = JS_FALSE;
|
||||
static char *doFirstRemoved = NULL;
|
||||
if (!gotFirstRemovedEnvar) {
|
||||
doFirstRemoved = getenv("DHASH_DO_FIRST_REMOVED");
|
||||
gotFirstRemovedEnvar = JS_TRUE;
|
||||
}
|
||||
if (!doFirstRemoved) return entry;
|
||||
#endif
|
||||
METER(table->stats.misses++);
|
||||
return (firstRemoved && op == JS_DHASH_ADD) ? firstRemoved : entry;
|
||||
}
|
||||
|
@ -124,7 +124,7 @@ PL_DHashFinalizeStub(PLDHashTable *table)
|
||||
{
|
||||
}
|
||||
|
||||
const static PLDHashTableOps stub_ops = {
|
||||
static const PLDHashTableOps stub_ops = {
|
||||
PL_DHashAllocTable,
|
||||
PL_DHashFreeTable,
|
||||
PL_DHashGetKeyStub,
|
||||
@ -380,16 +380,6 @@ SearchTable(PLDHashTable *table, const void *key, PLDHashNumber keyHash,
|
||||
|
||||
entry = ADDRESS_ENTRY(table, hash1);
|
||||
if (PL_DHASH_ENTRY_IS_FREE(entry)) {
|
||||
#ifdef DEBUG_brendan
|
||||
extern char *getenv(const char *);
|
||||
static PRBool gotFirstRemovedEnvar = PR_FALSE;
|
||||
static char *doFirstRemoved = NULL;
|
||||
if (!gotFirstRemovedEnvar) {
|
||||
doFirstRemoved = getenv("DHASH_DO_FIRST_REMOVED");
|
||||
gotFirstRemovedEnvar = PR_TRUE;
|
||||
}
|
||||
if (!doFirstRemoved) return entry;
|
||||
#endif
|
||||
METER(table->stats.misses++);
|
||||
return (firstRemoved && op == PL_DHASH_ADD) ? firstRemoved : entry;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user