зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1383208
- Allow for null functionName in console messages;r=baku
MozReview-Commit-ID: 47O6kPQ3W8o --HG-- extra : rebase_source : 36f1434de4e252b254d0159137f33aa87908bf89
This commit is contained in:
Родитель
fb86f05093
Коммит
b86762c77a
|
@ -67,6 +67,12 @@ function testMessages(hud) {
|
|||
// Test eval.
|
||||
hud.jsterm.execute("document.location.href");
|
||||
|
||||
// Test eval frame script
|
||||
hud.jsterm.execute(`
|
||||
gBrowser.selectedBrowser.messageManager.loadFrameScript('data:application/javascript,console.log("framescript-message")', false);
|
||||
"framescript-eval";
|
||||
`);
|
||||
|
||||
// Check for network requests.
|
||||
let xhr = new XMLHttpRequest();
|
||||
xhr.onload = () => console.log("xhr loaded, status is: " + xhr.status);
|
||||
|
@ -128,6 +134,18 @@ function testMessages(hud) {
|
|||
category: CATEGORY_OUTPUT,
|
||||
severity: SEVERITY_LOG,
|
||||
},
|
||||
{
|
||||
name: "jsterm eval result 2",
|
||||
text: "framescript-eval",
|
||||
category: CATEGORY_OUTPUT,
|
||||
severity: SEVERITY_LOG,
|
||||
},
|
||||
{
|
||||
name: "frame script message",
|
||||
text: "framescript-message",
|
||||
category: CATEGORY_WEBDEV,
|
||||
severity: SEVERITY_LOG,
|
||||
},
|
||||
{
|
||||
name: "exception message",
|
||||
text: "foobarExceptionBug587757",
|
||||
|
|
|
@ -59,8 +59,8 @@ ContentProcessSingleton.prototype = {
|
|||
level: consoleMsg.level,
|
||||
filename: consoleMsg.filename.substring(0, MSG_MGR_CONSOLE_INFO_MAX),
|
||||
lineNumber: consoleMsg.lineNumber,
|
||||
functionName: consoleMsg.functionName.substring(0,
|
||||
MSG_MGR_CONSOLE_INFO_MAX),
|
||||
functionName: consoleMsg.functionName &&
|
||||
consoleMsg.functionName.substring(0, MSG_MGR_CONSOLE_INFO_MAX),
|
||||
timeStamp: consoleMsg.timeStamp,
|
||||
addonId: consoleMsg.addonId,
|
||||
arguments: [],
|
||||
|
|
Загрузка…
Ссылка в новой задаче