Bug 911303 - Remove manual Destroy() routine from CycleCollectedJSRuntime. r=billm

This commit is contained in:
Bobby Holley
2013-11-27 10:10:25 -08:00
parent 137ce8d340
commit eb0b713adc
3 changed files with 36 additions and 33 deletions

View File

@@ -458,13 +458,9 @@ CycleCollectedJSRuntime::CycleCollectedJSRuntime(uint32_t aMaxbytes,
nsCycleCollector_registerJSRuntime(this);
}
void
CycleCollectedJSRuntime::DestroyRuntime()
CycleCollectedJSRuntime::~CycleCollectedJSRuntime()
{
if (!mJSRuntime) {
return;
}
MOZ_ASSERT(mJSRuntime);
MOZ_ASSERT(!mDeferredFinalizerTable.Count());
MOZ_ASSERT(!mDeferredSupports.Length());
@@ -476,12 +472,6 @@ CycleCollectedJSRuntime::DestroyRuntime()
nsCycleCollector_forgetJSRuntime();
}
CycleCollectedJSRuntime::~CycleCollectedJSRuntime()
{
// Destroy our runtime if the subclass hasn't done it already.
DestroyRuntime();
}
size_t
CycleCollectedJSRuntime::SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const
{