If I'm not mistaken, CHUNK_SIZE was declared as a local variable in a
closure in a different file. Should I move the original declaration, or add
a new local constant in this file (worker.js)?
On Feb 8, 2014 1:12 AM, "Yury Delendik" <notifications@github.com> wrote:

> In src/core/worker.js:
>
> > @@ -119,6 +119,13 @@ var WorkerMessageHandler = PDFJS.WorkerMessageHandler = {
> >            if (!isInt(length)) {
> >              return;
> >            }
> > +          source.length = length;
> > +          if (length <= 65536) { // 65536 = CHUNK_SIZE in pdf_manager.js
>
> Make it a constant and place it near CHUNK_SIZE. Also it makes sense to
> double it since beginning and ending of the file is always requested.
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/mozilla/pdf.js/pull/4258/files#r9560318>
> .
>