Bug 674171: Delete hasDebugModeCodeToDrop, it is scratched^Wunused. r=jorendorff
authorJim Blandy <jimb@mozilla.com>
Fri, 02 Mar 2012 12:12:13 -0800
changeset 88161 b46cc7472de6ec50ec556cc0f1c885b5dc4657a0
parent 88160 7546dd13db9dfa9a7d78ffb9797d7be3917067f3
child 88162 73f1b9d271a5a0b6ae73e0550866f73debce948c
push id22173
push userbmo@edmorley.co.uk
push dateSat, 03 Mar 2012 13:14:42 +0000
treeherdermozilla-central@ed57abebd328 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjorendorff
bugs674171
milestone13.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
Bug 674171: Delete hasDebugModeCodeToDrop, it is scratched^Wunused. r=jorendorff I had a hard time writing a test case for this, so I gave up.
js/src/jscompartment.cpp
js/src/jscompartment.h
--- a/js/src/jscompartment.cpp
+++ b/js/src/jscompartment.cpp
@@ -75,17 +75,16 @@ JSCompartment::JSCompartment(JSRuntime *
     needsBarrier_(false),
     gcBytes(0),
     gcTriggerBytes(0),
     gcLastBytes(0),
     hold(false),
     typeLifoAlloc(TYPE_LIFO_ALLOC_PRIMARY_CHUNK_SIZE),
     data(NULL),
     active(false),
-    hasDebugModeCodeToDrop(false),
 #ifdef JS_METHODJIT
     jaegerCompartment_(NULL),
 #endif
     regExps(rt),
     propertyTree(thisForCtor()),
     emptyTypeObject(NULL),
     debugModeBits(rt->debugMode ? DebugFromC : 0),
     mathCache(NULL),
@@ -671,36 +670,33 @@ JSCompartment::updateForDebugMode(JSCont
     for (ContextIter acx(rt); !acx.done(); acx.next()) {
         if (acx->compartment == this) 
             acx->updateJITEnabled();
     }
 
 #ifdef JS_METHODJIT
     bool enabled = debugMode();
 
-    if (enabled) {
+    if (enabled)
         JS_ASSERT(!hasScriptsOnStack());
-    } else if (hasScriptsOnStack()) {
-        hasDebugModeCodeToDrop = true;
+    else if (hasScriptsOnStack())
         return;
-    }
 
     /*
      * Discard JIT code and bytecode analyses for any scripts that change
      * debugMode.
      */
     for (gc::CellIter i(this, gc::FINALIZE_SCRIPT); !i.done(); i.next()) {
         JSScript *script = i.get<JSScript>();
         if (script->debugMode != enabled) {
             mjit::ReleaseScriptCode(cx, script);
             script->clearAnalysis();
             script->debugMode = enabled;
         }
     }
-    hasDebugModeCodeToDrop = false;
 #endif
 }
 
 bool
 JSCompartment::addDebuggee(JSContext *cx, js::GlobalObject *global)
 {
     bool wasEnabled = debugMode();
     if (!debuggees.put(global)) {
--- a/js/src/jscompartment.h
+++ b/js/src/jscompartment.h
@@ -225,17 +225,16 @@ struct JSCompartment
     js::types::TypeCompartment   types;
 
   public:
     /* Hashed lists of scripts created by eval to garbage-collect. */
     JSScript                     *evalCache[JS_EVAL_CACHE_SIZE];
 
     void                         *data;
     bool                         active;  // GC flag, whether there are active frames
-    bool                         hasDebugModeCodeToDrop;
     js::WrapperMap               crossCompartmentWrappers;
 
 #ifdef JS_METHODJIT
   private:
     /* This is created lazily because many compartments don't need it. */
     js::mjit::JaegerCompartment  *jaegerCompartment_;
     /*
      * This function is here so that xpconnect/src/xpcjsruntime.cpp doesn't