From af815e417d3ba1306404ba0767971370116bcc03 Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Mon, 1 Jun 2020 00:55:10 +0200 Subject: [PATCH] Ensure that that we don't attempt to cache *inline* images in the `GlobalImageCache` (PR 11912 follow-up) Since *inline* images, i.e. those defined inside of `/Contents` streams, are by their very definition page-specific it thus seem like a good idea to actually enforce that they won't accidentally end up in the `GlobalImageCache`. --- src/core/evaluator.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/evaluator.js b/src/core/evaluator.js index 05e033244..7b101d30a 100644 --- a/src/core/evaluator.js +++ b/src/core/evaluator.js @@ -605,6 +605,7 @@ var PartialEvaluator = (function PartialEvaluatorClosure() { }); if (imageRef) { + assert(!isInline, "Cannot cache an inline image globally."); this.globalImageCache.addPageIndex(imageRef, this.pageIndex); if (cacheGlobally) {