Bug 1269457 - Only set breakpoints for pending bp actors. r=ejpbruel
The special code path carved out in
bug 1225160 dropped the `actor.isPending`
check which causes many, many attempts to set a breakpoint on every new source
notification, leading to a very slow debugging experience.
MozReview-Commit-ID: A3pnHzh5eeh
--- a/devtools/server/actors/script.js
+++ b/devtools/server/actors/script.js
@@ -2009,17 +2009,19 @@ const ThreadActor = ActorClass({
// has not completed yet.
//
// The root of the problem is that unsafeSynchronize can cause debuggee
// code to run. Unfortunately, fixing that is prohibitively difficult. The
// best we can do at the moment is disable source maps for the browser
// debugger, and carefully avoid the use of unsafeSynchronize in this
// function when source maps are disabled.
for (let actor of bpActors) {
- actor.originalLocation.originalSourceActor._setBreakpoint(actor);
+ if (actor.isPending) {
+ actor.originalLocation.originalSourceActor._setBreakpoint(actor);
+ }
}
}
this._debuggerSourcesSeen.add(aSource);
return true;
},