Bug 1269457 - Only set breakpoints for pending bp actors. r=ejpbruel, a=sylvestre
authorJ. Ryan Stinnett <jryans@gmail.com>
Tue, 31 May 2016 16:05:39 -0500
changeset 333209 085544676bf8767d1f9218873af8e3900df8e8fc
parent 333208 832d04327aa03bfb9f2ab329eeff01a3d883d3a0
child 333210 d52c5d23e08d21ae05a9146d5220c0daa728c3a7
push id6048
push userkmoir@mozilla.com
push dateMon, 06 Jun 2016 19:02:08 +0000
treeherdermozilla-beta@46d72a56c57d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersejpbruel, sylvestre
bugs1269457, 1225160
milestone48.0a2
Bug 1269457 - Only set breakpoints for pending bp actors. r=ejpbruel, a=sylvestre 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
devtools/server/actors/script.js
--- a/devtools/server/actors/script.js
+++ b/devtools/server/actors/script.js
@@ -2010,17 +2010,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;
   },