Address review comment from bhackett (bug 672829 comment 84).

This commit is contained in:
Jason Orendorff 2011-08-12 17:22:43 -05:00
parent d36ff061fa
commit b213ad1587

View File

@ -2242,6 +2242,8 @@ DebuggerScript_setBreakpoint(JSContext *cx, uintN argc, Value *vp)
JSCompartment *comp = script->compartment;
jsbytecode *pc = script->code + offset;
BreakpointSite *site = comp->getOrCreateBreakpointSite(cx, script, pc, holder);
if (!site)
return false;
if (site->inc(cx)) {
if (cx->runtime->new_<Breakpoint>(dbg, site, handler)) {
args.rval().setUndefined();