Bug 1437270 - Port bug 1152332 to mailnews: proxy filters return the result asynchronously. r=jorgk
This commit is contained in:
Родитель
8d79fe03ba
Коммит
21945e2c3c
|
@ -240,12 +240,13 @@ var NetworkTestUtils = {
|
|||
.getService(Ci.nsIProtocolProxyService);
|
||||
let filter = {
|
||||
QueryInterface: XPCOMUtils.generateQI([Ci.nsIProtocolProxyFilter]),
|
||||
applyFilter(aProxyService, aURI, aProxyInfo) {
|
||||
applyFilter(aProxyService, aURI, aProxyInfo, aCallback) {
|
||||
if (aURI.host != "localhost" && aURI.host != "127.0.0.1") {
|
||||
return pps.newProxyInfo("socks", "localhost", gSocksServer.port,
|
||||
Ci.nsIProxyInfo.TRANSPARENT_PROXY_RESOLVES_HOST, 0, null);
|
||||
aCallback.onProxyFilterResult(pps.newProxyInfo("socks", "localhost", gSocksServer.port,
|
||||
Ci.nsIProxyInfo.TRANSPARENT_PROXY_RESOLVES_HOST, 0, null));
|
||||
return;
|
||||
}
|
||||
return aProxyInfo;
|
||||
aCallback.onProxyFilterResult(aProxyInfo);
|
||||
},
|
||||
};
|
||||
pps.registerFilter(filter, 0);
|
||||
|
|
Загрузка…
Ссылка в новой задаче