Address Yury's comments.

This commit is contained in:
Brendan Dahl 2011-12-01 09:11:33 -08:00
parent cddb106358
commit 3ae06c96ad
3 changed files with 4 additions and 3 deletions

View File

@ -45,7 +45,7 @@ function getPdf(arg, callback) {
var data = (xhr.mozResponseArrayBuffer || xhr.mozResponse || var data = (xhr.mozResponseArrayBuffer || xhr.mozResponse ||
xhr.responseArrayBuffer || xhr.response); xhr.responseArrayBuffer || xhr.response);
callback(data); callback(data);
} else { } else if (params.error) {
params.error(e); params.error(e);
} }
} }

View File

@ -75,10 +75,11 @@ var WorkerMessageHandler = {
var start = Date.now(); var start = Date.now();
var dependency = []; var dependency = [];
var IRQueue = null;
try { try {
var page = pdfDoc.getPage(pageNum); var page = pdfDoc.getPage(pageNum);
// Pre compile the pdf page and fetch the fonts/images. // Pre compile the pdf page and fetch the fonts/images.
var IRQueue = page.getIRQueue(handler, dependency); IRQueue = page.getIRQueue(handler, dependency);
} catch (e) { } catch (e) {
// Turn the error into an obj that can be serialized // Turn the error into an obj that can be serialized
e = { e = {

View File

@ -109,7 +109,7 @@
</div> </div>
<div id="errorMessageRight"> <div id="errorMessageRight">
<button id="errorClose" oncontextmenu="return false;"> <button id="errorClose" oncontextmenu="return false;">
X Close
</button> </button>
</div> </div>
<div class="clearBoth"></div> <div class="clearBoth"></div>