Fix iframe load stopping if attachment resource channel aborts (#67)
This commit is contained in:
parent
827edccfbd
commit
278f2de7bd
1 changed files with 10 additions and 2 deletions
|
@ -1411,7 +1411,12 @@ AsyncChannel.prototype = {
|
||||||
},
|
},
|
||||||
onDataAvailable: function (request, inputStream, offset, count) {
|
onDataAvailable: function (request, inputStream, offset, count) {
|
||||||
//Zotero.debug("onDataAvailable");
|
//Zotero.debug("onDataAvailable");
|
||||||
streamListener.onDataAvailable(channel, inputStream, offset, count);
|
try {
|
||||||
|
streamListener.onDataAvailable(channel, inputStream, offset, count);
|
||||||
|
}
|
||||||
|
catch (e) {
|
||||||
|
channel.cancel(e.result);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
onStopRequest: function (request, status) {
|
onStopRequest: function (request, status) {
|
||||||
//Zotero.debug("Stopping request");
|
//Zotero.debug("Stopping request");
|
||||||
|
@ -1515,7 +1520,10 @@ AsyncChannel.prototype = {
|
||||||
}
|
}
|
||||||
throw e;
|
throw e;
|
||||||
} finally {
|
} finally {
|
||||||
if (channel.loadGroup) channel.loadGroup.removeRequest(channel, null, 0);
|
try {
|
||||||
|
if (channel.loadGroup) channel.loadGroup.removeRequest(channel, null, 0);
|
||||||
|
}
|
||||||
|
catch (e) {}
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue