1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-26 10:08:06 +02:00

Increases page cache size when needed

This commit is contained in:
Yury Delendik 2014-06-17 13:41:40 -05:00
parent 0f0f0688a1
commit df87df59b6
2 changed files with 12 additions and 2 deletions

View file

@ -255,5 +255,11 @@ var Cache = function cacheCache(size) {
data.shift().destroy();
}
};
this.resize = function (newSize) {
size = newSize;
while (data.length > size) {
data.shift().destroy();
}
};
};