diff options
author | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-02-28 08:51:01 +0100 |
---|---|---|
committer | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-02-28 08:51:01 +0100 |
commit | f7e146b34388db880d34d4d8082d71f903c6cabe (patch) | |
tree | c5c9a8dd8cdc4f03783fe92d1197a9ab433de55d | |
parent | 259e214960c23346628311d88427c7ca13bdb335 (diff) | |
download | UXP-f7e146b34388db880d34d4d8082d71f903c6cabe.tar UXP-f7e146b34388db880d34d4d8082d71f903c6cabe.tar.gz UXP-f7e146b34388db880d34d4d8082d71f903c6cabe.tar.lz UXP-f7e146b34388db880d34d4d8082d71f903c6cabe.tar.xz UXP-f7e146b34388db880d34d4d8082d71f903c6cabe.zip |
[partial fix] DevTools - network - proxy - throws an errors (remoteAddress)
https://github.com/MoonchildProductions/moebius/pull/63
-rw-r--r-- | devtools/shared/webconsole/network-monitor.js | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/devtools/shared/webconsole/network-monitor.js b/devtools/shared/webconsole/network-monitor.js index 084493432..5416a7760 100644 --- a/devtools/shared/webconsole/network-monitor.js +++ b/devtools/shared/webconsole/network-monitor.js @@ -1327,8 +1327,24 @@ NetworkMonitor.prototype = { let response = {}; response.httpVersion = statusLineArray.shift(); - response.remoteAddress = httpActivity.channel.remoteAddress; - response.remotePort = httpActivity.channel.remotePort; + // XXX: + // Sometimes, when using a proxy server (manual proxy configuration), + // throws an errors: + // 0x80040111 (NS_ERROR_NOT_AVAILABLE) + // [nsIHttpChannelInternal.remoteAddress] + // Bug 1337791 is the suspect. + response.remoteAddress = null; + try { + response.remoteAddress = httpActivity.channel.remoteAddress; + } catch (e) { + Cu.reportError(e); + } + response.remotePort = null; + try { + response.remotePort = httpActivity.channel.remotePort; + } catch (e) { + Cu.reportError(e); + } response.status = statusLineArray.shift(); response.statusText = statusLineArray.join(" "); response.headersSize = extraStringData.length; |