Backed out changeset a1487e1518de (bug 1605854) for ESline failure in gecko/devtools/shared/transport/local-transport.js. CLOSED TREE

This commit is contained in:
Dorel Luca 2020-01-03 15:52:46 +02:00
Родитель 7d4773b478
Коммит de5c64c8f9
15 изменённых файлов: 57 добавлений и 59 удалений

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

@ -27,7 +27,7 @@ const setCensusDisplay = (exports.setCensusDisplay = function(display) {
display.breakdown &&
display.breakdown.by,
"Breakdowns must be an object with a `by` property, attempted to set: " +
JSON.stringify(display)
uneval(display)
);
return {

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

@ -31,7 +31,7 @@ const setLabelDisplay = (exports.setLabelDisplay = function(display) {
display.breakdown &&
display.breakdown.by,
"Breakdowns must be an object with a `by` property, attempted to set: " +
JSON.stringify(display)
uneval(display)
);
return {

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

@ -399,7 +399,7 @@ const fetchIndividuals = (exports.fetchIndividuals = function(
labelDisplay = getState().labelDisplay;
assert(
labelDisplay && labelDisplay.breakdown && labelDisplay.breakdown.by,
`Should have a breakdown to label nodes with, got: ${JSON.stringify(
`Should have a breakdown to label nodes with, got: ${uneval(
labelDisplay
)}`
);
@ -617,7 +617,7 @@ const fetchDominatorTree = (exports.fetchDominatorTree = TaskCache.declareCachea
display = getState().labelDisplay;
assert(
display && display.breakdown,
`Should have a breakdown to describe nodes with, got: ${JSON.stringify(
`Should have a breakdown to describe nodes with, got: ${uneval(
display
)}`
);

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

@ -30,7 +30,7 @@ const setTreeMap = (exports.setTreeMap = function(display) {
display.breakdown &&
display.breakdown.by,
"Breakdowns must be an object with a `by` property, attempted to set: " +
JSON.stringify(display)
uneval(display)
);
return {

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

@ -103,13 +103,13 @@ add_task(async function() {
const validateValue = prefsToCheck[name].validateValue;
is(
firstValue.toString(),
currentValue.toString(),
firstValue.toSource(),
currentValue.toSource(),
"Pref " + name + " should be equal to first value: " + currentValue
);
is(
validateValue().toString(),
currentValue.toString(),
validateValue().toSource(),
currentValue.toSource(),
"Pref " + name + " should validate: " + currentValue
);
}
@ -136,24 +136,24 @@ add_task(async function() {
info("Modified UI element affecting " + name + " to: " + newValue);
is(
firstValue.toString(),
currentValue.toString(),
firstValue.toSource(),
currentValue.toSource(),
"Pref " +
name +
" should still be equal to first value: " +
currentValue
);
isnot(
newValue.toString(),
currentValue.toString(),
newValue.toSource(),
currentValue.toSource(),
"Pref " +
name +
" should't yet be equal to second value: " +
currentValue
);
is(
validateValue().toString(),
newValue.toString(),
validateValue().toSource(),
newValue.toSource(),
"The UI element affecting " + name + " should validate: " + newValue
);
}
@ -176,18 +176,18 @@ add_task(async function() {
const validateValue = prefsToCheck[name].validateValue;
isnot(
firstValue.toString(),
currentValue.toString(),
firstValue.toSource(),
currentValue.toSource(),
"Pref " + name + " should't be equal to first value: " + currentValue
);
is(
newValue.toString(),
currentValue.toString(),
newValue.toSource(),
currentValue.toSource(),
"Pref " + name + " should now be equal to second value: " + currentValue
);
is(
validateValue().toString(),
newValue.toString(),
validateValue().toSource(),
newValue.toSource(),
"The UI element affecting " + name + " should validate: " + newValue
);
}
@ -214,24 +214,24 @@ add_task(async function() {
info("Modified UI element affecting " + name + " to: " + firstValue);
isnot(
firstValue.toString(),
currentValue.toString(),
firstValue.toSource(),
currentValue.toSource(),
"Pref " +
name +
" should't yet be equal to first value: " +
currentValue
);
is(
newValue.toString(),
currentValue.toString(),
newValue.toSource(),
currentValue.toSource(),
"Pref " +
name +
" should still be equal to second value: " +
currentValue
);
is(
validateValue().toString(),
firstValue.toString(),
validateValue().toSource(),
firstValue.toSource(),
"The UI element affecting " + name + " should validate: " + firstValue
);
}

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

@ -53,18 +53,18 @@ add_task(async function() {
await rangeSelected;
is(
JSON.stringify(markersOverview.getSelection()),
JSON.stringify(framerateGraph.getSelection()),
markersOverview.getSelection().toSource(),
framerateGraph.getSelection().toSource(),
"The markers overview has a correct selection."
);
is(
JSON.stringify(memoryGraph.getSelection()),
JSON.stringify(framerateGraph.getSelection()),
memoryGraph.getSelection().toSource(),
framerateGraph.getSelection().toSource(),
"The memory overview has a correct selection."
);
is(
JSON.stringify(framerateGraph.getSelection()),
JSON.stringify({ start: 0, end: width / 2 }),
framerateGraph.getSelection().toSource(),
"({start:0, end:" + width / 2 + "})",
"The framerate graph has a correct selection."
);
@ -78,18 +78,18 @@ add_task(async function() {
await rangeSelected;
is(
JSON.stringify(markersOverview.getSelection()),
JSON.stringify(framerateGraph.getSelection()),
markersOverview.getSelection().toSource(),
framerateGraph.getSelection().toSource(),
"The markers overview has a correct selection."
);
is(
JSON.stringify(memoryGraph.getSelection()),
JSON.stringify(framerateGraph.getSelection()),
memoryGraph.getSelection().toSource(),
framerateGraph.getSelection().toSource(),
"The memory overview has a correct selection."
);
is(
JSON.stringify(framerateGraph.getSelection()),
JSON.stringify({ start: 0, end: width / 4 }),
framerateGraph.getSelection().toSource(),
"({start:0, end:" + width / 4 + "})",
"The framerate graph has a correct selection."
);
@ -103,18 +103,18 @@ add_task(async function() {
await rangeSelected;
is(
JSON.stringify(markersOverview.getSelection()),
JSON.stringify(framerateGraph.getSelection()),
markersOverview.getSelection().toSource(),
framerateGraph.getSelection().toSource(),
"The markers overview has a correct selection."
);
is(
JSON.stringify(memoryGraph.getSelection()),
JSON.stringify(framerateGraph.getSelection()),
memoryGraph.getSelection().toSource(),
framerateGraph.getSelection().toSource(),
"The memory overview has a correct selection."
);
is(
JSON.stringify(framerateGraph.getSelection()),
JSON.stringify({ start: 0, end: width / 10 }),
framerateGraph.getSelection().toSource(),
"({start:0, end:" + width / 10 + "})",
"The framerate graph has a correct selection."
);

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

@ -14,8 +14,8 @@ add_task(function() {
} = require("devtools/shared/performance/recording-utils");
const output = getProfileThreadFromAllocations(TEST_DATA);
equal(
JSON.stringify(output),
JSON.stringify(EXPECTED_OUTPUT),
output.toSource(),
EXPECTED_OUTPUT.toSource(),
"The output is correct."
);
});

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

@ -104,9 +104,7 @@ function testColorMatch(name, hex, hsl, rgb, rgba, canvas) {
ok(!rgbFail, "color " + rgba + " matches target. Type: " + type);
if (rgbFail) {
info(
`target: ${JSON.stringify(
target
)}, color: [r: ${r}, g: ${g}, b: ${b}, a: ${a}]`
`target: ${target.toSource()}, color: [r: ${r}, g: ${g}, b: ${b}, a: ${a}]`
);
}

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

@ -23,7 +23,7 @@ function performTest() {
ok(out, "Some data was outputted properly");
is(out.length, PALLETTE_SIZE, "The outputted length is correct.");
info("Got flame graph data:\n" + JSON.stringify(out) + "\n");
info("Got flame graph data:\n" + out.toSource() + "\n");
for (let i = 0; i < out.length; i++) {
const found = out[i];

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

@ -24,7 +24,7 @@ function performTest() {
ok(out, "Some data was outputted properly");
is(out.length, PALLETTE_SIZE, "The outputted length is correct.");
info("Got flame graph data:\n" + JSON.stringify(out) + "\n");
info("Got flame graph data:\n" + out.toSource() + "\n");
for (let i = 0; i < out.length; i++) {
const found = out[i];

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

@ -24,7 +24,7 @@ function performTest() {
ok(out, "Some data was outputted properly");
is(out.length, PALLETTE_SIZE, "The outputted length is correct.");
info("Got flame graph data:\n" + JSON.stringify(out) + "\n");
info("Got flame graph data:\n" + out.toSource() + "\n");
for (let i = 0; i < out.length; i++) {
const found = out[i];

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

@ -26,7 +26,7 @@ function performTest() {
ok(out, "Some data was outputted properly");
is(out.length, PALLETTE_SIZE, "The outputted length is correct.");
info("Got flame graph data:\n" + JSON.stringify(out) + "\n");
info("Got flame graph data:\n" + out.toSource() + "\n");
for (let i = 0; i < out.length; i++) {
const found = out[i];

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

@ -27,7 +27,7 @@ function performTest() {
ok(out, "Some data was outputted properly");
is(out.length, PALLETTE_SIZE, "The outputted length is correct.");
info("Got flame graph data:\n" + JSON.stringify(out) + "\n");
info("Got flame graph data:\n" + out.toSource() + "\n");
for (let i = 0; i < out.length; i++) {
const found = out[i];

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

@ -15,8 +15,8 @@ add_task(function() {
} = require("devtools/shared/performance/recording-utils");
const output = getProfileThreadFromAllocations(TEST_DATA);
equal(
JSON.stringify(output),
JSON.stringify(EXPECTED_OUTPUT),
output.toSource(),
EXPECTED_OUTPUT.toSource(),
"The output is correct."
);
});

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

@ -47,9 +47,9 @@ LocalDebuggerTransport.prototype = {
if (flags.wantLogging) {
// Check 'from' first, as 'echo' packets have both.
if (packet.from) {
dumpn("Packet " + serial + " sent from " + JSON.stringify(packet.from));
dumpn("Packet " + serial + " sent from " + uneval(packet.from));
} else if (packet.to) {
dumpn("Packet " + serial + " sent to " + JSON.stringify(packet.to));
dumpn("Packet " + serial + " sent to " + uneval(packet.to));
}
}
this._deepFreeze(packet);