From 511751e6118fdcabd8445d16cc2cfe670fe61ef8 Mon Sep 17 00:00:00 2001 From: Jon Coppeard Date: Tue, 26 Nov 2013 10:23:32 +0000 Subject: [PATCH] Bug 930427 - Improve debugger weakmap assertions r=billm --- js/src/vm/Debugger.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/js/src/vm/Debugger.h b/js/src/vm/Debugger.h index 336d4100706..dc4c0f62224 100644 --- a/js/src/vm/Debugger.h +++ b/js/src/vm/Debugger.h @@ -78,6 +78,7 @@ class DebuggerWeakMap : private WeakMap > template 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 > } void remove(const Lookup &l) { + JS_ASSERT(Base::has(l)); Base::remove(l); decZoneCount(l->zone()); }