Backed out changeset c300840573f5 (bug 1528276) for dt failures at browser_target_server_compartment.js. CLOSED TREE

--HG--
extra : histedit_source : b43e057c5f78805a5a09afd84836e537fc726618
This commit is contained in:
Brindusan Cristian 2019-02-26 19:45:30 +02:00
Родитель c442603050
Коммит 73b09a782e
2 изменённых файлов: 5 добавлений и 11 удалений

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

@ -36,7 +36,6 @@ try {
}
const { require } = loader;
const Services = require("Services");
const DevToolsUtils = require("devtools/shared/DevToolsUtils");
const { dumpn } = DevToolsUtils;
const { DebuggerServer } = require("devtools/server/main");
@ -144,14 +143,9 @@ try {
// Destroy the server once its last connection closes. Note that multiple frame
// scripts may be running in parallel and reuse the same server.
function destroyServer() {
const isContentProcessServer =
Services.appinfo.processType === Services.appinfo.PROCESS_TYPE_CONTENT;
// Only destroy the server if there is no more connections to it. It may be used
// to debug another tab running in the same process.
// Also check if this server is running in a content process. For Firefox running
// with e10s disabled (eg Firefox for Android) the DebuggerServer should not be
// stopped when all connections are closed.
if (DebuggerServer.hasConnection() || !isContentProcessServer) {
if (DebuggerServer.hasConnection()) {
return;
}
DebuggerServer.off("connectionchange", destroyServer);

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

@ -100,7 +100,7 @@ function runTests() {
await secondClient(actor.testActor);
ok(DebuggerServer.initialized,
"DebuggerServer is still alive after disconnecting one client");
"DebuggerServer isn't destroyed until all clients are disconnected");
// Ensure that our test actor got cleaned up;
// its destroy method should be called
@ -118,9 +118,9 @@ function runTests() {
await onActorDestroyed;
// This test loads a frame in the parent process, so that we end up sharing the same
// DebuggerServer instance.
ok(DebuggerServer.initialized, "Shared DebuggerServer in the parent process is " +
"still alive after all clients are disconnected");
// DebuggerServer instance
ok(!DebuggerServer.initialized,
"DebuggerServer is destroyed when all clients are disconnected");
cleanup();
}