зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1300830 - Remove XPCJSRuntime::mDetachedWrappedNativeProtoMap. r=mrbkap
Nothing is ever added to this hash table. MozReview-Commit-ID: 7gmlBZKNPOc --HG-- extra : rebase_source : 9a14e405facedc8148c5dd8e363f98c691e23231
This commit is contained in:
Родитель
b8a3b8da7a
Коммит
ac4b6dabc5
|
@ -790,11 +790,6 @@ XPCJSContext::FinalizeCallback(JSFreeOp* fop,
|
|||
// Do the marking...
|
||||
XPCWrappedNativeScope::MarkAllWrappedNativesAndProtos();
|
||||
|
||||
for (auto i = self->mDetachedWrappedNativeProtoMap->Iter(); !i.Done(); i.Next()) {
|
||||
auto entry = static_cast<XPCWrappedNativeProtoMap::Entry*>(i.Get());
|
||||
static_cast<const XPCWrappedNativeProto*>(entry->key)->Mark();
|
||||
}
|
||||
|
||||
// Mark the sets used in the call contexts. There is a small
|
||||
// chance that a wrapper's set will change *while* a call is
|
||||
// happening which uses that wrapper's old interfface set. So,
|
||||
|
@ -1495,15 +1490,6 @@ CompartmentPrivate::SizeOfIncludingThis(MallocSizeOf mallocSizeOf)
|
|||
|
||||
/***************************************************************************/
|
||||
|
||||
void XPCJSContext::SystemIsBeingShutDown()
|
||||
{
|
||||
for (auto i = mDetachedWrappedNativeProtoMap->Iter(); !i.Done(); i.Next()) {
|
||||
auto entry = static_cast<XPCWrappedNativeProtoMap::Entry*>(i.Get());
|
||||
auto proto = const_cast<XPCWrappedNativeProto*>(static_cast<const XPCWrappedNativeProto*>(entry->key));
|
||||
proto->SystemIsBeingShutDown();
|
||||
}
|
||||
}
|
||||
|
||||
#define JS_OPTIONS_DOT_STR "javascript.options."
|
||||
|
||||
static void
|
||||
|
@ -1644,9 +1630,6 @@ XPCJSContext::~XPCJSContext()
|
|||
delete mDyingWrappedNativeProtoMap;
|
||||
mDyingWrappedNativeProtoMap = nullptr;
|
||||
|
||||
delete mDetachedWrappedNativeProtoMap;
|
||||
mDetachedWrappedNativeProtoMap = nullptr;
|
||||
|
||||
#ifdef MOZ_ENABLE_PROFILER_SPS
|
||||
// Tell the profiler that the context is gone
|
||||
if (PseudoStack* stack = mozilla_get_pseudo_stack())
|
||||
|
@ -3318,7 +3301,6 @@ XPCJSContext::XPCJSContext()
|
|||
mThisTranslatorMap(IID2ThisTranslatorMap::newMap(XPC_THIS_TRANSLATOR_MAP_LENGTH)),
|
||||
mNativeScriptableSharedMap(XPCNativeScriptableSharedMap::newMap(XPC_NATIVE_JSCLASS_MAP_LENGTH)),
|
||||
mDyingWrappedNativeProtoMap(XPCWrappedNativeProtoMap::newMap(XPC_DYING_NATIVE_PROTO_MAP_LENGTH)),
|
||||
mDetachedWrappedNativeProtoMap(XPCWrappedNativeProtoMap::newMap(XPC_DETACHED_NATIVE_PROTO_MAP_LENGTH)),
|
||||
mGCIsRunning(false),
|
||||
mNativesToReleaseArray(),
|
||||
mDoingFinalization(false),
|
||||
|
|
|
@ -122,7 +122,6 @@ XPCWrappedNativeProto::JSProtoObjectFinalized(js::FreeOp* fop, JSObject* obj)
|
|||
if (map->Find(mClassInfo) == this)
|
||||
map->Remove(mClassInfo);
|
||||
|
||||
GetContext()->GetDetachedWrappedNativeProtoMap()->Remove(this);
|
||||
GetContext()->GetDyingWrappedNativeProtoMap()->Add(this);
|
||||
|
||||
mJSProtoObject.finalize(js::CastToJSFreeOp(fop)->runtime());
|
||||
|
|
|
@ -83,7 +83,6 @@ nsXPConnect::~nsXPConnect()
|
|||
|
||||
mShuttingDown = true;
|
||||
XPCWrappedNativeScope::SystemIsBeingShutDown();
|
||||
mContext->SystemIsBeingShutDown();
|
||||
|
||||
// The above causes us to clean up a bunch of XPConnect data structures,
|
||||
// after which point we need to GC to clean everything up. We need to do
|
||||
|
|
|
@ -178,7 +178,6 @@
|
|||
#define XPC_NATIVE_MAP_LENGTH 8
|
||||
#define XPC_NATIVE_PROTO_MAP_LENGTH 8
|
||||
#define XPC_DYING_NATIVE_PROTO_MAP_LENGTH 8
|
||||
#define XPC_DETACHED_NATIVE_PROTO_MAP_LENGTH 16
|
||||
#define XPC_NATIVE_INTERFACE_MAP_LENGTH 32
|
||||
#define XPC_NATIVE_SET_MAP_LENGTH 32
|
||||
#define XPC_NATIVE_JSCLASS_MAP_LENGTH 16
|
||||
|
@ -455,9 +454,6 @@ public:
|
|||
XPCWrappedNativeProtoMap* GetDyingWrappedNativeProtoMap() const
|
||||
{return mDyingWrappedNativeProtoMap;}
|
||||
|
||||
XPCWrappedNativeProtoMap* GetDetachedWrappedNativeProtoMap() const
|
||||
{return mDetachedWrappedNativeProtoMap;}
|
||||
|
||||
bool JSContextInitialized(JSContext* cx);
|
||||
|
||||
virtual bool
|
||||
|
@ -565,8 +561,6 @@ public:
|
|||
|
||||
void DebugDump(int16_t depth);
|
||||
|
||||
void SystemIsBeingShutDown();
|
||||
|
||||
bool GCIsRunning() const {return mGCIsRunning;}
|
||||
|
||||
~XPCJSContext();
|
||||
|
@ -619,7 +613,6 @@ private:
|
|||
IID2ThisTranslatorMap* mThisTranslatorMap;
|
||||
XPCNativeScriptableSharedMap* mNativeScriptableSharedMap;
|
||||
XPCWrappedNativeProtoMap* mDyingWrappedNativeProtoMap;
|
||||
XPCWrappedNativeProtoMap* mDetachedWrappedNativeProtoMap;
|
||||
bool mGCIsRunning;
|
||||
nsTArray<nsISupports*> mNativesToReleaseArray;
|
||||
bool mDoingFinalization;
|
||||
|
|
Загрузка…
Ссылка в новой задаче