зеркало из https://github.com/mozilla/gecko-dev.git
Bug 884649 (part 1) - Used PLDHash instead of JSDHash in xpconnect. r=mccr8.
--HG-- extra : rebase_source : 7a206a6dfba19d8678ef9aee7517b4833c2a4f00
This commit is contained in:
Родитель
7be7aa926c
Коммит
cef32afe0b
|
@ -86,18 +86,18 @@ struct CX_AND_XPCRT_Data
|
||||||
static void * const UNMARK_ONLY = nullptr;
|
static void * const UNMARK_ONLY = nullptr;
|
||||||
static void * const UNMARK_AND_SWEEP = (void *)1;
|
static void * const UNMARK_AND_SWEEP = (void *)1;
|
||||||
|
|
||||||
static JSDHashOperator
|
static PLDHashOperator
|
||||||
NativeInterfaceSweeper(JSDHashTable *table, JSDHashEntryHdr *hdr,
|
NativeInterfaceSweeper(PLDHashTable *table, PLDHashEntryHdr *hdr,
|
||||||
uint32_t number, void *arg)
|
uint32_t number, void *arg)
|
||||||
{
|
{
|
||||||
XPCNativeInterface* iface = ((IID2NativeInterfaceMap::Entry*)hdr)->value;
|
XPCNativeInterface* iface = ((IID2NativeInterfaceMap::Entry*)hdr)->value;
|
||||||
if (iface->IsMarked()) {
|
if (iface->IsMarked()) {
|
||||||
iface->Unmark();
|
iface->Unmark();
|
||||||
return JS_DHASH_NEXT;
|
return PL_DHASH_NEXT;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (arg == UNMARK_ONLY)
|
if (arg == UNMARK_ONLY)
|
||||||
return JS_DHASH_NEXT;
|
return PL_DHASH_NEXT;
|
||||||
|
|
||||||
#ifdef XPC_REPORT_NATIVE_INTERFACE_AND_SET_FLUSHING
|
#ifdef XPC_REPORT_NATIVE_INTERFACE_AND_SET_FLUSHING
|
||||||
fputs("- Destroying XPCNativeInterface for ", stdout);
|
fputs("- Destroying XPCNativeInterface for ", stdout);
|
||||||
|
@ -106,7 +106,7 @@ NativeInterfaceSweeper(JSDHashTable *table, JSDHashEntryHdr *hdr,
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
XPCNativeInterface::DestroyInstance(iface);
|
XPCNativeInterface::DestroyInstance(iface);
|
||||||
return JS_DHASH_REMOVE;
|
return PL_DHASH_REMOVE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// *Some* NativeSets are referenced from mClassInfo2NativeSetMap.
|
// *Some* NativeSets are referenced from mClassInfo2NativeSetMap.
|
||||||
|
@ -114,28 +114,28 @@ NativeInterfaceSweeper(JSDHashTable *table, JSDHashEntryHdr *hdr,
|
||||||
// So, in mClassInfo2NativeSetMap we just clear references to the unmarked.
|
// So, in mClassInfo2NativeSetMap we just clear references to the unmarked.
|
||||||
// In mNativeSetMap we clear the references to the unmarked *and* delete them.
|
// In mNativeSetMap we clear the references to the unmarked *and* delete them.
|
||||||
|
|
||||||
static JSDHashOperator
|
static PLDHashOperator
|
||||||
NativeUnMarkedSetRemover(JSDHashTable *table, JSDHashEntryHdr *hdr,
|
NativeUnMarkedSetRemover(PLDHashTable *table, PLDHashEntryHdr *hdr,
|
||||||
uint32_t number, void *arg)
|
uint32_t number, void *arg)
|
||||||
{
|
{
|
||||||
XPCNativeSet* set = ((ClassInfo2NativeSetMap::Entry*)hdr)->value;
|
XPCNativeSet* set = ((ClassInfo2NativeSetMap::Entry*)hdr)->value;
|
||||||
if (set->IsMarked())
|
if (set->IsMarked())
|
||||||
return JS_DHASH_NEXT;
|
return PL_DHASH_NEXT;
|
||||||
return JS_DHASH_REMOVE;
|
return PL_DHASH_REMOVE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static JSDHashOperator
|
static PLDHashOperator
|
||||||
NativeSetSweeper(JSDHashTable *table, JSDHashEntryHdr *hdr,
|
NativeSetSweeper(PLDHashTable *table, PLDHashEntryHdr *hdr,
|
||||||
uint32_t number, void *arg)
|
uint32_t number, void *arg)
|
||||||
{
|
{
|
||||||
XPCNativeSet* set = ((NativeSetMap::Entry*)hdr)->key_value;
|
XPCNativeSet* set = ((NativeSetMap::Entry*)hdr)->key_value;
|
||||||
if (set->IsMarked()) {
|
if (set->IsMarked()) {
|
||||||
set->Unmark();
|
set->Unmark();
|
||||||
return JS_DHASH_NEXT;
|
return PL_DHASH_NEXT;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (arg == UNMARK_ONLY)
|
if (arg == UNMARK_ONLY)
|
||||||
return JS_DHASH_NEXT;
|
return PL_DHASH_NEXT;
|
||||||
|
|
||||||
#ifdef XPC_REPORT_NATIVE_INTERFACE_AND_SET_FLUSHING
|
#ifdef XPC_REPORT_NATIVE_INTERFACE_AND_SET_FLUSHING
|
||||||
printf("- Destroying XPCNativeSet for:\n");
|
printf("- Destroying XPCNativeSet for:\n");
|
||||||
|
@ -149,11 +149,11 @@ NativeSetSweeper(JSDHashTable *table, JSDHashEntryHdr *hdr,
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
XPCNativeSet::DestroyInstance(set);
|
XPCNativeSet::DestroyInstance(set);
|
||||||
return JS_DHASH_REMOVE;
|
return PL_DHASH_REMOVE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static JSDHashOperator
|
static PLDHashOperator
|
||||||
JSClassSweeper(JSDHashTable *table, JSDHashEntryHdr *hdr,
|
JSClassSweeper(PLDHashTable *table, PLDHashEntryHdr *hdr,
|
||||||
uint32_t number, void *arg)
|
uint32_t number, void *arg)
|
||||||
{
|
{
|
||||||
XPCNativeScriptableShared* shared =
|
XPCNativeScriptableShared* shared =
|
||||||
|
@ -165,11 +165,11 @@ JSClassSweeper(JSDHashTable *table, JSDHashEntryHdr *hdr,
|
||||||
shared->GetJSClass());
|
shared->GetJSClass());
|
||||||
#endif
|
#endif
|
||||||
shared->Unmark();
|
shared->Unmark();
|
||||||
return JS_DHASH_NEXT;
|
return PL_DHASH_NEXT;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (arg == UNMARK_ONLY)
|
if (arg == UNMARK_ONLY)
|
||||||
return JS_DHASH_NEXT;
|
return PL_DHASH_NEXT;
|
||||||
|
|
||||||
#ifdef XPC_REPORT_JSCLASS_FLUSHING
|
#ifdef XPC_REPORT_JSCLASS_FLUSHING
|
||||||
printf("- Destroying XPCNativeScriptableShared for: %s @ %x\n",
|
printf("- Destroying XPCNativeScriptableShared for: %s @ %x\n",
|
||||||
|
@ -178,28 +178,28 @@ JSClassSweeper(JSDHashTable *table, JSDHashEntryHdr *hdr,
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
delete shared;
|
delete shared;
|
||||||
return JS_DHASH_REMOVE;
|
return PL_DHASH_REMOVE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static JSDHashOperator
|
static PLDHashOperator
|
||||||
DyingProtoKiller(JSDHashTable *table, JSDHashEntryHdr *hdr,
|
DyingProtoKiller(PLDHashTable *table, PLDHashEntryHdr *hdr,
|
||||||
uint32_t number, void *arg)
|
uint32_t number, void *arg)
|
||||||
{
|
{
|
||||||
XPCWrappedNativeProto* proto =
|
XPCWrappedNativeProto* proto =
|
||||||
(XPCWrappedNativeProto*)((JSDHashEntryStub*)hdr)->key;
|
(XPCWrappedNativeProto*)((PLDHashEntryStub*)hdr)->key;
|
||||||
delete proto;
|
delete proto;
|
||||||
return JS_DHASH_REMOVE;
|
return PL_DHASH_REMOVE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static JSDHashOperator
|
static PLDHashOperator
|
||||||
DetachedWrappedNativeProtoMarker(JSDHashTable *table, JSDHashEntryHdr *hdr,
|
DetachedWrappedNativeProtoMarker(PLDHashTable *table, PLDHashEntryHdr *hdr,
|
||||||
uint32_t number, void *arg)
|
uint32_t number, void *arg)
|
||||||
{
|
{
|
||||||
XPCWrappedNativeProto* proto =
|
XPCWrappedNativeProto* proto =
|
||||||
(XPCWrappedNativeProto*)((JSDHashEntryStub*)hdr)->key;
|
(XPCWrappedNativeProto*)((PLDHashEntryStub*)hdr)->key;
|
||||||
|
|
||||||
proto->Mark();
|
proto->Mark();
|
||||||
return JS_DHASH_NEXT;
|
return PL_DHASH_NEXT;
|
||||||
}
|
}
|
||||||
|
|
||||||
// GCCallback calls are chained
|
// GCCallback calls are chained
|
||||||
|
@ -1178,26 +1178,26 @@ XPCJSRuntime::DeleteString(nsAString *string)
|
||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
|
|
||||||
#ifdef XPC_CHECK_WRAPPERS_AT_SHUTDOWN
|
#ifdef XPC_CHECK_WRAPPERS_AT_SHUTDOWN
|
||||||
static JSDHashOperator
|
static PLDHashOperator
|
||||||
DEBUG_WrapperChecker(JSDHashTable *table, JSDHashEntryHdr *hdr,
|
DEBUG_WrapperChecker(PLDHashTable *table, PLDHashEntryHdr *hdr,
|
||||||
uint32_t number, void *arg)
|
uint32_t number, void *arg)
|
||||||
{
|
{
|
||||||
XPCWrappedNative* wrapper = (XPCWrappedNative*)((JSDHashEntryStub*)hdr)->key;
|
XPCWrappedNative* wrapper = (XPCWrappedNative*)((PLDHashEntryStub*)hdr)->key;
|
||||||
NS_ASSERTION(!wrapper->IsValid(), "found a 'valid' wrapper!");
|
NS_ASSERTION(!wrapper->IsValid(), "found a 'valid' wrapper!");
|
||||||
++ *((int*)arg);
|
++ *((int*)arg);
|
||||||
return JS_DHASH_NEXT;
|
return PL_DHASH_NEXT;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static JSDHashOperator
|
static PLDHashOperator
|
||||||
DetachedWrappedNativeProtoShutdownMarker(JSDHashTable *table, JSDHashEntryHdr *hdr,
|
DetachedWrappedNativeProtoShutdownMarker(PLDHashTable *table, PLDHashEntryHdr *hdr,
|
||||||
uint32_t number, void *arg)
|
uint32_t number, void *arg)
|
||||||
{
|
{
|
||||||
XPCWrappedNativeProto* proto =
|
XPCWrappedNativeProto* proto =
|
||||||
(XPCWrappedNativeProto*)((JSDHashEntryStub*)hdr)->key;
|
(XPCWrappedNativeProto*)((PLDHashEntryStub*)hdr)->key;
|
||||||
|
|
||||||
proto->SystemIsBeingShutDown();
|
proto->SystemIsBeingShutDown();
|
||||||
return JS_DHASH_NEXT;
|
return PL_DHASH_NEXT;
|
||||||
}
|
}
|
||||||
|
|
||||||
void XPCJSRuntime::DestroyJSContextStack()
|
void XPCJSRuntime::DestroyJSContextStack()
|
||||||
|
@ -1318,11 +1318,11 @@ XPCJSRuntime::~XPCJSRuntime()
|
||||||
#ifdef XPC_CHECK_WRAPPERS_AT_SHUTDOWN
|
#ifdef XPC_CHECK_WRAPPERS_AT_SHUTDOWN
|
||||||
if (DEBUG_WrappedNativeHashtable) {
|
if (DEBUG_WrappedNativeHashtable) {
|
||||||
int LiveWrapperCount = 0;
|
int LiveWrapperCount = 0;
|
||||||
JS_DHashTableEnumerate(DEBUG_WrappedNativeHashtable,
|
PL_DHashTableEnumerate(DEBUG_WrappedNativeHashtable,
|
||||||
DEBUG_WrapperChecker, &LiveWrapperCount);
|
DEBUG_WrapperChecker, &LiveWrapperCount);
|
||||||
if (LiveWrapperCount)
|
if (LiveWrapperCount)
|
||||||
printf("deleting XPCJSRuntime with %d live XPCWrappedNative (found in wrapper check)\n", (int)LiveWrapperCount);
|
printf("deleting XPCJSRuntime with %d live XPCWrappedNative (found in wrapper check)\n", (int)LiveWrapperCount);
|
||||||
JS_DHashTableDestroy(DEBUG_WrappedNativeHashtable);
|
PL_DHashTableDestroy(DEBUG_WrappedNativeHashtable);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -2677,8 +2677,8 @@ XPCJSRuntime::XPCJSRuntime(nsXPConnect* aXPConnect)
|
||||||
{
|
{
|
||||||
#ifdef XPC_CHECK_WRAPPERS_AT_SHUTDOWN
|
#ifdef XPC_CHECK_WRAPPERS_AT_SHUTDOWN
|
||||||
DEBUG_WrappedNativeHashtable =
|
DEBUG_WrappedNativeHashtable =
|
||||||
JS_NewDHashTable(JS_DHashGetStubOps(), nullptr,
|
PL_NewDHashTable(PL_DHashGetStubOps(), nullptr,
|
||||||
sizeof(JSDHashEntryStub), 128);
|
sizeof(PLDHashEntryStub), 128);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
DOM_InitInterfaces();
|
DOM_InitInterfaces();
|
||||||
|
@ -2912,19 +2912,19 @@ XPCJSRuntime::DeferredRelease(nsISupports *obj)
|
||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
static JSDHashOperator
|
static PLDHashOperator
|
||||||
WrappedJSClassMapDumpEnumerator(JSDHashTable *table, JSDHashEntryHdr *hdr,
|
WrappedJSClassMapDumpEnumerator(PLDHashTable *table, PLDHashEntryHdr *hdr,
|
||||||
uint32_t number, void *arg)
|
uint32_t number, void *arg)
|
||||||
{
|
{
|
||||||
((IID2WrappedJSClassMap::Entry*)hdr)->value->DebugDump(*(int16_t*)arg);
|
((IID2WrappedJSClassMap::Entry*)hdr)->value->DebugDump(*(int16_t*)arg);
|
||||||
return JS_DHASH_NEXT;
|
return PL_DHASH_NEXT;
|
||||||
}
|
}
|
||||||
static JSDHashOperator
|
static PLDHashOperator
|
||||||
NativeSetDumpEnumerator(JSDHashTable *table, JSDHashEntryHdr *hdr,
|
NativeSetDumpEnumerator(PLDHashTable *table, PLDHashEntryHdr *hdr,
|
||||||
uint32_t number, void *arg)
|
uint32_t number, void *arg)
|
||||||
{
|
{
|
||||||
((NativeSetMap::Entry*)hdr)->key_value->DebugDump(*(int16_t*)arg);
|
((NativeSetMap::Entry*)hdr)->key_value->DebugDump(*(int16_t*)arg);
|
||||||
return JS_DHASH_NEXT;
|
return PL_DHASH_NEXT;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -16,27 +16,27 @@
|
||||||
// Note this is returning the bit pattern of the first part of the nsID, not
|
// Note this is returning the bit pattern of the first part of the nsID, not
|
||||||
// the pointer to the nsID.
|
// the pointer to the nsID.
|
||||||
|
|
||||||
static JSDHashNumber
|
static PLDHashNumber
|
||||||
HashIIDPtrKey(JSDHashTable *table, const void *key)
|
HashIIDPtrKey(PLDHashTable *table, const void *key)
|
||||||
{
|
{
|
||||||
return *((js::HashNumber*)key);
|
return *((js::HashNumber*)key);
|
||||||
}
|
}
|
||||||
|
|
||||||
static JSBool
|
static bool
|
||||||
MatchIIDPtrKey(JSDHashTable *table,
|
MatchIIDPtrKey(PLDHashTable *table,
|
||||||
const JSDHashEntryHdr *entry,
|
const PLDHashEntryHdr *entry,
|
||||||
const void *key)
|
const void *key)
|
||||||
{
|
{
|
||||||
return ((const nsID*)key)->
|
return ((const nsID*)key)->
|
||||||
Equals(*((const nsID*)((JSDHashEntryStub*)entry)->key));
|
Equals(*((const nsID*)((PLDHashEntryStub*)entry)->key));
|
||||||
}
|
}
|
||||||
|
|
||||||
static JSDHashNumber
|
static PLDHashNumber
|
||||||
HashNativeKey(JSDHashTable *table, const void *key)
|
HashNativeKey(PLDHashTable *table, const void *key)
|
||||||
{
|
{
|
||||||
XPCNativeSetKey* Key = (XPCNativeSetKey*) key;
|
XPCNativeSetKey* Key = (XPCNativeSetKey*) key;
|
||||||
|
|
||||||
JSDHashNumber h = 0;
|
PLDHashNumber h = 0;
|
||||||
|
|
||||||
XPCNativeSet* Set;
|
XPCNativeSet* Set;
|
||||||
XPCNativeInterface* Addition;
|
XPCNativeInterface* Addition;
|
||||||
|
@ -127,14 +127,14 @@ Native2WrappedNativeMap::newMap(int size)
|
||||||
|
|
||||||
Native2WrappedNativeMap::Native2WrappedNativeMap(int size)
|
Native2WrappedNativeMap::Native2WrappedNativeMap(int size)
|
||||||
{
|
{
|
||||||
mTable = JS_NewDHashTable(JS_DHashGetStubOps(), nullptr,
|
mTable = PL_NewDHashTable(PL_DHashGetStubOps(), nullptr,
|
||||||
sizeof(Entry), size);
|
sizeof(Entry), size);
|
||||||
}
|
}
|
||||||
|
|
||||||
Native2WrappedNativeMap::~Native2WrappedNativeMap()
|
Native2WrappedNativeMap::~Native2WrappedNativeMap()
|
||||||
{
|
{
|
||||||
if (mTable)
|
if (mTable)
|
||||||
JS_DHashTableDestroy(mTable);
|
PL_DHashTableDestroy(mTable);
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t
|
size_t
|
||||||
|
@ -142,12 +142,12 @@ Native2WrappedNativeMap::SizeOfIncludingThis(nsMallocSizeOfFun mallocSizeOf)
|
||||||
{
|
{
|
||||||
size_t n = 0;
|
size_t n = 0;
|
||||||
n += mallocSizeOf(this);
|
n += mallocSizeOf(this);
|
||||||
n += mTable ? JS_DHashTableSizeOfIncludingThis(mTable, SizeOfEntryExcludingThis, mallocSizeOf) : 0;
|
n += mTable ? PL_DHashTableSizeOfIncludingThis(mTable, SizeOfEntryExcludingThis, mallocSizeOf) : 0;
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* static */ size_t
|
/* static */ size_t
|
||||||
Native2WrappedNativeMap::SizeOfEntryExcludingThis(JSDHashEntryHdr *hdr,
|
Native2WrappedNativeMap::SizeOfEntryExcludingThis(PLDHashEntryHdr *hdr,
|
||||||
JSMallocSizeOfFun mallocSizeOf, void *)
|
JSMallocSizeOfFun mallocSizeOf, void *)
|
||||||
{
|
{
|
||||||
return mallocSizeOf(((Native2WrappedNativeMap::Entry*)hdr)->value);
|
return mallocSizeOf(((Native2WrappedNativeMap::Entry*)hdr)->value);
|
||||||
|
@ -156,15 +156,15 @@ Native2WrappedNativeMap::SizeOfEntryExcludingThis(JSDHashEntryHdr *hdr,
|
||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
// implement IID2WrappedJSClassMap...
|
// implement IID2WrappedJSClassMap...
|
||||||
|
|
||||||
struct JSDHashTableOps IID2WrappedJSClassMap::Entry::sOps =
|
struct PLDHashTableOps IID2WrappedJSClassMap::Entry::sOps =
|
||||||
{
|
{
|
||||||
JS_DHashAllocTable,
|
PL_DHashAllocTable,
|
||||||
JS_DHashFreeTable,
|
PL_DHashFreeTable,
|
||||||
HashIIDPtrKey,
|
HashIIDPtrKey,
|
||||||
MatchIIDPtrKey,
|
MatchIIDPtrKey,
|
||||||
JS_DHashMoveEntryStub,
|
PL_DHashMoveEntryStub,
|
||||||
JS_DHashClearEntryStub,
|
PL_DHashClearEntryStub,
|
||||||
JS_DHashFinalizeStub
|
PL_DHashFinalizeStub
|
||||||
};
|
};
|
||||||
|
|
||||||
// static
|
// static
|
||||||
|
@ -180,28 +180,28 @@ IID2WrappedJSClassMap::newMap(int size)
|
||||||
|
|
||||||
IID2WrappedJSClassMap::IID2WrappedJSClassMap(int size)
|
IID2WrappedJSClassMap::IID2WrappedJSClassMap(int size)
|
||||||
{
|
{
|
||||||
mTable = JS_NewDHashTable(&Entry::sOps, nullptr, sizeof(Entry), size);
|
mTable = PL_NewDHashTable(&Entry::sOps, nullptr, sizeof(Entry), size);
|
||||||
}
|
}
|
||||||
|
|
||||||
IID2WrappedJSClassMap::~IID2WrappedJSClassMap()
|
IID2WrappedJSClassMap::~IID2WrappedJSClassMap()
|
||||||
{
|
{
|
||||||
if (mTable)
|
if (mTable)
|
||||||
JS_DHashTableDestroy(mTable);
|
PL_DHashTableDestroy(mTable);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
// implement IID2NativeInterfaceMap...
|
// implement IID2NativeInterfaceMap...
|
||||||
|
|
||||||
struct JSDHashTableOps IID2NativeInterfaceMap::Entry::sOps =
|
struct PLDHashTableOps IID2NativeInterfaceMap::Entry::sOps =
|
||||||
{
|
{
|
||||||
JS_DHashAllocTable,
|
PL_DHashAllocTable,
|
||||||
JS_DHashFreeTable,
|
PL_DHashFreeTable,
|
||||||
HashIIDPtrKey,
|
HashIIDPtrKey,
|
||||||
MatchIIDPtrKey,
|
MatchIIDPtrKey,
|
||||||
JS_DHashMoveEntryStub,
|
PL_DHashMoveEntryStub,
|
||||||
JS_DHashClearEntryStub,
|
PL_DHashClearEntryStub,
|
||||||
JS_DHashFinalizeStub
|
PL_DHashFinalizeStub
|
||||||
};
|
};
|
||||||
|
|
||||||
// static
|
// static
|
||||||
|
@ -217,13 +217,13 @@ IID2NativeInterfaceMap::newMap(int size)
|
||||||
|
|
||||||
IID2NativeInterfaceMap::IID2NativeInterfaceMap(int size)
|
IID2NativeInterfaceMap::IID2NativeInterfaceMap(int size)
|
||||||
{
|
{
|
||||||
mTable = JS_NewDHashTable(&Entry::sOps, nullptr, sizeof(Entry), size);
|
mTable = PL_NewDHashTable(&Entry::sOps, nullptr, sizeof(Entry), size);
|
||||||
}
|
}
|
||||||
|
|
||||||
IID2NativeInterfaceMap::~IID2NativeInterfaceMap()
|
IID2NativeInterfaceMap::~IID2NativeInterfaceMap()
|
||||||
{
|
{
|
||||||
if (mTable)
|
if (mTable)
|
||||||
JS_DHashTableDestroy(mTable);
|
PL_DHashTableDestroy(mTable);
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t
|
size_t
|
||||||
|
@ -231,12 +231,12 @@ IID2NativeInterfaceMap::SizeOfIncludingThis(nsMallocSizeOfFun mallocSizeOf)
|
||||||
{
|
{
|
||||||
size_t n = 0;
|
size_t n = 0;
|
||||||
n += mallocSizeOf(this);
|
n += mallocSizeOf(this);
|
||||||
n += mTable ? JS_DHashTableSizeOfIncludingThis(mTable, SizeOfEntryExcludingThis, mallocSizeOf) : 0;
|
n += mTable ? PL_DHashTableSizeOfIncludingThis(mTable, SizeOfEntryExcludingThis, mallocSizeOf) : 0;
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* static */ size_t
|
/* static */ size_t
|
||||||
IID2NativeInterfaceMap::SizeOfEntryExcludingThis(JSDHashEntryHdr *hdr,
|
IID2NativeInterfaceMap::SizeOfEntryExcludingThis(PLDHashEntryHdr *hdr,
|
||||||
JSMallocSizeOfFun mallocSizeOf, void *)
|
JSMallocSizeOfFun mallocSizeOf, void *)
|
||||||
{
|
{
|
||||||
XPCNativeInterface *iface = ((IID2NativeInterfaceMap::Entry*)hdr)->value;
|
XPCNativeInterface *iface = ((IID2NativeInterfaceMap::Entry*)hdr)->value;
|
||||||
|
@ -259,14 +259,14 @@ ClassInfo2NativeSetMap::newMap(int size)
|
||||||
|
|
||||||
ClassInfo2NativeSetMap::ClassInfo2NativeSetMap(int size)
|
ClassInfo2NativeSetMap::ClassInfo2NativeSetMap(int size)
|
||||||
{
|
{
|
||||||
mTable = JS_NewDHashTable(JS_DHashGetStubOps(), nullptr,
|
mTable = PL_NewDHashTable(PL_DHashGetStubOps(), nullptr,
|
||||||
sizeof(Entry), size);
|
sizeof(Entry), size);
|
||||||
}
|
}
|
||||||
|
|
||||||
ClassInfo2NativeSetMap::~ClassInfo2NativeSetMap()
|
ClassInfo2NativeSetMap::~ClassInfo2NativeSetMap()
|
||||||
{
|
{
|
||||||
if (mTable)
|
if (mTable)
|
||||||
JS_DHashTableDestroy(mTable);
|
PL_DHashTableDestroy(mTable);
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t
|
size_t
|
||||||
|
@ -274,8 +274,8 @@ ClassInfo2NativeSetMap::ShallowSizeOfIncludingThis(nsMallocSizeOfFun mallocSizeO
|
||||||
{
|
{
|
||||||
size_t n = 0;
|
size_t n = 0;
|
||||||
n += mallocSizeOf(this);
|
n += mallocSizeOf(this);
|
||||||
// The second arg is NULL because this is a "shallow" measurement of the map.
|
// The second arg is nullptr because this is a "shallow" measurement of the map.
|
||||||
n += mTable ? JS_DHashTableSizeOfIncludingThis(mTable, NULL, mallocSizeOf) : 0;
|
n += mTable ? PL_DHashTableSizeOfIncludingThis(mTable, nullptr, mallocSizeOf) : 0;
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -299,14 +299,14 @@ ClassInfo2WrappedNativeProtoMap::newMap(int size)
|
||||||
|
|
||||||
ClassInfo2WrappedNativeProtoMap::ClassInfo2WrappedNativeProtoMap(int size)
|
ClassInfo2WrappedNativeProtoMap::ClassInfo2WrappedNativeProtoMap(int size)
|
||||||
{
|
{
|
||||||
mTable = JS_NewDHashTable(JS_DHashGetStubOps(), nullptr,
|
mTable = PL_NewDHashTable(PL_DHashGetStubOps(), nullptr,
|
||||||
sizeof(Entry), size);
|
sizeof(Entry), size);
|
||||||
}
|
}
|
||||||
|
|
||||||
ClassInfo2WrappedNativeProtoMap::~ClassInfo2WrappedNativeProtoMap()
|
ClassInfo2WrappedNativeProtoMap::~ClassInfo2WrappedNativeProtoMap()
|
||||||
{
|
{
|
||||||
if (mTable)
|
if (mTable)
|
||||||
JS_DHashTableDestroy(mTable);
|
PL_DHashTableDestroy(mTable);
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t
|
size_t
|
||||||
|
@ -314,12 +314,12 @@ ClassInfo2WrappedNativeProtoMap::SizeOfIncludingThis(nsMallocSizeOfFun mallocSiz
|
||||||
{
|
{
|
||||||
size_t n = 0;
|
size_t n = 0;
|
||||||
n += mallocSizeOf(this);
|
n += mallocSizeOf(this);
|
||||||
n += mTable ? JS_DHashTableSizeOfIncludingThis(mTable, SizeOfEntryExcludingThis, mallocSizeOf) : 0;
|
n += mTable ? PL_DHashTableSizeOfIncludingThis(mTable, SizeOfEntryExcludingThis, mallocSizeOf) : 0;
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* static */ size_t
|
/* static */ size_t
|
||||||
ClassInfo2WrappedNativeProtoMap::SizeOfEntryExcludingThis(JSDHashEntryHdr *hdr,
|
ClassInfo2WrappedNativeProtoMap::SizeOfEntryExcludingThis(PLDHashEntryHdr *hdr,
|
||||||
JSMallocSizeOfFun mallocSizeOf, void *)
|
JSMallocSizeOfFun mallocSizeOf, void *)
|
||||||
{
|
{
|
||||||
return mallocSizeOf(((ClassInfo2WrappedNativeProtoMap::Entry*)hdr)->value);
|
return mallocSizeOf(((ClassInfo2WrappedNativeProtoMap::Entry*)hdr)->value);
|
||||||
|
@ -328,9 +328,9 @@ ClassInfo2WrappedNativeProtoMap::SizeOfEntryExcludingThis(JSDHashEntryHdr *hdr,
|
||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
// implement NativeSetMap...
|
// implement NativeSetMap...
|
||||||
|
|
||||||
JSBool
|
bool
|
||||||
NativeSetMap::Entry::Match(JSDHashTable *table,
|
NativeSetMap::Entry::Match(PLDHashTable *table,
|
||||||
const JSDHashEntryHdr *entry,
|
const PLDHashEntryHdr *entry,
|
||||||
const void *key)
|
const void *key)
|
||||||
{
|
{
|
||||||
XPCNativeSetKey* Key = (XPCNativeSetKey*) key;
|
XPCNativeSetKey* Key = (XPCNativeSetKey*) key;
|
||||||
|
@ -400,15 +400,15 @@ NativeSetMap::Entry::Match(JSDHashTable *table,
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct JSDHashTableOps NativeSetMap::Entry::sOps =
|
struct PLDHashTableOps NativeSetMap::Entry::sOps =
|
||||||
{
|
{
|
||||||
JS_DHashAllocTable,
|
PL_DHashAllocTable,
|
||||||
JS_DHashFreeTable,
|
PL_DHashFreeTable,
|
||||||
HashNativeKey,
|
HashNativeKey,
|
||||||
Match,
|
Match,
|
||||||
JS_DHashMoveEntryStub,
|
PL_DHashMoveEntryStub,
|
||||||
JS_DHashClearEntryStub,
|
PL_DHashClearEntryStub,
|
||||||
JS_DHashFinalizeStub
|
PL_DHashFinalizeStub
|
||||||
};
|
};
|
||||||
|
|
||||||
// static
|
// static
|
||||||
|
@ -424,13 +424,13 @@ NativeSetMap::newMap(int size)
|
||||||
|
|
||||||
NativeSetMap::NativeSetMap(int size)
|
NativeSetMap::NativeSetMap(int size)
|
||||||
{
|
{
|
||||||
mTable = JS_NewDHashTable(&Entry::sOps, nullptr, sizeof(Entry), size);
|
mTable = PL_NewDHashTable(&Entry::sOps, nullptr, sizeof(Entry), size);
|
||||||
}
|
}
|
||||||
|
|
||||||
NativeSetMap::~NativeSetMap()
|
NativeSetMap::~NativeSetMap()
|
||||||
{
|
{
|
||||||
if (mTable)
|
if (mTable)
|
||||||
JS_DHashTableDestroy(mTable);
|
PL_DHashTableDestroy(mTable);
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t
|
size_t
|
||||||
|
@ -438,12 +438,12 @@ NativeSetMap::SizeOfIncludingThis(nsMallocSizeOfFun mallocSizeOf)
|
||||||
{
|
{
|
||||||
size_t n = 0;
|
size_t n = 0;
|
||||||
n += mallocSizeOf(this);
|
n += mallocSizeOf(this);
|
||||||
n += mTable ? JS_DHashTableSizeOfIncludingThis(mTable, SizeOfEntryExcludingThis, mallocSizeOf) : 0;
|
n += mTable ? PL_DHashTableSizeOfIncludingThis(mTable, SizeOfEntryExcludingThis, mallocSizeOf) : 0;
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* static */ size_t
|
/* static */ size_t
|
||||||
NativeSetMap::SizeOfEntryExcludingThis(JSDHashEntryHdr *hdr, JSMallocSizeOfFun mallocSizeOf, void *)
|
NativeSetMap::SizeOfEntryExcludingThis(PLDHashEntryHdr *hdr, JSMallocSizeOfFun mallocSizeOf, void *)
|
||||||
{
|
{
|
||||||
XPCNativeSet *set = ((NativeSetMap::Entry*)hdr)->key_value;
|
XPCNativeSet *set = ((NativeSetMap::Entry*)hdr)->key_value;
|
||||||
return set->SizeOfIncludingThis(mallocSizeOf);
|
return set->SizeOfIncludingThis(mallocSizeOf);
|
||||||
|
@ -452,30 +452,30 @@ NativeSetMap::SizeOfEntryExcludingThis(JSDHashEntryHdr *hdr, JSMallocSizeOfFun m
|
||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
// implement IID2ThisTranslatorMap...
|
// implement IID2ThisTranslatorMap...
|
||||||
|
|
||||||
JSBool
|
bool
|
||||||
IID2ThisTranslatorMap::Entry::Match(JSDHashTable *table,
|
IID2ThisTranslatorMap::Entry::Match(PLDHashTable *table,
|
||||||
const JSDHashEntryHdr *entry,
|
const PLDHashEntryHdr *entry,
|
||||||
const void *key)
|
const void *key)
|
||||||
{
|
{
|
||||||
return ((const nsID*)key)->Equals(((Entry*)entry)->key);
|
return ((const nsID*)key)->Equals(((Entry*)entry)->key);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
IID2ThisTranslatorMap::Entry::Clear(JSDHashTable *table, JSDHashEntryHdr *entry)
|
IID2ThisTranslatorMap::Entry::Clear(PLDHashTable *table, PLDHashEntryHdr *entry)
|
||||||
{
|
{
|
||||||
NS_IF_RELEASE(((Entry*)entry)->value);
|
NS_IF_RELEASE(((Entry*)entry)->value);
|
||||||
memset(entry, 0, table->entrySize);
|
memset(entry, 0, table->entrySize);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct JSDHashTableOps IID2ThisTranslatorMap::Entry::sOps =
|
struct PLDHashTableOps IID2ThisTranslatorMap::Entry::sOps =
|
||||||
{
|
{
|
||||||
JS_DHashAllocTable,
|
PL_DHashAllocTable,
|
||||||
JS_DHashFreeTable,
|
PL_DHashFreeTable,
|
||||||
HashIIDPtrKey,
|
HashIIDPtrKey,
|
||||||
Match,
|
Match,
|
||||||
JS_DHashMoveEntryStub,
|
PL_DHashMoveEntryStub,
|
||||||
Clear,
|
Clear,
|
||||||
JS_DHashFinalizeStub
|
PL_DHashFinalizeStub
|
||||||
};
|
};
|
||||||
|
|
||||||
// static
|
// static
|
||||||
|
@ -491,21 +491,21 @@ IID2ThisTranslatorMap::newMap(int size)
|
||||||
|
|
||||||
IID2ThisTranslatorMap::IID2ThisTranslatorMap(int size)
|
IID2ThisTranslatorMap::IID2ThisTranslatorMap(int size)
|
||||||
{
|
{
|
||||||
mTable = JS_NewDHashTable(&Entry::sOps, nullptr, sizeof(Entry), size);
|
mTable = PL_NewDHashTable(&Entry::sOps, nullptr, sizeof(Entry), size);
|
||||||
}
|
}
|
||||||
|
|
||||||
IID2ThisTranslatorMap::~IID2ThisTranslatorMap()
|
IID2ThisTranslatorMap::~IID2ThisTranslatorMap()
|
||||||
{
|
{
|
||||||
if (mTable)
|
if (mTable)
|
||||||
JS_DHashTableDestroy(mTable);
|
PL_DHashTableDestroy(mTable);
|
||||||
}
|
}
|
||||||
|
|
||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
|
|
||||||
JSDHashNumber
|
PLDHashNumber
|
||||||
XPCNativeScriptableSharedMap::Entry::Hash(JSDHashTable *table, const void *key)
|
XPCNativeScriptableSharedMap::Entry::Hash(PLDHashTable *table, const void *key)
|
||||||
{
|
{
|
||||||
JSDHashNumber h;
|
PLDHashNumber h;
|
||||||
const unsigned char *s;
|
const unsigned char *s;
|
||||||
|
|
||||||
XPCNativeScriptableShared* obj =
|
XPCNativeScriptableShared* obj =
|
||||||
|
@ -515,15 +515,15 @@ XPCNativeScriptableSharedMap::Entry::Hash(JSDHashTable *table, const void *key)
|
||||||
// bitmap since it's very rare that it's different when flags and classname
|
// bitmap since it's very rare that it's different when flags and classname
|
||||||
// are the same.
|
// are the same.
|
||||||
|
|
||||||
h = (JSDHashNumber) obj->GetFlags();
|
h = (PLDHashNumber) obj->GetFlags();
|
||||||
for (s = (const unsigned char*) obj->GetJSClass()->name; *s != '\0'; s++)
|
for (s = (const unsigned char*) obj->GetJSClass()->name; *s != '\0'; s++)
|
||||||
h = JS_ROTATE_LEFT32(h, 4) ^ *s;
|
h = JS_ROTATE_LEFT32(h, 4) ^ *s;
|
||||||
return h;
|
return h;
|
||||||
}
|
}
|
||||||
|
|
||||||
JSBool
|
bool
|
||||||
XPCNativeScriptableSharedMap::Entry::Match(JSDHashTable *table,
|
XPCNativeScriptableSharedMap::Entry::Match(PLDHashTable *table,
|
||||||
const JSDHashEntryHdr *entry,
|
const PLDHashEntryHdr *entry,
|
||||||
const void *key)
|
const void *key)
|
||||||
{
|
{
|
||||||
XPCNativeScriptableShared* obj1 =
|
XPCNativeScriptableShared* obj1 =
|
||||||
|
@ -547,15 +547,15 @@ XPCNativeScriptableSharedMap::Entry::Match(JSDHashTable *table,
|
||||||
return 0 == strcmp(name1, name2);
|
return 0 == strcmp(name1, name2);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct JSDHashTableOps XPCNativeScriptableSharedMap::Entry::sOps =
|
struct PLDHashTableOps XPCNativeScriptableSharedMap::Entry::sOps =
|
||||||
{
|
{
|
||||||
JS_DHashAllocTable,
|
PL_DHashAllocTable,
|
||||||
JS_DHashFreeTable,
|
PL_DHashFreeTable,
|
||||||
Hash,
|
Hash,
|
||||||
Match,
|
Match,
|
||||||
JS_DHashMoveEntryStub,
|
PL_DHashMoveEntryStub,
|
||||||
JS_DHashClearEntryStub,
|
PL_DHashClearEntryStub,
|
||||||
JS_DHashFinalizeStub
|
PL_DHashFinalizeStub
|
||||||
};
|
};
|
||||||
|
|
||||||
// static
|
// static
|
||||||
|
@ -572,13 +572,13 @@ XPCNativeScriptableSharedMap::newMap(int size)
|
||||||
|
|
||||||
XPCNativeScriptableSharedMap::XPCNativeScriptableSharedMap(int size)
|
XPCNativeScriptableSharedMap::XPCNativeScriptableSharedMap(int size)
|
||||||
{
|
{
|
||||||
mTable = JS_NewDHashTable(&Entry::sOps, nullptr, sizeof(Entry), size);
|
mTable = PL_NewDHashTable(&Entry::sOps, nullptr, sizeof(Entry), size);
|
||||||
}
|
}
|
||||||
|
|
||||||
XPCNativeScriptableSharedMap::~XPCNativeScriptableSharedMap()
|
XPCNativeScriptableSharedMap::~XPCNativeScriptableSharedMap()
|
||||||
{
|
{
|
||||||
if (mTable)
|
if (mTable)
|
||||||
JS_DHashTableDestroy(mTable);
|
PL_DHashTableDestroy(mTable);
|
||||||
}
|
}
|
||||||
|
|
||||||
JSBool
|
JSBool
|
||||||
|
@ -592,7 +592,7 @@ XPCNativeScriptableSharedMap::GetNewOrUsed(uint32_t flags,
|
||||||
|
|
||||||
XPCNativeScriptableShared key(flags, name, interfacesBitmap);
|
XPCNativeScriptableShared key(flags, name, interfacesBitmap);
|
||||||
Entry* entry = (Entry*)
|
Entry* entry = (Entry*)
|
||||||
JS_DHashTableOperate(mTable, &key, JS_DHASH_ADD);
|
PL_DHashTableOperate(mTable, &key, PL_DHASH_ADD);
|
||||||
if (!entry)
|
if (!entry)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -626,14 +626,14 @@ XPCWrappedNativeProtoMap::newMap(int size)
|
||||||
|
|
||||||
XPCWrappedNativeProtoMap::XPCWrappedNativeProtoMap(int size)
|
XPCWrappedNativeProtoMap::XPCWrappedNativeProtoMap(int size)
|
||||||
{
|
{
|
||||||
mTable = JS_NewDHashTable(JS_DHashGetStubOps(), nullptr,
|
mTable = PL_NewDHashTable(PL_DHashGetStubOps(), nullptr,
|
||||||
sizeof(JSDHashEntryStub), size);
|
sizeof(PLDHashEntryStub), size);
|
||||||
}
|
}
|
||||||
|
|
||||||
XPCWrappedNativeProtoMap::~XPCWrappedNativeProtoMap()
|
XPCWrappedNativeProtoMap::~XPCWrappedNativeProtoMap()
|
||||||
{
|
{
|
||||||
if (mTable)
|
if (mTable)
|
||||||
JS_DHashTableDestroy(mTable);
|
PL_DHashTableDestroy(mTable);
|
||||||
}
|
}
|
||||||
|
|
||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
|
|
||||||
// Note that most of the declarations for hash table entries begin with
|
// Note that most of the declarations for hash table entries begin with
|
||||||
// a pointer to something or another. This makes them look enough like
|
// a pointer to something or another. This makes them look enough like
|
||||||
// the JSDHashEntryStub struct that the default OPs (JS_DHashGetStubOps())
|
// the PLDHashEntryStub struct that the default OPs (PL_DHashGetStubOps())
|
||||||
// just do the right thing for most of our needs.
|
// just do the right thing for most of our needs.
|
||||||
|
|
||||||
// no virtuals in the maps - all the common stuff inlined
|
// no virtuals in the maps - all the common stuff inlined
|
||||||
|
@ -85,7 +85,7 @@ private:
|
||||||
class Native2WrappedNativeMap
|
class Native2WrappedNativeMap
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
struct Entry : public JSDHashEntryHdr
|
struct Entry : public PLDHashEntryHdr
|
||||||
{
|
{
|
||||||
nsISupports* key;
|
nsISupports* key;
|
||||||
XPCWrappedNative* value;
|
XPCWrappedNative* value;
|
||||||
|
@ -97,8 +97,8 @@ public:
|
||||||
{
|
{
|
||||||
NS_PRECONDITION(Obj,"bad param");
|
NS_PRECONDITION(Obj,"bad param");
|
||||||
Entry* entry = (Entry*)
|
Entry* entry = (Entry*)
|
||||||
JS_DHashTableOperate(mTable, Obj, JS_DHASH_LOOKUP);
|
PL_DHashTableOperate(mTable, Obj, PL_DHASH_LOOKUP);
|
||||||
if (JS_DHASH_ENTRY_IS_FREE(entry))
|
if (PL_DHASH_ENTRY_IS_FREE(entry))
|
||||||
return nullptr;
|
return nullptr;
|
||||||
return entry->value;
|
return entry->value;
|
||||||
}
|
}
|
||||||
|
@ -109,7 +109,7 @@ public:
|
||||||
nsISupports* obj = wrapper->GetIdentityObject();
|
nsISupports* obj = wrapper->GetIdentityObject();
|
||||||
MOZ_ASSERT(!Find(obj), "wrapper already in new scope!");
|
MOZ_ASSERT(!Find(obj), "wrapper already in new scope!");
|
||||||
Entry* entry = (Entry*)
|
Entry* entry = (Entry*)
|
||||||
JS_DHashTableOperate(mTable, obj, JS_DHASH_ADD);
|
PL_DHashTableOperate(mTable, obj, PL_DHASH_ADD);
|
||||||
if (!entry)
|
if (!entry)
|
||||||
return nullptr;
|
return nullptr;
|
||||||
if (entry->key)
|
if (entry->key)
|
||||||
|
@ -129,12 +129,12 @@ public:
|
||||||
"nsISupports identity! This will most likely cause serious "
|
"nsISupports identity! This will most likely cause serious "
|
||||||
"problems!");
|
"problems!");
|
||||||
#endif
|
#endif
|
||||||
JS_DHashTableOperate(mTable, wrapper->GetIdentityObject(), JS_DHASH_REMOVE);
|
PL_DHashTableOperate(mTable, wrapper->GetIdentityObject(), PL_DHASH_REMOVE);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline uint32_t Count() {return mTable->entryCount;}
|
inline uint32_t Count() {return mTable->entryCount;}
|
||||||
inline uint32_t Enumerate(JSDHashEnumerator f, void *arg)
|
inline uint32_t Enumerate(PLDHashEnumerator f, void *arg)
|
||||||
{return JS_DHashTableEnumerate(mTable, f, arg);}
|
{return PL_DHashTableEnumerate(mTable, f, arg);}
|
||||||
|
|
||||||
size_t SizeOfIncludingThis(nsMallocSizeOfFun mallocSizeOf);
|
size_t SizeOfIncludingThis(nsMallocSizeOfFun mallocSizeOf);
|
||||||
|
|
||||||
|
@ -143,10 +143,10 @@ private:
|
||||||
Native2WrappedNativeMap(); // no implementation
|
Native2WrappedNativeMap(); // no implementation
|
||||||
Native2WrappedNativeMap(int size);
|
Native2WrappedNativeMap(int size);
|
||||||
|
|
||||||
static size_t SizeOfEntryExcludingThis(JSDHashEntryHdr *hdr, JSMallocSizeOfFun mallocSizeOf, void *);
|
static size_t SizeOfEntryExcludingThis(PLDHashEntryHdr *hdr, JSMallocSizeOfFun mallocSizeOf, void *);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
JSDHashTable *mTable;
|
PLDHashTable *mTable;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*************************/
|
/*************************/
|
||||||
|
@ -154,12 +154,12 @@ private:
|
||||||
class IID2WrappedJSClassMap
|
class IID2WrappedJSClassMap
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
struct Entry : public JSDHashEntryHdr
|
struct Entry : public PLDHashEntryHdr
|
||||||
{
|
{
|
||||||
const nsIID* key;
|
const nsIID* key;
|
||||||
nsXPCWrappedJSClass* value;
|
nsXPCWrappedJSClass* value;
|
||||||
|
|
||||||
static struct JSDHashTableOps sOps;
|
static struct PLDHashTableOps sOps;
|
||||||
};
|
};
|
||||||
|
|
||||||
static IID2WrappedJSClassMap* newMap(int size);
|
static IID2WrappedJSClassMap* newMap(int size);
|
||||||
|
@ -167,8 +167,8 @@ public:
|
||||||
inline nsXPCWrappedJSClass* Find(REFNSIID iid)
|
inline nsXPCWrappedJSClass* Find(REFNSIID iid)
|
||||||
{
|
{
|
||||||
Entry* entry = (Entry*)
|
Entry* entry = (Entry*)
|
||||||
JS_DHashTableOperate(mTable, &iid, JS_DHASH_LOOKUP);
|
PL_DHashTableOperate(mTable, &iid, PL_DHASH_LOOKUP);
|
||||||
if (JS_DHASH_ENTRY_IS_FREE(entry))
|
if (PL_DHASH_ENTRY_IS_FREE(entry))
|
||||||
return nullptr;
|
return nullptr;
|
||||||
return entry->value;
|
return entry->value;
|
||||||
}
|
}
|
||||||
|
@ -178,7 +178,7 @@ public:
|
||||||
NS_PRECONDITION(clazz,"bad param");
|
NS_PRECONDITION(clazz,"bad param");
|
||||||
const nsIID* iid = &clazz->GetIID();
|
const nsIID* iid = &clazz->GetIID();
|
||||||
Entry* entry = (Entry*)
|
Entry* entry = (Entry*)
|
||||||
JS_DHashTableOperate(mTable, iid, JS_DHASH_ADD);
|
PL_DHashTableOperate(mTable, iid, PL_DHASH_ADD);
|
||||||
if (!entry)
|
if (!entry)
|
||||||
return nullptr;
|
return nullptr;
|
||||||
if (entry->key)
|
if (entry->key)
|
||||||
|
@ -191,19 +191,19 @@ public:
|
||||||
inline void Remove(nsXPCWrappedJSClass* clazz)
|
inline void Remove(nsXPCWrappedJSClass* clazz)
|
||||||
{
|
{
|
||||||
NS_PRECONDITION(clazz,"bad param");
|
NS_PRECONDITION(clazz,"bad param");
|
||||||
JS_DHashTableOperate(mTable, &clazz->GetIID(), JS_DHASH_REMOVE);
|
PL_DHashTableOperate(mTable, &clazz->GetIID(), PL_DHASH_REMOVE);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline uint32_t Count() {return mTable->entryCount;}
|
inline uint32_t Count() {return mTable->entryCount;}
|
||||||
inline uint32_t Enumerate(JSDHashEnumerator f, void *arg)
|
inline uint32_t Enumerate(PLDHashEnumerator f, void *arg)
|
||||||
{return JS_DHashTableEnumerate(mTable, f, arg);}
|
{return PL_DHashTableEnumerate(mTable, f, arg);}
|
||||||
|
|
||||||
~IID2WrappedJSClassMap();
|
~IID2WrappedJSClassMap();
|
||||||
private:
|
private:
|
||||||
IID2WrappedJSClassMap(); // no implementation
|
IID2WrappedJSClassMap(); // no implementation
|
||||||
IID2WrappedJSClassMap(int size);
|
IID2WrappedJSClassMap(int size);
|
||||||
private:
|
private:
|
||||||
JSDHashTable *mTable;
|
PLDHashTable *mTable;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*************************/
|
/*************************/
|
||||||
|
@ -211,12 +211,12 @@ private:
|
||||||
class IID2NativeInterfaceMap
|
class IID2NativeInterfaceMap
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
struct Entry : public JSDHashEntryHdr
|
struct Entry : public PLDHashEntryHdr
|
||||||
{
|
{
|
||||||
const nsIID* key;
|
const nsIID* key;
|
||||||
XPCNativeInterface* value;
|
XPCNativeInterface* value;
|
||||||
|
|
||||||
static struct JSDHashTableOps sOps;
|
static struct PLDHashTableOps sOps;
|
||||||
};
|
};
|
||||||
|
|
||||||
static IID2NativeInterfaceMap* newMap(int size);
|
static IID2NativeInterfaceMap* newMap(int size);
|
||||||
|
@ -224,8 +224,8 @@ public:
|
||||||
inline XPCNativeInterface* Find(REFNSIID iid)
|
inline XPCNativeInterface* Find(REFNSIID iid)
|
||||||
{
|
{
|
||||||
Entry* entry = (Entry*)
|
Entry* entry = (Entry*)
|
||||||
JS_DHashTableOperate(mTable, &iid, JS_DHASH_LOOKUP);
|
PL_DHashTableOperate(mTable, &iid, PL_DHASH_LOOKUP);
|
||||||
if (JS_DHASH_ENTRY_IS_FREE(entry))
|
if (PL_DHASH_ENTRY_IS_FREE(entry))
|
||||||
return nullptr;
|
return nullptr;
|
||||||
return entry->value;
|
return entry->value;
|
||||||
}
|
}
|
||||||
|
@ -235,7 +235,7 @@ public:
|
||||||
NS_PRECONDITION(iface,"bad param");
|
NS_PRECONDITION(iface,"bad param");
|
||||||
const nsIID* iid = iface->GetIID();
|
const nsIID* iid = iface->GetIID();
|
||||||
Entry* entry = (Entry*)
|
Entry* entry = (Entry*)
|
||||||
JS_DHashTableOperate(mTable, iid, JS_DHASH_ADD);
|
PL_DHashTableOperate(mTable, iid, PL_DHASH_ADD);
|
||||||
if (!entry)
|
if (!entry)
|
||||||
return nullptr;
|
return nullptr;
|
||||||
if (entry->key)
|
if (entry->key)
|
||||||
|
@ -248,12 +248,12 @@ public:
|
||||||
inline void Remove(XPCNativeInterface* iface)
|
inline void Remove(XPCNativeInterface* iface)
|
||||||
{
|
{
|
||||||
NS_PRECONDITION(iface,"bad param");
|
NS_PRECONDITION(iface,"bad param");
|
||||||
JS_DHashTableOperate(mTable, iface->GetIID(), JS_DHASH_REMOVE);
|
PL_DHashTableOperate(mTable, iface->GetIID(), PL_DHASH_REMOVE);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline uint32_t Count() {return mTable->entryCount;}
|
inline uint32_t Count() {return mTable->entryCount;}
|
||||||
inline uint32_t Enumerate(JSDHashEnumerator f, void *arg)
|
inline uint32_t Enumerate(PLDHashEnumerator f, void *arg)
|
||||||
{return JS_DHashTableEnumerate(mTable, f, arg);}
|
{return PL_DHashTableEnumerate(mTable, f, arg);}
|
||||||
|
|
||||||
size_t SizeOfIncludingThis(nsMallocSizeOfFun mallocSizeOf);
|
size_t SizeOfIncludingThis(nsMallocSizeOfFun mallocSizeOf);
|
||||||
|
|
||||||
|
@ -262,10 +262,10 @@ private:
|
||||||
IID2NativeInterfaceMap(); // no implementation
|
IID2NativeInterfaceMap(); // no implementation
|
||||||
IID2NativeInterfaceMap(int size);
|
IID2NativeInterfaceMap(int size);
|
||||||
|
|
||||||
static size_t SizeOfEntryExcludingThis(JSDHashEntryHdr *hdr, JSMallocSizeOfFun mallocSizeOf, void *);
|
static size_t SizeOfEntryExcludingThis(PLDHashEntryHdr *hdr, JSMallocSizeOfFun mallocSizeOf, void *);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
JSDHashTable *mTable;
|
PLDHashTable *mTable;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*************************/
|
/*************************/
|
||||||
|
@ -273,7 +273,7 @@ private:
|
||||||
class ClassInfo2NativeSetMap
|
class ClassInfo2NativeSetMap
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
struct Entry : public JSDHashEntryHdr
|
struct Entry : public PLDHashEntryHdr
|
||||||
{
|
{
|
||||||
nsIClassInfo* key;
|
nsIClassInfo* key;
|
||||||
XPCNativeSet* value;
|
XPCNativeSet* value;
|
||||||
|
@ -284,8 +284,8 @@ public:
|
||||||
inline XPCNativeSet* Find(nsIClassInfo* info)
|
inline XPCNativeSet* Find(nsIClassInfo* info)
|
||||||
{
|
{
|
||||||
Entry* entry = (Entry*)
|
Entry* entry = (Entry*)
|
||||||
JS_DHashTableOperate(mTable, info, JS_DHASH_LOOKUP);
|
PL_DHashTableOperate(mTable, info, PL_DHASH_LOOKUP);
|
||||||
if (JS_DHASH_ENTRY_IS_FREE(entry))
|
if (PL_DHASH_ENTRY_IS_FREE(entry))
|
||||||
return nullptr;
|
return nullptr;
|
||||||
return entry->value;
|
return entry->value;
|
||||||
}
|
}
|
||||||
|
@ -294,7 +294,7 @@ public:
|
||||||
{
|
{
|
||||||
NS_PRECONDITION(info,"bad param");
|
NS_PRECONDITION(info,"bad param");
|
||||||
Entry* entry = (Entry*)
|
Entry* entry = (Entry*)
|
||||||
JS_DHashTableOperate(mTable, info, JS_DHASH_ADD);
|
PL_DHashTableOperate(mTable, info, PL_DHASH_ADD);
|
||||||
if (!entry)
|
if (!entry)
|
||||||
return nullptr;
|
return nullptr;
|
||||||
if (entry->key)
|
if (entry->key)
|
||||||
|
@ -307,12 +307,12 @@ public:
|
||||||
inline void Remove(nsIClassInfo* info)
|
inline void Remove(nsIClassInfo* info)
|
||||||
{
|
{
|
||||||
NS_PRECONDITION(info,"bad param");
|
NS_PRECONDITION(info,"bad param");
|
||||||
JS_DHashTableOperate(mTable, info, JS_DHASH_REMOVE);
|
PL_DHashTableOperate(mTable, info, PL_DHASH_REMOVE);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline uint32_t Count() {return mTable->entryCount;}
|
inline uint32_t Count() {return mTable->entryCount;}
|
||||||
inline uint32_t Enumerate(JSDHashEnumerator f, void *arg)
|
inline uint32_t Enumerate(PLDHashEnumerator f, void *arg)
|
||||||
{return JS_DHashTableEnumerate(mTable, f, arg);}
|
{return PL_DHashTableEnumerate(mTable, f, arg);}
|
||||||
|
|
||||||
// ClassInfo2NativeSetMap holds pointers to *some* XPCNativeSets.
|
// ClassInfo2NativeSetMap holds pointers to *some* XPCNativeSets.
|
||||||
// So we don't want to count those XPCNativeSets, because they are better
|
// So we don't want to count those XPCNativeSets, because they are better
|
||||||
|
@ -325,7 +325,7 @@ private:
|
||||||
ClassInfo2NativeSetMap(); // no implementation
|
ClassInfo2NativeSetMap(); // no implementation
|
||||||
ClassInfo2NativeSetMap(int size);
|
ClassInfo2NativeSetMap(int size);
|
||||||
private:
|
private:
|
||||||
JSDHashTable *mTable;
|
PLDHashTable *mTable;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*************************/
|
/*************************/
|
||||||
|
@ -333,7 +333,7 @@ private:
|
||||||
class ClassInfo2WrappedNativeProtoMap
|
class ClassInfo2WrappedNativeProtoMap
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
struct Entry : public JSDHashEntryHdr
|
struct Entry : public PLDHashEntryHdr
|
||||||
{
|
{
|
||||||
nsIClassInfo* key;
|
nsIClassInfo* key;
|
||||||
XPCWrappedNativeProto* value;
|
XPCWrappedNativeProto* value;
|
||||||
|
@ -344,8 +344,8 @@ public:
|
||||||
inline XPCWrappedNativeProto* Find(nsIClassInfo* info)
|
inline XPCWrappedNativeProto* Find(nsIClassInfo* info)
|
||||||
{
|
{
|
||||||
Entry* entry = (Entry*)
|
Entry* entry = (Entry*)
|
||||||
JS_DHashTableOperate(mTable, info, JS_DHASH_LOOKUP);
|
PL_DHashTableOperate(mTable, info, PL_DHASH_LOOKUP);
|
||||||
if (JS_DHASH_ENTRY_IS_FREE(entry))
|
if (PL_DHASH_ENTRY_IS_FREE(entry))
|
||||||
return nullptr;
|
return nullptr;
|
||||||
return entry->value;
|
return entry->value;
|
||||||
}
|
}
|
||||||
|
@ -354,7 +354,7 @@ public:
|
||||||
{
|
{
|
||||||
NS_PRECONDITION(info,"bad param");
|
NS_PRECONDITION(info,"bad param");
|
||||||
Entry* entry = (Entry*)
|
Entry* entry = (Entry*)
|
||||||
JS_DHashTableOperate(mTable, info, JS_DHASH_ADD);
|
PL_DHashTableOperate(mTable, info, PL_DHASH_ADD);
|
||||||
if (!entry)
|
if (!entry)
|
||||||
return nullptr;
|
return nullptr;
|
||||||
if (entry->key)
|
if (entry->key)
|
||||||
|
@ -367,12 +367,12 @@ public:
|
||||||
inline void Remove(nsIClassInfo* info)
|
inline void Remove(nsIClassInfo* info)
|
||||||
{
|
{
|
||||||
NS_PRECONDITION(info,"bad param");
|
NS_PRECONDITION(info,"bad param");
|
||||||
JS_DHashTableOperate(mTable, info, JS_DHASH_REMOVE);
|
PL_DHashTableOperate(mTable, info, PL_DHASH_REMOVE);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline uint32_t Count() {return mTable->entryCount;}
|
inline uint32_t Count() {return mTable->entryCount;}
|
||||||
inline uint32_t Enumerate(JSDHashEnumerator f, void *arg)
|
inline uint32_t Enumerate(PLDHashEnumerator f, void *arg)
|
||||||
{return JS_DHashTableEnumerate(mTable, f, arg);}
|
{return PL_DHashTableEnumerate(mTable, f, arg);}
|
||||||
|
|
||||||
size_t SizeOfIncludingThis(nsMallocSizeOfFun mallocSizeOf);
|
size_t SizeOfIncludingThis(nsMallocSizeOfFun mallocSizeOf);
|
||||||
|
|
||||||
|
@ -381,10 +381,10 @@ private:
|
||||||
ClassInfo2WrappedNativeProtoMap(); // no implementation
|
ClassInfo2WrappedNativeProtoMap(); // no implementation
|
||||||
ClassInfo2WrappedNativeProtoMap(int size);
|
ClassInfo2WrappedNativeProtoMap(int size);
|
||||||
|
|
||||||
static size_t SizeOfEntryExcludingThis(JSDHashEntryHdr *hdr, JSMallocSizeOfFun mallocSizeOf, void *);
|
static size_t SizeOfEntryExcludingThis(PLDHashEntryHdr *hdr, JSMallocSizeOfFun mallocSizeOf, void *);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
JSDHashTable *mTable;
|
PLDHashTable *mTable;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*************************/
|
/*************************/
|
||||||
|
@ -392,16 +392,16 @@ private:
|
||||||
class NativeSetMap
|
class NativeSetMap
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
struct Entry : public JSDHashEntryHdr
|
struct Entry : public PLDHashEntryHdr
|
||||||
{
|
{
|
||||||
XPCNativeSet* key_value;
|
XPCNativeSet* key_value;
|
||||||
|
|
||||||
static JSBool
|
static bool
|
||||||
Match(JSDHashTable *table,
|
Match(PLDHashTable *table,
|
||||||
const JSDHashEntryHdr *entry,
|
const PLDHashEntryHdr *entry,
|
||||||
const void *key);
|
const void *key);
|
||||||
|
|
||||||
static struct JSDHashTableOps sOps;
|
static struct PLDHashTableOps sOps;
|
||||||
};
|
};
|
||||||
|
|
||||||
static NativeSetMap* newMap(int size);
|
static NativeSetMap* newMap(int size);
|
||||||
|
@ -409,8 +409,8 @@ public:
|
||||||
inline XPCNativeSet* Find(XPCNativeSetKey* key)
|
inline XPCNativeSet* Find(XPCNativeSetKey* key)
|
||||||
{
|
{
|
||||||
Entry* entry = (Entry*)
|
Entry* entry = (Entry*)
|
||||||
JS_DHashTableOperate(mTable, key, JS_DHASH_LOOKUP);
|
PL_DHashTableOperate(mTable, key, PL_DHASH_LOOKUP);
|
||||||
if (JS_DHASH_ENTRY_IS_FREE(entry))
|
if (PL_DHASH_ENTRY_IS_FREE(entry))
|
||||||
return nullptr;
|
return nullptr;
|
||||||
return entry->key_value;
|
return entry->key_value;
|
||||||
}
|
}
|
||||||
|
@ -420,7 +420,7 @@ public:
|
||||||
NS_PRECONDITION(key,"bad param");
|
NS_PRECONDITION(key,"bad param");
|
||||||
NS_PRECONDITION(set,"bad param");
|
NS_PRECONDITION(set,"bad param");
|
||||||
Entry* entry = (Entry*)
|
Entry* entry = (Entry*)
|
||||||
JS_DHashTableOperate(mTable, key, JS_DHASH_ADD);
|
PL_DHashTableOperate(mTable, key, PL_DHASH_ADD);
|
||||||
if (!entry)
|
if (!entry)
|
||||||
return nullptr;
|
return nullptr;
|
||||||
if (entry->key_value)
|
if (entry->key_value)
|
||||||
|
@ -440,12 +440,12 @@ public:
|
||||||
NS_PRECONDITION(set,"bad param");
|
NS_PRECONDITION(set,"bad param");
|
||||||
|
|
||||||
XPCNativeSetKey key(set, nullptr, 0);
|
XPCNativeSetKey key(set, nullptr, 0);
|
||||||
JS_DHashTableOperate(mTable, &key, JS_DHASH_REMOVE);
|
PL_DHashTableOperate(mTable, &key, PL_DHASH_REMOVE);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline uint32_t Count() {return mTable->entryCount;}
|
inline uint32_t Count() {return mTable->entryCount;}
|
||||||
inline uint32_t Enumerate(JSDHashEnumerator f, void *arg)
|
inline uint32_t Enumerate(PLDHashEnumerator f, void *arg)
|
||||||
{return JS_DHashTableEnumerate(mTable, f, arg);}
|
{return PL_DHashTableEnumerate(mTable, f, arg);}
|
||||||
|
|
||||||
size_t SizeOfIncludingThis(nsMallocSizeOfFun mallocSizeOf);
|
size_t SizeOfIncludingThis(nsMallocSizeOfFun mallocSizeOf);
|
||||||
|
|
||||||
|
@ -454,10 +454,10 @@ private:
|
||||||
NativeSetMap(); // no implementation
|
NativeSetMap(); // no implementation
|
||||||
NativeSetMap(int size);
|
NativeSetMap(int size);
|
||||||
|
|
||||||
static size_t SizeOfEntryExcludingThis(JSDHashEntryHdr *hdr, JSMallocSizeOfFun mallocSizeOf, void *);
|
static size_t SizeOfEntryExcludingThis(PLDHashEntryHdr *hdr, JSMallocSizeOfFun mallocSizeOf, void *);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
JSDHashTable *mTable;
|
PLDHashTable *mTable;
|
||||||
};
|
};
|
||||||
|
|
||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
|
@ -465,20 +465,20 @@ private:
|
||||||
class IID2ThisTranslatorMap
|
class IID2ThisTranslatorMap
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
struct Entry : public JSDHashEntryHdr
|
struct Entry : public PLDHashEntryHdr
|
||||||
{
|
{
|
||||||
nsIID key;
|
nsIID key;
|
||||||
nsIXPCFunctionThisTranslator* value;
|
nsIXPCFunctionThisTranslator* value;
|
||||||
|
|
||||||
static JSBool
|
static bool
|
||||||
Match(JSDHashTable *table,
|
Match(PLDHashTable *table,
|
||||||
const JSDHashEntryHdr *entry,
|
const PLDHashEntryHdr *entry,
|
||||||
const void *key);
|
const void *key);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
Clear(JSDHashTable *table, JSDHashEntryHdr *entry);
|
Clear(PLDHashTable *table, PLDHashEntryHdr *entry);
|
||||||
|
|
||||||
static struct JSDHashTableOps sOps;
|
static struct PLDHashTableOps sOps;
|
||||||
};
|
};
|
||||||
|
|
||||||
static IID2ThisTranslatorMap* newMap(int size);
|
static IID2ThisTranslatorMap* newMap(int size);
|
||||||
|
@ -486,8 +486,8 @@ public:
|
||||||
inline nsIXPCFunctionThisTranslator* Find(REFNSIID iid)
|
inline nsIXPCFunctionThisTranslator* Find(REFNSIID iid)
|
||||||
{
|
{
|
||||||
Entry* entry = (Entry*)
|
Entry* entry = (Entry*)
|
||||||
JS_DHashTableOperate(mTable, &iid, JS_DHASH_LOOKUP);
|
PL_DHashTableOperate(mTable, &iid, PL_DHASH_LOOKUP);
|
||||||
if (JS_DHASH_ENTRY_IS_FREE(entry))
|
if (PL_DHASH_ENTRY_IS_FREE(entry))
|
||||||
return nullptr;
|
return nullptr;
|
||||||
return entry->value;
|
return entry->value;
|
||||||
}
|
}
|
||||||
|
@ -497,7 +497,7 @@ public:
|
||||||
{
|
{
|
||||||
|
|
||||||
Entry* entry = (Entry*)
|
Entry* entry = (Entry*)
|
||||||
JS_DHashTableOperate(mTable, &iid, JS_DHASH_ADD);
|
PL_DHashTableOperate(mTable, &iid, PL_DHASH_ADD);
|
||||||
if (!entry)
|
if (!entry)
|
||||||
return nullptr;
|
return nullptr;
|
||||||
NS_IF_ADDREF(obj);
|
NS_IF_ADDREF(obj);
|
||||||
|
@ -509,19 +509,19 @@ public:
|
||||||
|
|
||||||
inline void Remove(REFNSIID iid)
|
inline void Remove(REFNSIID iid)
|
||||||
{
|
{
|
||||||
JS_DHashTableOperate(mTable, &iid, JS_DHASH_REMOVE);
|
PL_DHashTableOperate(mTable, &iid, PL_DHASH_REMOVE);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline uint32_t Count() {return mTable->entryCount;}
|
inline uint32_t Count() {return mTable->entryCount;}
|
||||||
inline uint32_t Enumerate(JSDHashEnumerator f, void *arg)
|
inline uint32_t Enumerate(PLDHashEnumerator f, void *arg)
|
||||||
{return JS_DHashTableEnumerate(mTable, f, arg);}
|
{return PL_DHashTableEnumerate(mTable, f, arg);}
|
||||||
|
|
||||||
~IID2ThisTranslatorMap();
|
~IID2ThisTranslatorMap();
|
||||||
private:
|
private:
|
||||||
IID2ThisTranslatorMap(); // no implementation
|
IID2ThisTranslatorMap(); // no implementation
|
||||||
IID2ThisTranslatorMap(int size);
|
IID2ThisTranslatorMap(int size);
|
||||||
private:
|
private:
|
||||||
JSDHashTable *mTable;
|
PLDHashTable *mTable;
|
||||||
};
|
};
|
||||||
|
|
||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
|
@ -529,19 +529,19 @@ private:
|
||||||
class XPCNativeScriptableSharedMap
|
class XPCNativeScriptableSharedMap
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
struct Entry : public JSDHashEntryHdr
|
struct Entry : public PLDHashEntryHdr
|
||||||
{
|
{
|
||||||
XPCNativeScriptableShared* key;
|
XPCNativeScriptableShared* key;
|
||||||
|
|
||||||
static JSDHashNumber
|
static PLDHashNumber
|
||||||
Hash(JSDHashTable *table, const void *key);
|
Hash(PLDHashTable *table, const void *key);
|
||||||
|
|
||||||
static JSBool
|
static bool
|
||||||
Match(JSDHashTable *table,
|
Match(PLDHashTable *table,
|
||||||
const JSDHashEntryHdr *entry,
|
const PLDHashEntryHdr *entry,
|
||||||
const void *key);
|
const void *key);
|
||||||
|
|
||||||
static struct JSDHashTableOps sOps;
|
static struct PLDHashTableOps sOps;
|
||||||
};
|
};
|
||||||
|
|
||||||
static XPCNativeScriptableSharedMap* newMap(int size);
|
static XPCNativeScriptableSharedMap* newMap(int size);
|
||||||
|
@ -550,15 +550,15 @@ public:
|
||||||
XPCNativeScriptableInfo* si);
|
XPCNativeScriptableInfo* si);
|
||||||
|
|
||||||
inline uint32_t Count() {return mTable->entryCount;}
|
inline uint32_t Count() {return mTable->entryCount;}
|
||||||
inline uint32_t Enumerate(JSDHashEnumerator f, void *arg)
|
inline uint32_t Enumerate(PLDHashEnumerator f, void *arg)
|
||||||
{return JS_DHashTableEnumerate(mTable, f, arg);}
|
{return PL_DHashTableEnumerate(mTable, f, arg);}
|
||||||
|
|
||||||
~XPCNativeScriptableSharedMap();
|
~XPCNativeScriptableSharedMap();
|
||||||
private:
|
private:
|
||||||
XPCNativeScriptableSharedMap(); // no implementation
|
XPCNativeScriptableSharedMap(); // no implementation
|
||||||
XPCNativeScriptableSharedMap(int size);
|
XPCNativeScriptableSharedMap(int size);
|
||||||
private:
|
private:
|
||||||
JSDHashTable *mTable;
|
PLDHashTable *mTable;
|
||||||
};
|
};
|
||||||
|
|
||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
|
@ -571,8 +571,8 @@ public:
|
||||||
inline XPCWrappedNativeProto* Add(XPCWrappedNativeProto* proto)
|
inline XPCWrappedNativeProto* Add(XPCWrappedNativeProto* proto)
|
||||||
{
|
{
|
||||||
NS_PRECONDITION(proto,"bad param");
|
NS_PRECONDITION(proto,"bad param");
|
||||||
JSDHashEntryStub* entry = (JSDHashEntryStub*)
|
PLDHashEntryStub* entry = (PLDHashEntryStub*)
|
||||||
JS_DHashTableOperate(mTable, proto, JS_DHASH_ADD);
|
PL_DHashTableOperate(mTable, proto, PL_DHASH_ADD);
|
||||||
if (!entry)
|
if (!entry)
|
||||||
return nullptr;
|
return nullptr;
|
||||||
if (entry->key)
|
if (entry->key)
|
||||||
|
@ -584,19 +584,19 @@ public:
|
||||||
inline void Remove(XPCWrappedNativeProto* proto)
|
inline void Remove(XPCWrappedNativeProto* proto)
|
||||||
{
|
{
|
||||||
NS_PRECONDITION(proto,"bad param");
|
NS_PRECONDITION(proto,"bad param");
|
||||||
JS_DHashTableOperate(mTable, proto, JS_DHASH_REMOVE);
|
PL_DHashTableOperate(mTable, proto, PL_DHASH_REMOVE);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline uint32_t Count() {return mTable->entryCount;}
|
inline uint32_t Count() {return mTable->entryCount;}
|
||||||
inline uint32_t Enumerate(JSDHashEnumerator f, void *arg)
|
inline uint32_t Enumerate(PLDHashEnumerator f, void *arg)
|
||||||
{return JS_DHashTableEnumerate(mTable, f, arg);}
|
{return PL_DHashTableEnumerate(mTable, f, arg);}
|
||||||
|
|
||||||
~XPCWrappedNativeProtoMap();
|
~XPCWrappedNativeProtoMap();
|
||||||
private:
|
private:
|
||||||
XPCWrappedNativeProtoMap(); // no implementation
|
XPCWrappedNativeProtoMap(); // no implementation
|
||||||
XPCWrappedNativeProtoMap(int size);
|
XPCWrappedNativeProtoMap(int size);
|
||||||
private:
|
private:
|
||||||
JSDHashTable *mTable;
|
PLDHashTable *mTable;
|
||||||
};
|
};
|
||||||
|
|
||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
|
|
|
@ -324,15 +324,15 @@ XPCWrappedNativeScope::~XPCWrappedNativeScope()
|
||||||
mGlobalJSObject.finalize(rt);
|
mGlobalJSObject.finalize(rt);
|
||||||
}
|
}
|
||||||
|
|
||||||
static JSDHashOperator
|
static PLDHashOperator
|
||||||
WrappedNativeJSGCThingTracer(JSDHashTable *table, JSDHashEntryHdr *hdr,
|
WrappedNativeJSGCThingTracer(PLDHashTable *table, PLDHashEntryHdr *hdr,
|
||||||
uint32_t number, void *arg)
|
uint32_t number, void *arg)
|
||||||
{
|
{
|
||||||
XPCWrappedNative* wrapper = ((Native2WrappedNativeMap::Entry*)hdr)->value;
|
XPCWrappedNative* wrapper = ((Native2WrappedNativeMap::Entry*)hdr)->value;
|
||||||
if (wrapper->HasExternalReference() && !wrapper->IsWrapperExpired())
|
if (wrapper->HasExternalReference() && !wrapper->IsWrapperExpired())
|
||||||
wrapper->TraceSelf((JSTracer *)arg);
|
wrapper->TraceSelf((JSTracer *)arg);
|
||||||
|
|
||||||
return JS_DHASH_NEXT;
|
return PL_DHASH_NEXT;
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
|
@ -354,8 +354,8 @@ XPCWrappedNativeScope::TraceWrappedNativesInAllScopes(JSTracer* trc, XPCJSRuntim
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static JSDHashOperator
|
static PLDHashOperator
|
||||||
WrappedNativeSuspecter(JSDHashTable *table, JSDHashEntryHdr *hdr,
|
WrappedNativeSuspecter(PLDHashTable *table, PLDHashEntryHdr *hdr,
|
||||||
uint32_t number, void *arg)
|
uint32_t number, void *arg)
|
||||||
{
|
{
|
||||||
XPCWrappedNative* wrapper = ((Native2WrappedNativeMap::Entry*)hdr)->value;
|
XPCWrappedNative* wrapper = ((Native2WrappedNativeMap::Entry*)hdr)->value;
|
||||||
|
@ -366,7 +366,7 @@ WrappedNativeSuspecter(JSDHashTable *table, JSDHashEntryHdr *hdr,
|
||||||
XPCJSRuntime::SuspectWrappedNative(wrapper, *cb);
|
XPCJSRuntime::SuspectWrappedNative(wrapper, *cb);
|
||||||
}
|
}
|
||||||
|
|
||||||
return JS_DHASH_NEXT;
|
return PL_DHASH_NEXT;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -447,22 +447,22 @@ XPCWrappedNativeScope::FinishedFinalizationPhaseOfGC()
|
||||||
KillDyingScopes();
|
KillDyingScopes();
|
||||||
}
|
}
|
||||||
|
|
||||||
static JSDHashOperator
|
static PLDHashOperator
|
||||||
WrappedNativeMarker(JSDHashTable *table, JSDHashEntryHdr *hdr,
|
WrappedNativeMarker(PLDHashTable *table, PLDHashEntryHdr *hdr,
|
||||||
uint32_t number_t, void *arg)
|
uint32_t number_t, void *arg)
|
||||||
{
|
{
|
||||||
((Native2WrappedNativeMap::Entry*)hdr)->value->Mark();
|
((Native2WrappedNativeMap::Entry*)hdr)->value->Mark();
|
||||||
return JS_DHASH_NEXT;
|
return PL_DHASH_NEXT;
|
||||||
}
|
}
|
||||||
|
|
||||||
// We need to explicitly mark all the protos too because some protos may be
|
// We need to explicitly mark all the protos too because some protos may be
|
||||||
// alive in the hashtable but not currently in use by any wrapper
|
// alive in the hashtable but not currently in use by any wrapper
|
||||||
static JSDHashOperator
|
static PLDHashOperator
|
||||||
WrappedNativeProtoMarker(JSDHashTable *table, JSDHashEntryHdr *hdr,
|
WrappedNativeProtoMarker(PLDHashTable *table, PLDHashEntryHdr *hdr,
|
||||||
uint32_t number, void *arg)
|
uint32_t number, void *arg)
|
||||||
{
|
{
|
||||||
((ClassInfo2WrappedNativeProtoMap::Entry*)hdr)->value->Mark();
|
((ClassInfo2WrappedNativeProtoMap::Entry*)hdr)->value->Mark();
|
||||||
return JS_DHASH_NEXT;
|
return PL_DHASH_NEXT;
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
|
@ -479,20 +479,20 @@ XPCWrappedNativeScope::MarkAllWrappedNativesAndProtos()
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
static JSDHashOperator
|
static PLDHashOperator
|
||||||
ASSERT_WrappedNativeSetNotMarked(JSDHashTable *table, JSDHashEntryHdr *hdr,
|
ASSERT_WrappedNativeSetNotMarked(PLDHashTable *table, PLDHashEntryHdr *hdr,
|
||||||
uint32_t number, void *arg)
|
uint32_t number, void *arg)
|
||||||
{
|
{
|
||||||
((Native2WrappedNativeMap::Entry*)hdr)->value->ASSERT_SetsNotMarked();
|
((Native2WrappedNativeMap::Entry*)hdr)->value->ASSERT_SetsNotMarked();
|
||||||
return JS_DHASH_NEXT;
|
return PL_DHASH_NEXT;
|
||||||
}
|
}
|
||||||
|
|
||||||
static JSDHashOperator
|
static PLDHashOperator
|
||||||
ASSERT_WrappedNativeProtoSetNotMarked(JSDHashTable *table, JSDHashEntryHdr *hdr,
|
ASSERT_WrappedNativeProtoSetNotMarked(PLDHashTable *table, PLDHashEntryHdr *hdr,
|
||||||
uint32_t number, void *arg)
|
uint32_t number, void *arg)
|
||||||
{
|
{
|
||||||
((ClassInfo2WrappedNativeProtoMap::Entry*)hdr)->value->ASSERT_SetNotMarked();
|
((ClassInfo2WrappedNativeProtoMap::Entry*)hdr)->value->ASSERT_SetNotMarked();
|
||||||
return JS_DHASH_NEXT;
|
return PL_DHASH_NEXT;
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
|
@ -507,12 +507,12 @@ XPCWrappedNativeScope::ASSERT_NoInterfaceSetsAreMarked()
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static JSDHashOperator
|
static PLDHashOperator
|
||||||
WrappedNativeTearoffSweeper(JSDHashTable *table, JSDHashEntryHdr *hdr,
|
WrappedNativeTearoffSweeper(PLDHashTable *table, PLDHashEntryHdr *hdr,
|
||||||
uint32_t number, void *arg)
|
uint32_t number, void *arg)
|
||||||
{
|
{
|
||||||
((Native2WrappedNativeMap::Entry*)hdr)->value->SweepTearOffs();
|
((Native2WrappedNativeMap::Entry*)hdr)->value->SweepTearOffs();
|
||||||
return JS_DHASH_NEXT;
|
return PL_DHASH_NEXT;
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
|
@ -548,8 +548,8 @@ struct ShutdownData
|
||||||
int protoCount;
|
int protoCount;
|
||||||
};
|
};
|
||||||
|
|
||||||
static JSDHashOperator
|
static PLDHashOperator
|
||||||
WrappedNativeShutdownEnumerator(JSDHashTable *table, JSDHashEntryHdr *hdr,
|
WrappedNativeShutdownEnumerator(PLDHashTable *table, PLDHashEntryHdr *hdr,
|
||||||
uint32_t number, void *arg)
|
uint32_t number, void *arg)
|
||||||
{
|
{
|
||||||
ShutdownData* data = (ShutdownData*) arg;
|
ShutdownData* data = (ShutdownData*) arg;
|
||||||
|
@ -559,18 +559,18 @@ WrappedNativeShutdownEnumerator(JSDHashTable *table, JSDHashEntryHdr *hdr,
|
||||||
wrapper->SystemIsBeingShutDown();
|
wrapper->SystemIsBeingShutDown();
|
||||||
data->wrapperCount++;
|
data->wrapperCount++;
|
||||||
}
|
}
|
||||||
return JS_DHASH_REMOVE;
|
return PL_DHASH_REMOVE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static JSDHashOperator
|
static PLDHashOperator
|
||||||
WrappedNativeProtoShutdownEnumerator(JSDHashTable *table, JSDHashEntryHdr *hdr,
|
WrappedNativeProtoShutdownEnumerator(PLDHashTable *table, PLDHashEntryHdr *hdr,
|
||||||
uint32_t number, void *arg)
|
uint32_t number, void *arg)
|
||||||
{
|
{
|
||||||
ShutdownData* data = (ShutdownData*) arg;
|
ShutdownData* data = (ShutdownData*) arg;
|
||||||
((ClassInfo2WrappedNativeProtoMap::Entry*)hdr)->value->
|
((ClassInfo2WrappedNativeProtoMap::Entry*)hdr)->value->
|
||||||
SystemIsBeingShutDown();
|
SystemIsBeingShutDown();
|
||||||
data->protoCount++;
|
data->protoCount++;
|
||||||
return JS_DHASH_REMOVE;
|
return PL_DHASH_REMOVE;
|
||||||
}
|
}
|
||||||
|
|
||||||
//static
|
//static
|
||||||
|
@ -636,14 +636,14 @@ XPCWrappedNativeScope::SystemIsBeingShutDown()
|
||||||
|
|
||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
|
|
||||||
static JSDHashOperator
|
static PLDHashOperator
|
||||||
WNProtoSecPolicyClearer(JSDHashTable *table, JSDHashEntryHdr *hdr,
|
WNProtoSecPolicyClearer(PLDHashTable *table, PLDHashEntryHdr *hdr,
|
||||||
uint32_t number, void *arg)
|
uint32_t number, void *arg)
|
||||||
{
|
{
|
||||||
XPCWrappedNativeProto* proto =
|
XPCWrappedNativeProto* proto =
|
||||||
((ClassInfo2WrappedNativeProtoMap::Entry*)hdr)->value;
|
((ClassInfo2WrappedNativeProtoMap::Entry*)hdr)->value;
|
||||||
*(proto->GetSecurityInfoAddr()) = nullptr;
|
*(proto->GetSecurityInfoAddr()) = nullptr;
|
||||||
return JS_DHASH_NEXT;
|
return PL_DHASH_NEXT;
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
|
@ -663,8 +663,8 @@ XPCWrappedNativeScope::ClearAllWrappedNativeSecurityPolicies()
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static JSDHashOperator
|
static PLDHashOperator
|
||||||
WNProtoRemover(JSDHashTable *table, JSDHashEntryHdr *hdr,
|
WNProtoRemover(PLDHashTable *table, PLDHashEntryHdr *hdr,
|
||||||
uint32_t number, void *arg)
|
uint32_t number, void *arg)
|
||||||
{
|
{
|
||||||
XPCWrappedNativeProtoMap* detachedMap = (XPCWrappedNativeProtoMap*)arg;
|
XPCWrappedNativeProtoMap* detachedMap = (XPCWrappedNativeProtoMap*)arg;
|
||||||
|
@ -674,7 +674,7 @@ WNProtoRemover(JSDHashTable *table, JSDHashEntryHdr *hdr,
|
||||||
|
|
||||||
detachedMap->Add(proto);
|
detachedMap->Add(proto);
|
||||||
|
|
||||||
return JS_DHASH_REMOVE;
|
return PL_DHASH_REMOVE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -714,19 +714,19 @@ XPCWrappedNativeScope::DebugDumpAllScopes(int16_t depth)
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
static JSDHashOperator
|
static PLDHashOperator
|
||||||
WrappedNativeMapDumpEnumerator(JSDHashTable *table, JSDHashEntryHdr *hdr,
|
WrappedNativeMapDumpEnumerator(PLDHashTable *table, PLDHashEntryHdr *hdr,
|
||||||
uint32_t number, void *arg)
|
uint32_t number, void *arg)
|
||||||
{
|
{
|
||||||
((Native2WrappedNativeMap::Entry*)hdr)->value->DebugDump(*(int16_t*)arg);
|
((Native2WrappedNativeMap::Entry*)hdr)->value->DebugDump(*(int16_t*)arg);
|
||||||
return JS_DHASH_NEXT;
|
return PL_DHASH_NEXT;
|
||||||
}
|
}
|
||||||
static JSDHashOperator
|
static PLDHashOperator
|
||||||
WrappedNativeProtoMapDumpEnumerator(JSDHashTable *table, JSDHashEntryHdr *hdr,
|
WrappedNativeProtoMapDumpEnumerator(PLDHashTable *table, PLDHashEntryHdr *hdr,
|
||||||
uint32_t number, void *arg)
|
uint32_t number, void *arg)
|
||||||
{
|
{
|
||||||
((ClassInfo2WrappedNativeProtoMap::Entry*)hdr)->value->DebugDump(*(int16_t*)arg);
|
((ClassInfo2WrappedNativeProtoMap::Entry*)hdr)->value->DebugDump(*(int16_t*)arg);
|
||||||
return JS_DHASH_NEXT;
|
return PL_DHASH_NEXT;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -725,8 +725,8 @@ nsXPConnect::ReparentWrappedNativeIfFound(JSContext * aJSContext,
|
||||||
ReparentWrapperIfFound(scope, scope2, newParent, aCOMObj);
|
ReparentWrapperIfFound(scope, scope2, newParent, aCOMObj);
|
||||||
}
|
}
|
||||||
|
|
||||||
static JSDHashOperator
|
static PLDHashOperator
|
||||||
MoveableWrapperFinder(JSDHashTable *table, JSDHashEntryHdr *hdr,
|
MoveableWrapperFinder(PLDHashTable *table, PLDHashEntryHdr *hdr,
|
||||||
uint32_t number, void *arg)
|
uint32_t number, void *arg)
|
||||||
{
|
{
|
||||||
nsTArray<nsRefPtr<XPCWrappedNative> > *array =
|
nsTArray<nsRefPtr<XPCWrappedNative> > *array =
|
||||||
|
@ -737,7 +737,7 @@ MoveableWrapperFinder(JSDHashTable *table, JSDHashEntryHdr *hdr,
|
||||||
// we don't have to move it.
|
// we don't have to move it.
|
||||||
if (!wn->IsWrapperExpired())
|
if (!wn->IsWrapperExpired())
|
||||||
array->AppendElement(wn);
|
array->AppendElement(wn);
|
||||||
return JS_DHASH_NEXT;
|
return PL_DHASH_NEXT;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* void rescueOrphansInScope(in JSContextPtr aJSContext, in JSObjectPtr aScope); */
|
/* void rescueOrphansInScope(in JSContextPtr aJSContext, in JSObjectPtr aScope); */
|
||||||
|
|
|
@ -86,8 +86,8 @@
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include "xpcpublic.h"
|
#include "xpcpublic.h"
|
||||||
#include "jsapi.h"
|
#include "jsapi.h"
|
||||||
#include "jsdhash.h"
|
|
||||||
#include "jsprf.h"
|
#include "jsprf.h"
|
||||||
|
#include "pldhash.h"
|
||||||
#include "prprf.h"
|
#include "prprf.h"
|
||||||
#include "jsdbgapi.h"
|
#include "jsdbgapi.h"
|
||||||
#include "jsfriendapi.h"
|
#include "jsfriendapi.h"
|
||||||
|
@ -816,17 +816,17 @@ public:
|
||||||
#ifdef XPC_CHECK_WRAPPERS_AT_SHUTDOWN
|
#ifdef XPC_CHECK_WRAPPERS_AT_SHUTDOWN
|
||||||
void DEBUG_AddWrappedNative(nsIXPConnectWrappedNative* wrapper)
|
void DEBUG_AddWrappedNative(nsIXPConnectWrappedNative* wrapper)
|
||||||
{XPCAutoLock lock(GetMapLock());
|
{XPCAutoLock lock(GetMapLock());
|
||||||
JSDHashEntryHdr *entry =
|
PLDHashEntryHdr *entry =
|
||||||
JS_DHashTableOperate(DEBUG_WrappedNativeHashtable,
|
PL_DHashTableOperate(DEBUG_WrappedNativeHashtable,
|
||||||
wrapper, JS_DHASH_ADD);
|
wrapper, PL_DHASH_ADD);
|
||||||
if (entry) ((JSDHashEntryStub *)entry)->key = wrapper;}
|
if (entry) ((PLDHashEntryStub *)entry)->key = wrapper;}
|
||||||
|
|
||||||
void DEBUG_RemoveWrappedNative(nsIXPConnectWrappedNative* wrapper)
|
void DEBUG_RemoveWrappedNative(nsIXPConnectWrappedNative* wrapper)
|
||||||
{XPCAutoLock lock(GetMapLock());
|
{XPCAutoLock lock(GetMapLock());
|
||||||
JS_DHashTableOperate(DEBUG_WrappedNativeHashtable,
|
PL_DHashTableOperate(DEBUG_WrappedNativeHashtable,
|
||||||
wrapper, JS_DHASH_REMOVE);}
|
wrapper, PL_DHASH_REMOVE);}
|
||||||
private:
|
private:
|
||||||
JSDHashTable* DEBUG_WrappedNativeHashtable;
|
PLDHashTable* DEBUG_WrappedNativeHashtable;
|
||||||
public:
|
public:
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче