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

Make getOperatorList() calls independent and merge queues at end

This commit is contained in:
Mack Duan 2013-04-08 15:14:56 -07:00
parent 6b2c6fc223
commit dbccbaaa27
10 changed files with 1208 additions and 753 deletions

View file

@ -67,7 +67,7 @@ var BasePdfManager = (function BasePdfManagerClosure() {
var LocalPdfManager = (function LocalPdfManagerClosure() {
function LocalPdfManager(data, password) {
var stream = new Stream(data);
this.pdfModel = new PDFDocument(stream, password);
this.pdfModel = new PDFDocument(this, stream, password);
this.loadedStream = new PDFJS.Promise();
this.loadedStream.resolve(stream);
}
@ -124,13 +124,14 @@ var NetworkPdfManager = (function NetworkPdfManagerClosure() {
this.streamManager = new ChunkedStreamManager(args.length, CHUNK_SIZE,
args.url, params);
this.pdfModel = new PDFDocument(this.streamManager.getStream(),
this.pdfModel = new PDFDocument(this, this.streamManager.getStream(),
args.password);
}
NetworkPdfManager.prototype = Object.create(BasePdfManager.prototype);
NetworkPdfManager.prototype.constructor = NetworkPdfManager;
// FIXME(mack): Make ensure() use array for all arguments
NetworkPdfManager.prototype.ensure =
function NetworkPdfManager_ensure(obj, prop) {
var promise = new PDFJS.Promise();