Bug 1142115 - remove for/of scoping workaround; r=bgrins,jryans
authorTom Tromey <tom@tromey.com>
Wed, 31 May 2017 13:00:19 -0600
changeset 410465 64af9e5dd9e148dd2b8392d233025a596193ae41
parent 410464 0595e5ad5cb45b4de9489b22c494dfb5c247a7d3
child 410466 0ec65d58e0ae4baf5e7ba1c47ea7b56bd03d2272
push id7391
push usermtabara@mozilla.com
push dateMon, 12 Jun 2017 13:08:53 +0000
treeherdermozilla-beta@2191d7f87e2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbgrins, jryans
bugs1142115
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1142115 - remove for/of scoping workaround; r=bgrins,jryans MozReview-Commit-ID: IVUDJPpshSl
devtools/server/actors/script.js
--- a/devtools/server/actors/script.js
+++ b/devtools/server/actors/script.js
@@ -1956,21 +1956,17 @@ const ThreadActor = ActorClassWithSpec(t
         // this call will replace the previous set of source actors for this source
         // with a new one. If the source actors have not been replaced by the time
         // we try to reset the breakpoints below, their location objects will still
         // point to the old set of source actors, which point to different
         // scripts.
         this.unsafeSynchronize(sourceActorsCreated);
       }
 
-      for (let _actor of bpActors) {
-        // XXX bug 1142115: We do async work in here, so we need to create a fresh
-        // binding because for/of does not yet do that in SpiderMonkey.
-        let actor = _actor;
-
+      for (const actor of bpActors) {
         if (actor.isPending) {
           promises.push(actor.originalLocation.originalSourceActor._setBreakpoint(actor));
         } else {
           promises.push(
             this.sources.getAllGeneratedLocations(actor.originalLocation).then(
               (generatedLocations) => {
                 if (generatedLocations.length > 0 &&
                     generatedLocations[0].generatedSourceActor