Bug 1352430 - Add barrier to CPOWs table to remove dying objects r=billm

This commit is contained in:
Jon Coppeard
2017-04-26 11:18:53 +01:00
parent 48dadf1863
commit d60b70fa01
3 changed files with 33 additions and 6 deletions

View File

@@ -173,14 +173,14 @@ class JavaScriptShared : public CPOWManager
static void ConvertID(const nsID& from, JSIID* to);
static void ConvertID(const JSIID& from, nsID* to);
JSObject* findCPOWById(const ObjectId& objId) {
return cpows_.find(objId);
}
JSObject* findCPOWById(const ObjectId& objId);
JSObject* findCPOWByIdPreserveColor(const ObjectId& objId);
JSObject* findObjectById(JSContext* cx, const ObjectId& objId);
#ifdef DEBUG
bool hasCPOW(const ObjectId& objId, const JSObject* obj) {
return cpows_.has(objId, obj);
MOZ_ASSERT(obj);
return findCPOWByIdPreserveColor(objId) == obj;
}
#endif