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

Address more of brendan's comments

This commit is contained in:
Mack Duan 2013-04-18 10:41:33 -07:00
parent 27fe18e8c6
commit 2ce00279be
7 changed files with 95 additions and 66 deletions

View file

@ -17,8 +17,8 @@
/* globals assertWellFormed, bytesToString, CipherTransformFactory, error, info,
InvalidPDFException, isArray, isCmd, isDict, isInt, isName, isRef,
isStream, JpegStream, Lexer, log, Page, Parser, Promise, shadow,
stringToPDFString, stringToUTF8String, warn, isString, assert, PDFJS,
MissingDataException, XRefParseException, Stream */
stringToPDFString, stringToUTF8String, warn, isString, assert,
Promise, MissingDataException, XRefParseException, Stream */
'use strict';
@ -339,7 +339,7 @@ var Catalog = (function CatalogClosure() {
getPage: function Catalog_getPage(pageIndex) {
if (!(pageIndex in this.pagePromises)) {
this.pagePromises[pageIndex] = new PDFJS.Promise();
this.pagePromises[pageIndex] = new Promise();
}
return this.pagePromises[pageIndex];
},
@ -367,7 +367,7 @@ var Catalog = (function CatalogClosure() {
var page = new Page(this.pdfManager, this.xref, pageIndex, kid,
kidRef);
if (!(pageIndex in this.pagePromises)) {
this.pagePromises[pageIndex] = new PDFJS.Promise();
this.pagePromises[pageIndex] = new Promise();
}
this.pagePromises[pageIndex].resolve(page);