Don't try to recompile scripts when clearing traps during GC, bug 683966.
authorBrian Hackett <bhackett1024@gmail.com>
Sun, 04 Sep 2011 13:33:33 -0700
changeset 77891 aa9f4b139e389262a9e3fcd0583aefe62b20b986
parent 77890 77e9502bd20f3c61a639f6533535a4f763b8d792
child 77892 de64e5ce70bcefff9df456c9e6e7153d2b608afa
push id78
push userclegnitto@mozilla.com
push dateFri, 16 Dec 2011 17:32:24 +0000
treeherdermozilla-release@79d24e644fdd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs683966
milestone9.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Don't try to recompile scripts when clearing traps during GC, bug 683966.
js/src/vm/Debugger.cpp
--- a/js/src/vm/Debugger.cpp
+++ b/js/src/vm/Debugger.cpp
@@ -220,17 +220,20 @@ BreakpointSite::clearTrap(JSContext *cx,
         *handlerp = trapHandler;
     if (closurep)
         *closurep = trapClosure;
 
     trapHandler = NULL;
     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);
     }
 }
 
 void
 BreakpointSite::destroyIfEmpty(JSRuntime *rt, BreakpointSiteMap::Enum *e)
 {
     if (JS_CLIST_IS_EMPTY(&breakpoints) && !trapHandler) {