Bug 1142115 - remove for/of scoping workaround; r?bgrins
MozReview-Commit-ID: IVUDJPpshSl
--- 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