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:
Brendan Dahl 2013-10-30 10:47:38 -07:00
commit f7b2b2e1f2

View File

@ -540,11 +540,14 @@ var WorkerTransport = (function WorkerTransportClosure() {
if (supportTypedArray) {
this.worker = worker;
this.setupMessageHandler(messageHandler);
workerInitializedPromise.resolve();
} else {
globalScope.PDFJS.disableWorker = true;
this.setupFakeWorker();
this.loadFakeWorkerFiles().then(function() {
this.setupFakeWorker();
workerInitializedPromise.resolve();
}.bind(this));
}
workerInitializedPromise.resolve();
}.bind(this));
var testObj = new Uint8Array(1);