Merge pull request #3760 from jribbens/patch-1
Fix bug in api.js whereby fake workers didn't load the worker code
This commit is contained in:
commit
f7b2b2e1f2
@ -540,11 +540,14 @@ var WorkerTransport = (function WorkerTransportClosure() {
|
|||||||
if (supportTypedArray) {
|
if (supportTypedArray) {
|
||||||
this.worker = worker;
|
this.worker = worker;
|
||||||
this.setupMessageHandler(messageHandler);
|
this.setupMessageHandler(messageHandler);
|
||||||
|
workerInitializedPromise.resolve();
|
||||||
} else {
|
} else {
|
||||||
globalScope.PDFJS.disableWorker = true;
|
globalScope.PDFJS.disableWorker = true;
|
||||||
this.setupFakeWorker();
|
this.loadFakeWorkerFiles().then(function() {
|
||||||
|
this.setupFakeWorker();
|
||||||
|
workerInitializedPromise.resolve();
|
||||||
|
}.bind(this));
|
||||||
}
|
}
|
||||||
workerInitializedPromise.resolve();
|
|
||||||
}.bind(this));
|
}.bind(this));
|
||||||
|
|
||||||
var testObj = new Uint8Array(1);
|
var testObj = new Uint8Array(1);
|
||||||
|
Loading…
Reference in New Issue
Block a user