зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1297466 - Do not attempt to open Function.prototype in Debugger. r=bgrins
--HG-- extra : rebase_source : fed13d5c980f853c313d6b62a7812af538bd79cb
This commit is contained in:
Родитель
495a9fc5b2
Коммит
652cfe6316
|
@ -2705,10 +2705,10 @@ Widgets.ObjectRenderers.add({
|
||||||
|
|
||||||
_onClick: function () {
|
_onClick: function () {
|
||||||
let location = this.objectActor.location;
|
let location = this.objectActor.location;
|
||||||
if (location && IGNORED_SOURCE_URLS.indexOf(location.url) === -1) {
|
let url = location && location.url;
|
||||||
|
if (url && IGNORED_SOURCE_URLS.indexOf(url) === -1) {
|
||||||
this.output.openLocationInDebugger(location);
|
this.output.openLocationInDebugger(location);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
this.openObjectInVariablesView();
|
this.openObjectInVariablesView();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,6 +40,30 @@ add_task(function* () {
|
||||||
}], { webconsole: hud });
|
}], { webconsole: hud });
|
||||||
});
|
});
|
||||||
|
|
||||||
|
add_task(function* () {
|
||||||
|
yield loadTab(TEST_URI);
|
||||||
|
|
||||||
|
hud = yield openConsole();
|
||||||
|
|
||||||
|
let msg = yield hud.jsterm.execute("Function.prototype");
|
||||||
|
|
||||||
|
ok(msg, "output message found");
|
||||||
|
ok(msg.textContent.includes("function ()"),
|
||||||
|
"message text check");
|
||||||
|
|
||||||
|
executeSoon(() => {
|
||||||
|
EventUtils.synthesizeMouse(msg.querySelector("a"), 2, 2, {}, hud.iframeWindow);
|
||||||
|
});
|
||||||
|
|
||||||
|
let varView = yield hud.jsterm.once("variablesview-fetched");
|
||||||
|
ok(varView, "object inspector opened on click");
|
||||||
|
|
||||||
|
yield findVariableViewProperties(varView, [{
|
||||||
|
name: "constructor",
|
||||||
|
value: "Function()",
|
||||||
|
}], { webconsole: hud });
|
||||||
|
});
|
||||||
|
|
||||||
add_task(function* () {
|
add_task(function* () {
|
||||||
let msg = yield hud.jsterm.execute("fooObj");
|
let msg = yield hud.jsterm.execute("fooObj");
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче