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:
Terrence Cole
2012-06-01 15:41:27 -07:00
parent ac50c3bc1f
commit 816de10c5e
2 changed files with 7 additions and 3 deletions

View File

@@ -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;
}