Bug 1222087: Part 1 - Fix ignoring of exceptions in blackboxed code. r?fitzgen draft
authorKris Maglione <maglione.k@gmail.com>
Mon, 22 Feb 2016 14:54:36 -0800
changeset 333179 f9d9d8f2df3d232fbab5398ddf4475099272c28c
parent 333169 7d4147c08c3e554544c4607766b1983d5922c0a6
child 333180 5f797a6f360746040227c4873eec803a2fe7ae9e
push id11287
push usermaglione.k@gmail.com
push dateMon, 22 Feb 2016 22:57:31 +0000
reviewersfitzgen
bugs1222087
milestone47.0a1
Bug 1222087: Part 1 - Fix ignoring of exceptions in blackboxed code. r?fitzgen MozReview-Commit-ID: vtu1ou4ueT
devtools/server/actors/script.js
devtools/server/tests/unit/test_blackboxing-05.js
--- 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();
     });
   });
 }