Skip to content

Commit

Permalink
Fixes GM_xmlhttpRequest handler crash on connection error
Browse files Browse the repository at this point in the history
[#2 state:resolved]
  • Loading branch information
ocornu committed Mar 15, 2009
1 parent 9f85260 commit 9b049cb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/chrome/content/xmlhttprequester.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,12 @@ function(unsafeContentWin, req, event, details) {
// let the browser call properties on it
responseText:req.responseText,
readyState:req.readyState,
responseHeaders:(req.readyState == 4 ?
responseHeaders:(req.readyState == 4 && event != "onerror" ?
req.getAllResponseHeaders() :
""),
status:(req.readyState == 4 ? req.status : 0),
statusText:(req.readyState == 4 ? req.statusText : ""),
statusText:(req.readyState == 4 && event != "onerror" ?
req.statusText : ""),
finalUrl:(req.readyState == 4 ? req.channel.URI.spec : "")
}

Expand Down

0 comments on commit 9b049cb

Please sign in to comment.