Backed out changeset 6e01b87795cf (bug 1573890) for Devtools failures. CLOSED TREE

--HG--
extra : rebase_source : e8a8addd651398d07630e0990eb49f0210969f23
This commit is contained in:
Dorel Luca 2019-08-16 19:36:41 +03:00
Родитель 53ceae20f0
Коммит 4b3c5c8fa3
5 изменённых файлов: 46 добавлений и 27 удалений

Просмотреть файл

@ -31,6 +31,6 @@ add_task(async function() {
await hasConsoleMessage(dbg, "firstCall");
const { link, value } = await findConsoleMessage(dbg, "a b c");
is(link, "script-switching-01.js:8:2", "logs should have the relevant link");
is(link, "Logpoint @ script-switching-01.js:8:2", "logs should have the relevant link");
is(value, "a b c", "logs should have multiple values");
});

Просмотреть файл

@ -204,6 +204,27 @@ class Frame extends Component {
}
}
// If the message comes from a logPoint,
// prefix the source location accordingly
if (frame.options) {
let locationPrefix;
if (frame.options.logPoint) {
locationPrefix = "Logpoint @ ";
}
if (locationPrefix) {
sourceElements.push(
dom.span(
{
key: "locationPrefix",
className: "frame-link-prefix",
},
locationPrefix
)
);
}
}
let displaySource = showFullSourceUrl ? unicodeLong : unicodeShort;
if (isSourceMapped) {
displaySource = getSourceMappedFile(displaySource);

Просмотреть файл

@ -1,24 +1,20 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<!DOCTYPE html>
<!DOCTYPE HTML>
<html>
<!--
<!--
Test the formatting of the file name, line and columns are correct in frame components,
with optional columns, unknown and non-URL sources.
-->
<head>
<meta charset="utf-8" />
<title>Frame component test</title>
<script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<link
rel="stylesheet"
type="text/css"
href="chrome://mochikit/content/tests/SimpleTest/test.css"
/>
</head>
<body>
<pre id="test">
<head>
<meta charset="utf-8">
<title>Frame component test</title>
<script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css">
</head>
<body>
<pre id="test">
<script src="head.js" type="application/javascript"></script>
<script type="application/javascript">
window.onload = async function () {
@ -343,6 +339,7 @@ window.onload = async function () {
options: { logPoint: true },
}
}, {
locationPrefix: "Logpoint @ ",
file: "mahscripts.js",
line: 55,
column: 10,
@ -367,5 +364,5 @@ window.onload = async function () {
};
</script>
</pre>
</body>
</body>
</html>

Просмотреть файл

@ -247,7 +247,7 @@ BreakpointActor.prototype = {
} else if ("return" in completion) {
value = completion.return;
} else {
value = [this.getThrownMessage(completion)];
value = ["[Logpoint threw]: " + this.getThrownMessage(completion)];
level = "logPointError";
}

Просмотреть файл

@ -56,19 +56,20 @@ function test_simple_breakpoint() {
// Execute the rest of the code.
await gThreadFront.resume();
Assert.equal(lastMessage.level, "logPointError");
Assert.equal(lastMessage.arguments[0], "c is not defined");
Assert.equal(
lastMessage.arguments[0],
"[Logpoint threw]: c is not defined"
);
finishClient(gClient);
});
/* eslint-disable */
Cu.evalInSandbox(
"debugger;\n" + // 1
"var a = 'three';\n" + // 2
"var b = 2;\n", // 3
gDebuggee,
"1.8",
"test.js",
1
);
Cu.evalInSandbox("debugger;\n" + // 1
"var a = 'three';\n" + // 2
"var b = 2;\n", // 3
gDebuggee,
"1.8",
"test.js",
1);
/* eslint-enable */
}