Browse Source

Handle the error in RequestListener.receive

vyv03354 12 years ago
parent
commit
b605e1e8a9
  1. 8
      extensions/firefox/components/PdfStreamConverter.js

8
extensions/firefox/components/PdfStreamConverter.js

@ -467,7 +467,13 @@ RequestListener.prototype.receive = function(event) {
response = null; response = null;
} else { } else {
response = function sendResponse(response) { response = function sendResponse(response) {
message.setUserData('response', response, null); try {
message.setUserData('response', response, null);
} catch (e) {
// message is no longer accessible because the sender is already
// gone. the unloaded sender cannot receive the response anyway.
return false;
}
var listener = doc.createEvent('HTMLEvents'); var listener = doc.createEvent('HTMLEvents');
listener.initEvent('pdf.js.response', true, false); listener.initEvent('pdf.js.response', true, false);

Loading…
Cancel
Save