Bug 949762 - Tracer should respect black boxing. r=fitzgen

This commit is contained in:
Jakub Jurovych
2014-08-14 18:02:00 -04:00
parent b44ee32db0
commit 9e2b7582f4
10 changed files with 285 additions and 16 deletions

View File

@@ -1234,11 +1234,7 @@ SourceScripts.prototype = {
_onBlackBoxChange: function (aEvent, { url, isBlackBoxed }) {
const item = DebuggerView.Sources.getItemByValue(url);
if (item) {
if (isBlackBoxed) {
item.prebuiltNode.classList.add("black-boxed");
} else {
item.prebuiltNode.classList.remove("black-boxed");
}
item.prebuiltNode.classList.toggle("black-boxed", isBlackBoxed);
}
DebuggerView.Sources.updateToolbarButtonsState();
DebuggerView.maybeShowBlackBoxMessage();
@@ -1555,11 +1551,12 @@ Tracer.prototype = {
/**
* Callback for handling a new call frame.
*/
_onCall: function({ name, location, parameterNames, depth, arguments: args }) {
_onCall: function({ name, location, blackBoxed, parameterNames, depth, arguments: args }) {
const item = {
name: name,
location: location,
id: this._idCounter++
id: this._idCounter++,
blackBoxed
};
this._stack.push(item);
@@ -1570,7 +1567,8 @@ Tracer.prototype = {
depth: depth,
parameterNames: parameterNames,
arguments: args,
frameId: item.id
frameId: item.id,
blackBoxed
});
},
@@ -1582,14 +1580,15 @@ Tracer.prototype = {
return;
}
const { name, id, location } = this._stack.pop();
const { name, id, location, blackBoxed } = this._stack.pop();
DebuggerView.Tracer.addTrace({
type: aPacket.why,
name: name,
location: location,
depth: aPacket.depth,
frameId: id,
returnVal: aPacket.return || aPacket.throw || aPacket.yield
returnVal: aPacket.return || aPacket.throw || aPacket.yield,
blackBoxed
});
},