Remove unused methods from NetworkManager, in src/display/network.js

Both of the removed methods were added in PR 2719, however they are no longer used:
 - It appears that `hasPendingRequests` was never used at all, even from the beginning.
 - The only general PDF.js library usage of `abortAllRequests` was removed in PR 6879, which is now four years ago. (Originally the Firefox-specific network implementation, see https://searchfox.org/mozilla-central/source/browser/extensions/pdfjs/content/PdfJsNetwork.jsm, was shared with the `src/display/network.js` file and *there* this method is used. However, since all of the Firefox-specific code now lives directly in mozilla-central, that's not relevant for the removal in this patch.)
This commit is contained in:
Jonas Jenwald 2020-06-07 16:03:32 +02:00
parent c97200ff59
commit 466d10f6fc

View File

@ -198,13 +198,6 @@ class NetworkManager {
}
}
hasPendingRequests() {
for (const xhrId in this.pendingRequests) {
return true;
}
return false;
}
getRequestXhr(xhrId) {
return this.pendingRequests[xhrId].xhr;
}
@ -213,12 +206,6 @@ class NetworkManager {
return xhrId in this.pendingRequests;
}
abortAllRequests() {
for (const xhrId in this.pendingRequests) {
this.abortRequest(xhrId | 0);
}
}
abortRequest(xhrId) {
const xhr = this.pendingRequests[xhrId].xhr;
delete this.pendingRequests[xhrId];