Bug 1280257 - Reset non-pending breakpoints when tab is reloaded with source maps disabled;r=jryans

This commit is contained in:
Eddy Bruel 2016-07-01 15:19:25 +02:00
Родитель d71d400a4a
Коммит 44e1776918
1 изменённых файлов: 8 добавлений и 7 удалений

Просмотреть файл

@ -1985,14 +1985,11 @@ const ThreadActor = ActorClassWithSpec(threadSpec, {
} else { } else {
promises.push(this.sources.getAllGeneratedLocations(actor.originalLocation) promises.push(this.sources.getAllGeneratedLocations(actor.originalLocation)
.then((generatedLocations) => { .then((generatedLocations) => {
if (generatedLocations.length > 0 && if (generatedLocations.length > 0 &&
generatedLocations[0].generatedSourceActor.actorID === sourceActor.actorID) { generatedLocations[0].generatedSourceActor.actorID === sourceActor.actorID) {
sourceActor._setBreakpointAtAllGeneratedLocations( sourceActor._setBreakpointAtAllGeneratedLocations(actor, generatedLocations);
actor, }
generatedLocations }));
);
}
}));
} }
} }
@ -2015,6 +2012,10 @@ const ThreadActor = ActorClassWithSpec(threadSpec, {
for (let actor of bpActors) { for (let actor of bpActors) {
if (actor.isPending) { if (actor.isPending) {
actor.originalLocation.originalSourceActor._setBreakpoint(actor); actor.originalLocation.originalSourceActor._setBreakpoint(actor);
} else {
actor.originalLocation.originalSourceActor._setBreakpointAtGeneratedLocation(
actor, GeneratedLocation.fromOriginalLocation(actor.originalLocation)
);
} }
} }
} }