[Pkg-mozext-commits] [greasemonkey] 13/35: Update xmlhttprequester.js (fix error in console)

David Prévot taffit at moszumanska.debian.org
Wed May 20 02:43:37 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository greasemonkey.

commit 3f9f13c3a8c8570c4451a654e537c2b326d282e5
Author: janekptacijarabaci <janekptacijarabaci at users.noreply.github.com>
Date:   Sun May 3 16:02:02 2015 +0200

    Update xmlhttprequester.js (fix error in console)
---
 modules/xmlhttprequester.js | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/modules/xmlhttprequester.js b/modules/xmlhttprequester.js
index 15f10b1..c6e8d19 100644
--- a/modules/xmlhttprequester.js
+++ b/modules/xmlhttprequester.js
@@ -68,7 +68,12 @@ GM_xmlhttpRequester.prototype.contentStartRequest = function(details) {
     rv.finalUrl = req.finalUrl;
     rv.readyState = req.readyState;
     rv.responseHeaders = req.getAllResponseHeaders();
-    rv.responseText = req.responseText;
+    try {
+      rv.responseText = req.responseText;
+    } catch (e) {
+      // Some response types don't have .responseText (but do have e.g. blob
+      // .response).  Ignore.
+    }
     rv.status = req.status;
     rv.statusText = req.statusText;
   }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/greasemonkey.git



More information about the Pkg-mozext-commits mailing list