Handle the error in RequestListener.receive

This commit is contained in:
vyv03354 2013-02-04 22:06:46 +09:00
parent 3699c311bb
commit b605e1e8a9

View File

@ -467,7 +467,13 @@ RequestListener.prototype.receive = function(event) {
response = null;
} else {
response = function sendResponse(response) {
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');
listener.initEvent('pdf.js.response', true, false);