mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 835277 part 2 - Fix hasBreakpointsAt. r=bhackett
This commit is contained in:
parent
ee7cb3966e
commit
c199d8e4e6
@ -2575,6 +2575,16 @@ JSScript::clearBreakpointsIn(FreeOp *fop, js::Debugger *dbg, RawObject handler)
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
JSScript::hasBreakpointsAt(jsbytecode *pc)
|
||||
{
|
||||
BreakpointSite *site = getBreakpointSite(pc);
|
||||
if (!site)
|
||||
return false;
|
||||
|
||||
return site->enabledCount > 0 || site->trapHandler;
|
||||
}
|
||||
|
||||
void
|
||||
JSScript::clearTraps(FreeOp *fop)
|
||||
{
|
||||
|
@ -881,7 +881,7 @@ class JSScript : public js::gc::Cell
|
||||
void destroyDebugScript(js::FreeOp *fop);
|
||||
|
||||
public:
|
||||
bool hasBreakpointsAt(jsbytecode *pc) { return !!getBreakpointSite(pc); }
|
||||
bool hasBreakpointsAt(jsbytecode *pc);
|
||||
bool hasAnyBreakpointsOrStepMode() { return hasDebugScript; }
|
||||
|
||||
js::BreakpointSite *getBreakpointSite(jsbytecode *pc)
|
||||
|
@ -249,9 +249,9 @@ BreakpointSite::recompile(FreeOp *fop)
|
||||
void
|
||||
BreakpointSite::inc(FreeOp *fop)
|
||||
{
|
||||
if (enabledCount == 0 && !trapHandler)
|
||||
recompile(fop);
|
||||
enabledCount++;
|
||||
if (enabledCount == 1 && !trapHandler)
|
||||
recompile(fop);
|
||||
}
|
||||
|
||||
void
|
||||
@ -266,10 +266,11 @@ BreakpointSite::dec(FreeOp *fop)
|
||||
void
|
||||
BreakpointSite::setTrap(FreeOp *fop, JSTrapHandler handler, const Value &closure)
|
||||
{
|
||||
if (enabledCount == 0)
|
||||
recompile(fop);
|
||||
trapHandler = handler;
|
||||
trapClosure = closure;
|
||||
|
||||
if (enabledCount == 0)
|
||||
recompile(fop);
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user