bug 899877 part 1: remove frame.isBlackBoxed, add frame.source; r=dcamp

This commit is contained in:
Nick Fitzgerald 2013-08-03 11:05:36 -07:00
parent 2e3d477e15
commit 805b17437b
2 changed files with 9 additions and 6 deletions

View File

@ -886,8 +886,12 @@ ThreadActor.prototype = {
let { url, line, column } = form.where;
let promise = this.sources.getOriginalLocation(url, line, column)
.then(function (aOrigLocation) {
.then((aOrigLocation) => {
form.where = aOrigLocation;
let source = this.sources.source(form.where.url);
if (source) {
form.source = source.form();
}
});
promises.push(promise);
}
@ -2669,7 +2673,6 @@ FrameActor.prototype = {
line: this.frame.script.getOffsetLine(this.frame.offset),
column: getOffsetColumn(this.frame.offset, this.frame.script)
};
form.isBlackBoxed = this.threadActor.sources.isBlackBoxed(this.frame.script.url)
}
if (!this.frame.older) {

View File

@ -83,7 +83,7 @@ function test_black_box_default() {
"Should step into `doStuff`.");
},
function onDebuggerStatementFrames(aFrames) {
do_check_true(!aFrames.some(f => f.isBlackBoxed));
do_check_true(!aFrames.some(f => f.source.isBlackBoxed));
},
test_black_boxing.bind(null, sourceClient)
);
@ -108,9 +108,9 @@ function test_black_boxing(aSourceClient) {
function onDebuggerStatementFrames(aFrames) {
for (let f of aFrames) {
if (f.where.url == BLACK_BOXED_URL) {
do_check_true(f.isBlackBoxed, "Should be black boxed");
do_check_true(f.source.isBlackBoxed, "Should be black boxed");
} else {
do_check_true(!f.isBlackBoxed, "Should not be black boxed")
do_check_true(!f.source.isBlackBoxed, "Should not be black boxed")
}
}
},
@ -133,7 +133,7 @@ function test_unblack_boxing(aSourceClient) {
"Should step into `doStuff`.");
},
function onDebuggerStatementFrames(aFrames) {
do_check_true(!aFrames.some(f => f.isBlackBoxed));
do_check_true(!aFrames.some(f => f.source.isBlackBoxed));
},
finishClient.bind(null, gClient)
);