Bug 741005 - Remove XPCNativeWrapperMap; r=bholley

This appears to be completely unused.
This commit is contained in:
Terrence Cole 2012-03-30 15:56:35 -07:00
Родитель 77232ac305
Коммит b0a5057ce6
5 изменённых файлов: 0 добавлений и 78 удалений

Просмотреть файл

@ -81,7 +81,6 @@ class NativeSetMap;
class IID2ThisTranslatorMap;
class XPCNativeScriptableSharedMap;
class XPCWrappedNativeProtoMap;
class XPCNativeWrapperMap;
class WrappedNative2WrapperMap;
class JSObject2JSObjectMap;

Просмотреть файл

@ -1202,15 +1202,6 @@ XPCJSRuntime::~XPCJSRuntime()
delete mDetachedWrappedNativeProtoMap;
}
if (mExplicitNativeWrapperMap) {
#ifdef XPC_DUMP_AT_SHUTDOWN
uint32_t count = mExplicitNativeWrapperMap->Count();
if (count)
printf("deleting XPCJSRuntime with %d live explicit XPCNativeWrapper\n", (int)count);
#endif
delete mExplicitNativeWrapperMap;
}
if (mJSHolders.ops) {
JS_DHashTableFinish(&mJSHolders);
mJSHolders.ops = nsnull;
@ -1961,7 +1952,6 @@ XPCJSRuntime::XPCJSRuntime(nsXPConnect* aXPConnect)
mNativeScriptableSharedMap(XPCNativeScriptableSharedMap::newMap(XPC_NATIVE_JSCLASS_MAP_SIZE)),
mDyingWrappedNativeProtoMap(XPCWrappedNativeProtoMap::newMap(XPC_DYING_NATIVE_PROTO_MAP_SIZE)),
mDetachedWrappedNativeProtoMap(XPCWrappedNativeProtoMap::newMap(XPC_DETACHED_NATIVE_PROTO_MAP_SIZE)),
mExplicitNativeWrapperMap(XPCNativeWrapperMap::newMap(XPC_NATIVE_WRAPPER_MAP_SIZE)),
mMapLock(XPCAutoLock::NewLock("XPCJSRuntime::mMapLock")),
mThreadRunningGC(nsnull),
mWrappedJSToReleaseArray(),
@ -2080,7 +2070,6 @@ XPCJSRuntime::newXPCJSRuntime(nsXPConnect* aXPConnect)
self->GetThisTranslatorMap() &&
self->GetNativeScriptableSharedMap() &&
self->GetDyingWrappedNativeProtoMap() &&
self->GetExplicitNativeWrapperMap() &&
self->GetMapLock() &&
self->mWatchdogThread) {
return self;

Просмотреть файл

@ -674,32 +674,6 @@ XPCWrappedNativeProtoMap::~XPCWrappedNativeProtoMap()
JS_DHashTableDestroy(mTable);
}
/***************************************************************************/
// implement XPCNativeWrapperMap...
// static
XPCNativeWrapperMap*
XPCNativeWrapperMap::newMap(int size)
{
XPCNativeWrapperMap* map = new XPCNativeWrapperMap(size);
if (map && map->mTable)
return map;
delete map;
return nsnull;
}
XPCNativeWrapperMap::XPCNativeWrapperMap(int size)
{
mTable = JS_NewDHashTable(JS_DHashGetStubOps(), nsnull,
sizeof(JSDHashEntryStub), size);
}
XPCNativeWrapperMap::~XPCNativeWrapperMap()
{
if (mTable)
JS_DHashTableDestroy(mTable);
}
/***************************************************************************/
// implement WrappedNative2WrapperMap...

Просмотреть файл

@ -635,42 +635,6 @@ private:
JSDHashTable *mTable;
};
class XPCNativeWrapperMap
{
public:
static XPCNativeWrapperMap* newMap(int size);
inline JSObject* Add(JSObject* nw)
{
NS_PRECONDITION(nw,"bad param");
JSDHashEntryStub* entry = (JSDHashEntryStub*)
JS_DHashTableOperate(mTable, nw, JS_DHASH_ADD);
if (!entry)
return nsnull;
if (entry->key)
return (JSObject*) entry->key;
entry->key = nw;
return nw;
}
inline void Remove(JSObject* nw)
{
NS_PRECONDITION(nw,"bad param");
JS_DHashTableOperate(mTable, nw, JS_DHASH_REMOVE);
}
inline uint32_t Count() {return mTable->entryCount;}
inline uint32_t Enumerate(JSDHashEnumerator f, void *arg)
{return JS_DHashTableEnumerate(mTable, f, arg);}
~XPCNativeWrapperMap();
private:
XPCNativeWrapperMap(); // no implementation
XPCNativeWrapperMap(int size);
private:
JSDHashTable *mTable;
};
class WrappedNative2WrapperMap
{
static struct JSDHashTableOps sOps;

Просмотреть файл

@ -684,9 +684,6 @@ public:
XPCWrappedNativeProtoMap* GetDetachedWrappedNativeProtoMap() const
{return mDetachedWrappedNativeProtoMap;}
XPCNativeWrapperMap* GetExplicitNativeWrapperMap() const
{return mExplicitNativeWrapperMap;}
XPCCompartmentMap& GetCompartmentMap()
{return mCompartmentMap;}
@ -832,7 +829,6 @@ private:
XPCNativeScriptableSharedMap* mNativeScriptableSharedMap;
XPCWrappedNativeProtoMap* mDyingWrappedNativeProtoMap;
XPCWrappedNativeProtoMap* mDetachedWrappedNativeProtoMap;
XPCNativeWrapperMap* mExplicitNativeWrapperMap;
XPCCompartmentMap mCompartmentMap;
XPCLock* mMapLock;
PRThread* mThreadRunningGC;