Bug 341499: The assert in js_NewGCThing about not running GC now takes into account that we allow allocation from close hooks. r=mrbkap

This commit is contained in:
igor.bukanov%gmail.com 2006-06-15 10:42:57 +00:00
parent e43c76eb9d
commit 5c77935888

View File

@ -820,8 +820,8 @@ js_NewGCThing(JSContext *cx, uintN flags, size_t nbytes)
rt->gcMallocBytes += localMallocBytes;
}
#endif
JS_ASSERT(!rt->gcRunning);
if (rt->gcRunning) {
JS_ASSERT(!rt->gcRunning || rt->gcClosePhase);
if (rt->gcRunning && !rt->gcClosePhase) {
METER(rt->gcStats.finalfail++);
JS_UNLOCK_GC(rt);
return NULL;