1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-26 10:08:06 +02:00

Adds thread abort capabilities.

This commit is contained in:
Yury Delendik 2015-10-20 20:50:32 -05:00
parent 59c13b32aa
commit 58c3ea0820
6 changed files with 186 additions and 53 deletions

View file

@ -161,7 +161,7 @@ var Page = (function PageClosure() {
}.bind(this));
},
getOperatorList: function Page_getOperatorList(handler, intent) {
getOperatorList: function Page_getOperatorList(handler, task, intent) {
var self = this;
var pdfManager = this.pdfManager;
@ -194,8 +194,8 @@ var Page = (function PageClosure() {
pageIndex: self.pageIndex,
intent: intent
});
return partialEvaluator.getOperatorList(contentStream, self.resources,
opList).then(function () {
return partialEvaluator.getOperatorList(contentStream, task,
self.resources, opList).then(function () {
return opList;
});
});
@ -212,7 +212,7 @@ var Page = (function PageClosure() {
}
var annotationsReadyPromise = Annotation.appendToOperatorList(
annotations, pageOpList, pdfManager, partialEvaluator, intent);
annotations, pageOpList, pdfManager, partialEvaluator, task, intent);
return annotationsReadyPromise.then(function () {
pageOpList.flush(true);
return pageOpList;
@ -220,7 +220,7 @@ var Page = (function PageClosure() {
});
},
extractTextContent: function Page_extractTextContent() {
extractTextContent: function Page_extractTextContent(task) {
var handler = {
on: function nullHandlerOn() {},
send: function nullHandlerSend() {}
@ -249,6 +249,7 @@ var Page = (function PageClosure() {
self.fontCache);
return partialEvaluator.getTextContent(contentStream,
task,
self.resources);
});
},