diff --git a/js/xpconnect/src/XPCWrappedJS.cpp b/js/xpconnect/src/XPCWrappedJS.cpp index e0e872fc0db6..1ee31335bb43 100644 --- a/js/xpconnect/src/XPCWrappedJS.cpp +++ b/js/xpconnect/src/XPCWrappedJS.cpp @@ -468,7 +468,7 @@ void XPCJSRuntime::AssertInvalidWrappedJSNotInTable( #ifdef DEBUG if (!wrapper->IsValid()) { MOZ_ASSERT(!GetMultiCompartmentWrappedJSMap()->HasWrapper(wrapper)); - if (!mGCIsRunning) { + if (!mGCIsRunning && !mDoingFinalization) { JSContext* cx = XPCJSContext::Get()->Context(); JS_IterateCompartments(cx, wrapper, NotHasWrapperAssertionCallback); }