Bug 1119753 - Fix CPOW GC crash (r=jonco)

This commit is contained in:
Bill McCloskey
2015-01-16 09:56:30 -08:00
parent 17ab7f34d2
commit 15acb49389
4 changed files with 35 additions and 6 deletions

View File

@@ -73,6 +73,18 @@ IdToObjectMap::remove(ObjectId id)
table_.remove(id);
}
void
IdToObjectMap::clear()
{
table_.clear();
}
bool
IdToObjectMap::empty() const
{
return table_.empty();
}
ObjectToIdMap::ObjectToIdMap()
: table_(nullptr)
{
@@ -157,6 +169,12 @@ ObjectToIdMap::remove(JSObject *obj)
table_->remove(obj);
}
void
ObjectToIdMap::clear()
{
table_->clear();
}
bool JavaScriptShared::sLoggingInitialized;
bool JavaScriptShared::sLoggingEnabled;
bool JavaScriptShared::sStackLoggingEnabled;
@@ -181,6 +199,11 @@ JavaScriptShared::JavaScriptShared(JSRuntime *rt)
}
}
JavaScriptShared::~JavaScriptShared()
{
MOZ_RELEASE_ASSERT(cpows_.empty());
}
bool
JavaScriptShared::init()
{