Bug 1222087: Part 1 - Fix ignoring of exceptions in blackboxed code. r?fitzgen
MozReview-Commit-ID: vtu1ou4ueT
--- a/devtools/server/actors/script.js
+++ b/devtools/server/actors/script.js
@@ -1842,19 +1842,19 @@ ThreadActor.prototype = {
}
}
if (willBeCaught && this._options.ignoreCaughtExceptions) {
return undefined;
}
const generatedLocation = this.sources.getFrameLocation(aFrame);
- const { sourceActor } = this.unsafeSynchronize(this.sources.getOriginalLocation(
+ const { originalSourceActor } = this.unsafeSynchronize(this.sources.getOriginalLocation(
generatedLocation));
- const url = sourceActor ? sourceActor.url : null;
+ const url = originalSourceActor ? originalSourceActor.url : null;
if (this.sources.isBlackBoxed(url)) {
return undefined;
}
try {
let packet = this._paused(aFrame);
if (!packet) {
--- a/devtools/server/tests/unit/test_blackboxing-05.js
+++ b/devtools/server/tests/unit/test_blackboxing-05.js
@@ -68,17 +68,17 @@ function test_black_box_exception() {
do_check_true(!error, "Should not get an error: " + error);
let sourceClient = gThreadClient.source(sources.filter(s => s.url == BLACK_BOXED_URL)[0]);
sourceClient.blackBox(function ({error}) {
do_check_true(!error, "Should not get an error: " + error);
gThreadClient.pauseOnExceptions(true);
gClient.addOneTimeListener("paused", function (aEvent, aPacket) {
- do_check_neq(aPacket.frame.where.url, BLACK_BOXED_URL,
- "We shouldn't pause while in the black boxed source.");
+ do_check_eq(aPacket.frame.where.source.url, SOURCE_URL,
+ "We shouldn't pause while in the black boxed source.");
finishClient(gClient);
});
gThreadClient.resume();
});
});
}