Tighten an assertion in Debugger::onNewScript.
authorJason Orendorff <jorendorff@mozilla.com>
Thu, 07 Jul 2011 17:54:44 -0500
changeset 74504 75ec0d2c2c1fcd1873ea998309b425d105a97cd9
parent 74503 53d431ddc5ac1ea56d9221fa29a4154c13ab553b
child 74505 2e006cccde9f5b6b2b42049bb4d2a01cfc832d84
push id2
push userbsmedberg@mozilla.com
push dateFri, 19 Aug 2011 14:38:13 +0000
milestone7.0a1
Tighten an assertion in Debugger::onNewScript.
js/src/jsdbg.h
--- a/js/src/jsdbg.h
+++ b/js/src/jsdbg.h
@@ -442,17 +442,17 @@ Debugger::onThrow(JSContext *cx, js::Val
            : dispatchHook(cx, vp,
                           DebuggerObservesMethod(&Debugger::observesThrow),
                           DebuggerHandleMethod(&Debugger::handleThrow));
 }
 
 void
 Debugger::onNewScript(JSContext *cx, JSScript *script, JSObject *obj, NewScriptKind kind)
 {
-    JS_ASSERT_IF(kind == NewNonHeldScript && script->compileAndGo, obj);
+    JS_ASSERT_IF(kind == NewHeldScript || script->compileAndGo, obj);
     if (!script->compartment->getDebuggees().empty())
         slowPathOnNewScript(cx, script, obj, kind);
 }
 
 void
 Debugger::onDestroyScript(JSScript *script)
 {
     if (!script->compartment->getDebuggees().empty())