зеркало из https://github.com/mozilla/gecko-dev.git
Bug 897050 - Prefer displayName instead of name; r=fitzgen
This commit is contained in:
Родитель
8933291a63
Коммит
f5bd1fe55c
|
@ -668,7 +668,7 @@ let StackFrameUtils = {
|
||||||
getFrameTitle: function(aFrame) {
|
getFrameTitle: function(aFrame) {
|
||||||
if (aFrame.type == "call") {
|
if (aFrame.type == "call") {
|
||||||
let c = aFrame.callee;
|
let c = aFrame.callee;
|
||||||
return (c.name || c.userDisplayName || c.displayName || "(anonymous)");
|
return (c.userDisplayName || c.displayName || c.name || "(anonymous)");
|
||||||
}
|
}
|
||||||
return "(" + aFrame.type + ")";
|
return "(" + aFrame.type + ")";
|
||||||
},
|
},
|
||||||
|
@ -702,7 +702,7 @@ let StackFrameUtils = {
|
||||||
case "function":
|
case "function":
|
||||||
let f = aEnv.function;
|
let f = aEnv.function;
|
||||||
label += " [" +
|
label += " [" +
|
||||||
(f.name || f.userDisplayName || f.displayName || "(anonymous)") +
|
(f.userDisplayName || f.displayName || f.name || "(anonymous)") +
|
||||||
"]";
|
"]";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2549,7 +2549,8 @@ ObjectActor.prototype = {
|
||||||
if (this.obj.class === "Function") {
|
if (this.obj.class === "Function") {
|
||||||
if (this.obj.name) {
|
if (this.obj.name) {
|
||||||
g.name = this.obj.name;
|
g.name = this.obj.name;
|
||||||
} else if (this.obj.displayName) {
|
}
|
||||||
|
if (this.obj.displayName) {
|
||||||
g.displayName = this.obj.displayName;
|
g.displayName = this.obj.displayName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -30,6 +30,7 @@ function test_named_function()
|
||||||
|
|
||||||
do_check_eq(args[0].class, "Function");
|
do_check_eq(args[0].class, "Function");
|
||||||
do_check_eq(args[0].name, "stopMe");
|
do_check_eq(args[0].name, "stopMe");
|
||||||
|
do_check_eq(args[0].displayName, "stopMe");
|
||||||
|
|
||||||
let objClient = gThreadClient.pauseGrip(args[0]);
|
let objClient = gThreadClient.pauseGrip(args[0]);
|
||||||
objClient.getParameterNames(function(aResponse) {
|
objClient.getParameterNames(function(aResponse) {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче