Handle the error in RequestListener.receive
This commit is contained in:
parent
3699c311bb
commit
b605e1e8a9
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user