mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Test refactoring for async api.
This commit is contained in:
parent
3b83a42a91
commit
5608f8e445
3 changed files with 47 additions and 38 deletions
|
@ -15,7 +15,6 @@
|
|||
// all requirements to run parts of pdf.js in a web worker.
|
||||
// Right now, the requirement is, that an Uint8Array is still an Uint8Array
|
||||
// as it arrives on the worker. Chrome added this with version 15.
|
||||
globalScope.PDFJS.disableWorker = true;
|
||||
if (!globalScope.PDFJS.disableWorker && typeof Worker !== 'undefined') {
|
||||
var workerSrc = PDFJS.workerSrc;
|
||||
if (typeof workerSrc === 'undefined') {
|
||||
|
@ -203,7 +202,7 @@
|
|||
|
||||
getPage: function WorkerTransport_getPage(n, promise) {
|
||||
if (this.pageCache[n - 1]) {
|
||||
promise.resolve(pageCache[n - 1]);
|
||||
promise.resolve(this.pageCache[n - 1]);
|
||||
return;
|
||||
}
|
||||
if ((n - 1) in this.pagePromises) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue