Add a totalLength getter to OperatorList, since the length is zero after flushing

In the `RenderPageRequest` handler in `worker.js`, we attempt to print an `info` message containing the rendering time and the length of the operator list. The latter is currently broken (and has been for quite some time), since the `length` of an `OperatorList` is reset when flushing occurs.
This patch attempts to rectify this, by adding a getter which keeps track of the total length.
This commit is contained in:
Jonas Jenwald 2015-10-26 16:38:06 +01:00
parent aae82ec4c5
commit 1c66d4a106
3 changed files with 35 additions and 2 deletions

View file

@ -467,7 +467,7 @@ var WorkerMessageHandler = PDFJS.WorkerMessageHandler = {
finishWorkerTask(task);
info('page=' + pageNum + ' - getOperatorList: time=' +
(Date.now() - start) + 'ms, len=' + operatorList.fnArray.length);
(Date.now() - start) + 'ms, len=' + operatorList.totalLength);
}, function(e) {
finishWorkerTask(task);
if (task.terminated) {