Bug 760342 - Check explicitly for mis-use of HashTable::Enum; r=luke
If a user does removeFront or rekeyFront on an Enum, then continues to use it, it will fail, potentially randomly. This patch makes the failure explicit in debug builds.
This commit is contained in:
@@ -187,7 +187,6 @@ class WeakMap : public HashMap<Key, Value, HashPolicy, RuntimeAllocPolicy>, publ
|
||||
markedAny = true;
|
||||
e.rekeyFront(k);
|
||||
}
|
||||
JS_ASSERT_IF(keyIsMarked, gc::IsMarked(&e.front().value));
|
||||
}
|
||||
return markedAny;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user