pdf.js/src
Jonas Jenwald 983b25f863 Ensure that blob: URLs will be revoked when pages are cleaned-up/destroyed
Natively supported JPEG images are sent as-is, using a `blob:` or possibly a `data` URL, to the main-thread for loading/decoding.
However there's currently no attempt at releasing these resources, which are held alive by `blob:` URLs, which seems unfortunately given that images can be arbitrarily large.

As mentioned in https://developer.mozilla.org/en-US/docs/Web/API/URL/createObjectURL the lifetime of these URLs are tied to the document, hence they are not being removed when a page is cleaned-up/destroyed (e.g. when being removed from the `PDFPageViewBuffer` in the viewer).
This is easy to test with the help of `about:memory` (in Firefox), which clearly shows the number of `blob:` URLs becomming arbitrarily large *without* this patch. With this patch however the `blob:` URLs are immediately release upon clean-up as expected, and the memory consumption should thus be considerably reduced for long documents with (simple) JPEG images.
2019-03-15 10:40:58 +01:00
..
core Try to improve text-selection for Type3 fonts that utilize a non-default /FontMatrix (bug 1513120) 2019-03-12 10:32:08 +01:00
display Ensure that blob: URLs will be revoked when pages are cleaned-up/destroyed 2019-03-15 10:40:58 +01:00
images Vectorize the logo. 2012-10-29 14:08:52 -04:00
shared Try to improve text-selection for Type3 fonts that utilize a non-default /FontMatrix (bug 1513120) 2019-03-12 10:32:08 +01:00
doc_helper.js [api-major] Completely remove the global PDFJS object 2018-03-01 18:13:27 +01:00
interfaces.js Move the interface definitions out of src/core/worker.js and into their own file 2018-11-08 13:21:37 +01:00
license_header_libre.js Update the year in the license_header files 2019-02-24 00:35:42 +01:00
license_header.js Update the year in the license_header files 2019-02-24 00:35:42 +01:00
pdf.image_decoders.js Add a gulp image_decoders command to allow packaging/distributing the image decoders (i.e. jpg.js, jpx.js, jbig2.js) separately from the main PDF.js library 2018-06-16 17:56:54 +02:00
pdf.js Avoid using the Fetch API, in GENERIC builds, for unsupported protocols (issue 10587) 2019-02-27 13:04:20 +01:00
pdf.worker.entry.js Rename the globals to shorter names. 2018-03-16 11:08:56 -07:00
pdf.worker.js Stop bundling the ReadableStream polyfill in MOZCENTRAL builds (PR 10470 follow-up) 2019-01-23 20:33:20 +01:00
worker_loader.js Moves global scope out of shared/util. 2017-08-22 18:20:52 -05:00