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 | 35e6b80752cd4f0f10c9badcf6e196b77b687dc1 (patch) | |
tree | c5c9a8dd8cdc4f03783fe92d1197a9ab433de55d /devtools | |
parent | 9ae9116051a71c69ce608da19bb5b4872e164862 (diff) | |
download | uxp-35e6b80752cd4f0f10c9badcf6e196b77b687dc1.tar.gz |
[partial fix] DevTools - network - proxy - throws an errors (remoteAddress)
https://github.com/MoonchildProductions/moebius/pull/63
Diffstat (limited to 'devtools')
-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 0844934325..5416a7760a 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; |