Address review comments from dvander (bug 672829 comment 17).
authorJason Orendorff <jorendorff@mozilla.com>
Thu, 21 Jul 2011 15:46:04 -0500
changeset 75222 6ff6297bebb6e4271a936bd92d7cbd53fc297d3a
parent 75221 349dd52835b8254937cde9d68b86dc0d3d0e4c7e
child 75223 1af365c2b3fc7341f23d43acbeee3f662ad41fb7
push id2
push userbsmedberg@mozilla.com
push dateFri, 19 Aug 2011 14:38:13 +0000
bugs672829
milestone8.0a1
Address review comments from dvander (bug 672829 comment 17).
js/src/jsscript.cpp
--- a/js/src/jsscript.cpp
+++ b/js/src/jsscript.cpp
@@ -1228,17 +1228,17 @@ JSScript::NewScriptFromCG(JSContext *cx,
         if ((cg->flags & TCF_NEED_SCRIPT_OBJECT) && !js_NewScriptObject(cx, script))
             goto bad;
     }
 
     /* Tell the debugger about this compiled script. */
     js_CallNewScriptHook(cx, script, fun);
     if (!cg->parent) {
         Debugger::onNewScript(cx, script,
-                              fun ? fun : script->u.object ? script->u.object : cg->scopeChain(),
+                              fun ? fun : (script->u.object ? script->u.object : cg->scopeChain()),
                               (fun || script->u.object)
                               ? Debugger::NewHeldScript
                               : Debugger::NewNonHeldScript);
     }
 
     return script;
 
 bad: