mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 17:30:09 +02:00
Replaces literal {} created lookup tables with Object.create
This commit is contained in:
parent
d6adf84159
commit
2edf2792dc
18 changed files with 106 additions and 104 deletions
|
@ -434,7 +434,7 @@ var PDFFunction = (function PDFFunctionClosure() {
|
|||
var evaluator = new PostScriptEvaluator(code);
|
||||
// Cache the values for a big speed up, the cache size is limited though
|
||||
// since the number of possible values can be huge from a PS function.
|
||||
var cache = {};
|
||||
var cache = Object.create(null);
|
||||
// The MAX_CACHE_SIZE is set to ~4x the maximum number of distinct values
|
||||
// seen in our tests.
|
||||
var MAX_CACHE_SIZE = 2048 * 4;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue