mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 930427 - Improve debugger weakmap assertions r=billm
This commit is contained in:
parent
1ed43c85d7
commit
511751e611
@ -78,6 +78,7 @@ class DebuggerWeakMap : private WeakMap<Key, Value, DefaultHasher<Key> >
|
||||
template<typename KeyInput, typename ValueInput>
|
||||
bool relookupOrAdd(AddPtr &p, const KeyInput &k, const ValueInput &v) {
|
||||
JS_ASSERT(v->compartment() == Base::compartment);
|
||||
JS_ASSERT(!p.found());
|
||||
if (!incZoneCount(k->zone()))
|
||||
return false;
|
||||
bool ok = Base::relookupOrAdd(p, k, v);
|
||||
@ -87,6 +88,7 @@ class DebuggerWeakMap : private WeakMap<Key, Value, DefaultHasher<Key> >
|
||||
}
|
||||
|
||||
void remove(const Lookup &l) {
|
||||
JS_ASSERT(Base::has(l));
|
||||
Base::remove(l);
|
||||
decZoneCount(l->zone());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user