зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1566998 - Fix lint warning r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D130045
This commit is contained in:
Родитель
0eff871121
Коммит
c382a1b2b0
|
@ -6,9 +6,6 @@
|
|||
"use strict";
|
||||
|
||||
var dns = Cc["@mozilla.org/network/dns-service;1"].getService(Ci.nsIDNSService);
|
||||
var ioService = Cc["@mozilla.org/network/io-service;1"].getService(
|
||||
Ci.nsIIOService
|
||||
);
|
||||
const gOverride = Cc["@mozilla.org/network/native-dns-override;1"].getService(
|
||||
Ci.nsINativeDNSResolverOverride
|
||||
);
|
||||
|
@ -16,7 +13,7 @@ const gOverride = Cc["@mozilla.org/network/native-dns-override;1"].getService(
|
|||
const defaultOriginAttributes = {};
|
||||
|
||||
add_task(async function test_none() {
|
||||
let [inRequest, inRecord, inStatus] = await new Promise(resolve => {
|
||||
let [, inRecord] = await new Promise(resolve => {
|
||||
let listener = {
|
||||
onLookupComplete(inRequest, inRecord, inStatus) {
|
||||
resolve([inRequest, inRecord, inStatus]);
|
||||
|
@ -47,7 +44,7 @@ add_task(async function test_some() {
|
|||
dns.clearCache(true);
|
||||
gOverride.addIPOverride("example.com", "1.1.1.1");
|
||||
gOverride.addIPOverride("example.org", "::1:2:3");
|
||||
let [inRequest, inRecord, inStatus] = await new Promise(resolve => {
|
||||
let [, inRecord] = await new Promise(resolve => {
|
||||
let listener = {
|
||||
onLookupComplete(inRequest, inRecord, inStatus) {
|
||||
resolve([inRequest, inRecord, inStatus]);
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
"use strict";
|
||||
|
||||
ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
|
||||
var { setTimeout } = ChromeUtils.import("resource://gre/modules/Timer.jsm");
|
||||
|
||||
let trrServer;
|
||||
|
||||
|
|
|
@ -15,12 +15,6 @@ const dns = Cc["@mozilla.org/network/dns-service;1"].getService(
|
|||
const certOverrideService = Cc[
|
||||
"@mozilla.org/security/certoverride;1"
|
||||
].getService(Ci.nsICertOverrideService);
|
||||
const threadManager = Cc["@mozilla.org/thread-manager;1"].getService(
|
||||
Ci.nsIThreadManager
|
||||
);
|
||||
const mainThread = threadManager.currentThread;
|
||||
|
||||
const defaultOriginAttributes = {};
|
||||
|
||||
function setup() {
|
||||
let env = Cc["@mozilla.org/process/environment;1"].getService(
|
||||
|
|
|
@ -21,8 +21,6 @@ function makeChan(url) {
|
|||
return chan;
|
||||
}
|
||||
|
||||
let processId;
|
||||
|
||||
function channelOpenPromise(chan) {
|
||||
return new Promise(resolve => {
|
||||
function finish(req, buffer) {
|
||||
|
|
|
@ -7,9 +7,6 @@
|
|||
const dns = Cc["@mozilla.org/network/dns-service;1"].getService(
|
||||
Ci.nsIDNSService
|
||||
);
|
||||
const { TestUtils } = ChromeUtils.import(
|
||||
"resource://testing-common/TestUtils.jsm"
|
||||
);
|
||||
|
||||
trr_test_setup();
|
||||
registerCleanupFunction(async () => {
|
||||
|
|
|
@ -21,8 +21,6 @@ function makeChan(url) {
|
|||
return chan;
|
||||
}
|
||||
|
||||
let processId;
|
||||
|
||||
function channelOpenPromise(chan) {
|
||||
return new Promise(resolve => {
|
||||
function finish(req, buffer) {
|
||||
|
|
|
@ -21,8 +21,6 @@ function makeChan(url) {
|
|||
return chan;
|
||||
}
|
||||
|
||||
let processId;
|
||||
|
||||
function channelOpenPromise(chan) {
|
||||
return new Promise(resolve => {
|
||||
function finish(req, buffer) {
|
||||
|
|
|
@ -45,8 +45,6 @@ function makeChan(url) {
|
|||
return chan;
|
||||
}
|
||||
|
||||
let processId;
|
||||
|
||||
function channelOpenPromise(chan) {
|
||||
return new Promise(resolve => {
|
||||
function finish(req, buffer) {
|
||||
|
|
|
@ -866,13 +866,13 @@ function handleRequest(req, res) {
|
|||
else if (u.pathname === "/dns-cname") {
|
||||
// asking for cname.example.com
|
||||
|
||||
function emitResponse(res, payload) {
|
||||
let content = createCNameContent(payload);
|
||||
res.setHeader("Content-Type", "application/dns-message");
|
||||
res.setHeader("Content-Length", content.length);
|
||||
res.writeHead(200);
|
||||
res.write(content);
|
||||
res.end("");
|
||||
function emitResponse(response, payload) {
|
||||
let pcontent = createCNameContent(payload);
|
||||
response.setHeader("Content-Type", "application/dns-message");
|
||||
response.setHeader("Content-Length", pcontent.length);
|
||||
response.writeHead(200);
|
||||
response.write(pcontent);
|
||||
response.end("");
|
||||
}
|
||||
|
||||
let payload = Buffer.from("");
|
||||
|
|
Загрузка…
Ссылка в новой задаче