Remove the typed array check when calling LoopbackPort
in PDFWorker._setupFakeWorker
With version 2.0, native support for typed arrays is now a requirement for using the PDF.js library; see PR 9094 where the old polyfills were removed. Hence the `isTypedArraysPresent` check, when setting up fake workers, no longer serves any purpose here and can thus be removed.
This commit is contained in:
parent
76337fdc49
commit
3c5c8d2a0b
@ -1553,12 +1553,7 @@ var PDFWorker = (function PDFWorkerClosure() {
|
||||
this._readyCapability.reject(new Error('Worker was destroyed'));
|
||||
return;
|
||||
}
|
||||
|
||||
// We cannot turn on proper fake port simulation (this includes
|
||||
// structured cloning) when typed arrays are not supported. Relying
|
||||
// on a chance that messages will be sent in proper order.
|
||||
var isTypedArraysPresent = Uint8Array !== Float32Array;
|
||||
var port = new LoopbackPort(isTypedArraysPresent);
|
||||
let port = new LoopbackPort();
|
||||
this._port = port;
|
||||
|
||||
// All fake workers use the same port, making id unique.
|
||||
|
Loading…
Reference in New Issue
Block a user