devtools: don't report error if remoteAddress/remotePort returns NS_ERROR_NOT_AVAILABLE

This commit is contained in:
roytam1 2023-11-30 11:12:31 +08:00
commit 3ec8369f61

View file

@ -1338,13 +1338,13 @@ NetworkMonitor.prototype = {
try {
response.remoteAddress = httpActivity.channel.remoteAddress;
} catch (e) {
Cu.reportError(e);
if (e.result != Cr.NS_ERROR_NOT_AVAILABLE) Cu.reportError(e);
}
response.remotePort = null;
try {
response.remotePort = httpActivity.channel.remotePort;
} catch (e) {
Cu.reportError(e);
if (e.result != Cr.NS_ERROR_NOT_AVAILABLE) Cu.reportError(e);
}
response.status = statusLineArray.shift();
response.statusText = statusLineArray.join(" ");