Don't try to recompile scripts when clearing traps during GC, bug 683966.

This commit is contained in:
Brian Hackett 2011-09-04 13:33:33 -07:00
parent 4c2126dce8
commit 799c6dfea0

View File

@ -225,7 +225,10 @@ BreakpointSite::clearTrap(JSContext *cx, BreakpointSiteMap::Enum *e,
trapClosure.setUndefined();
if (enabledCount == 0) {
*pc = realOpcode;
recompile(cx, true); /* ignore failure */
if (!cx->runtime->gcRunning) {
/* If the GC is running then the script is being destroyed. */
recompile(cx, true); /* ignore failure */
}
destroyIfEmpty(cx->runtime, e);
}
}