Disable Ion in debug mode (bug 684029, r=jorendorff).
authorDavid Anderson <danderson@mozilla.com>
Thu, 08 Sep 2011 18:02:37 -0700
changeset 77171 9738af4a0433
parent 77170 4129e39cffcd
child 77172 607459b18af7
push id195
push userdanderson@mozilla.com
push date2011-09-09 01:04 +0000
reviewersjorendorff
bugs684029
milestone9.0a1
Disable Ion in debug mode (bug 684029, r=jorendorff).
js/src/ion/Ion.cpp
--- a/js/src/ion/Ion.cpp
+++ b/js/src/ion/Ion.cpp
@@ -553,16 +553,21 @@ CheckFrame(StackFrame *fp)
     return true;
 }
 
 MethodStatus
 ion::Compile(JSContext *cx, JSScript *script, js::StackFrame *fp)
 {
     JS_ASSERT(ion::IsEnabled());
 
+    if (cx->compartment->debugMode()) {
+        IonSpew(IonSpew_Abort, "debugging");
+        return Method_CantCompile;
+    }
+
     if (!CheckFrame(fp))
         return Method_CantCompile;
 
     if (script->ion) {
         if (script->ion == ION_DISABLED_SCRIPT || !script->ion->method())
             return Method_CantCompile;
 
         return Method_Compiled;