Browse Source

PDF.js version 1.2.41 - See mozilla/pdf.js@b56b41514ca88741fe9d22f4cdc79ac2765856c0

master v1.2.41
Pdf Bot 9 years ago
parent
commit
ea8373efdc
  1. 2
      bower.json
  2. 26
      build/pdf.combined.js
  3. 26
      build/pdf.js
  4. 4
      build/pdf.worker.js
  5. 2
      package.json

2
bower.json

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
{
"name": "pdfjs-dist",
"version": "1.2.39",
"version": "1.2.41",
"main": [
"build/pdf.js",
"build/pdf.worker.js"

26
build/pdf.combined.js

@ -22,8 +22,8 @@ if (typeof PDFJS === 'undefined') { @@ -22,8 +22,8 @@ if (typeof PDFJS === 'undefined') {
(typeof window !== 'undefined' ? window : this).PDFJS = {};
}
PDFJS.version = '1.2.39';
PDFJS.build = '7e79ce4';
PDFJS.version = '1.2.41';
PDFJS.build = 'b56b415';
(function pdfjsWrapper() {
// Use strict in our context only - users might not want it
@ -2820,6 +2820,10 @@ var WorkerTransport = (function WorkerTransportClosure() { @@ -2820,6 +2820,10 @@ var WorkerTransport = (function WorkerTransportClosure() {
}, this);
messageHandler.on('commonobj', function transportObj(data) {
if (this.destroyed) {
return; // Ignore any pending requests if the worker was terminated.
}
var id = data[0];
var type = data[1];
if (this.commonObjs.hasData(id)) {
@ -2856,6 +2860,10 @@ var WorkerTransport = (function WorkerTransportClosure() { @@ -2856,6 +2860,10 @@ var WorkerTransport = (function WorkerTransportClosure() {
}, this);
messageHandler.on('obj', function transportObj(data) {
if (this.destroyed) {
return; // Ignore any pending requests if the worker was terminated.
}
var id = data[0];
var pageIndex = data[1];
var type = data[2];
@ -2887,6 +2895,10 @@ var WorkerTransport = (function WorkerTransportClosure() { @@ -2887,6 +2895,10 @@ var WorkerTransport = (function WorkerTransportClosure() {
}, this);
messageHandler.on('DocProgress', function transportDocProgress(data) {
if (this.destroyed) {
return; // Ignore any pending requests if the worker was terminated.
}
var loadingTask = this.loadingTask;
if (loadingTask.onProgress) {
loadingTask.onProgress({
@ -2897,6 +2909,10 @@ var WorkerTransport = (function WorkerTransportClosure() { @@ -2897,6 +2909,10 @@ var WorkerTransport = (function WorkerTransportClosure() {
}, this);
messageHandler.on('PageError', function transportError(data) {
if (this.destroyed) {
return; // Ignore any pending requests if the worker was terminated.
}
var page = this.pageCache[data.pageNum - 1];
var intentState = page.intentStates[data.intent];
if (intentState.displayReadyCapability) {
@ -2907,6 +2923,10 @@ var WorkerTransport = (function WorkerTransportClosure() { @@ -2907,6 +2923,10 @@ var WorkerTransport = (function WorkerTransportClosure() {
}, this);
messageHandler.on('JpegDecode', function(data) {
if (this.destroyed) {
return Promise.reject('Worker was terminated');
}
var imageUrl = data[0];
var components = data[1];
if (components !== 3 && components !== 1) {
@ -2946,7 +2966,7 @@ var WorkerTransport = (function WorkerTransportClosure() { @@ -2946,7 +2966,7 @@ var WorkerTransport = (function WorkerTransportClosure() {
};
img.src = imageUrl;
});
});
}, this);
},
fetchDocument: function WorkerTransport_fetchDocument(loadingTask, source) {

26
build/pdf.js

@ -22,8 +22,8 @@ if (typeof PDFJS === 'undefined') { @@ -22,8 +22,8 @@ if (typeof PDFJS === 'undefined') {
(typeof window !== 'undefined' ? window : this).PDFJS = {};
}
PDFJS.version = '1.2.39';
PDFJS.build = '7e79ce4';
PDFJS.version = '1.2.41';
PDFJS.build = 'b56b415';
(function pdfjsWrapper() {
// Use strict in our context only - users might not want it
@ -2873,6 +2873,10 @@ var WorkerTransport = (function WorkerTransportClosure() { @@ -2873,6 +2873,10 @@ var WorkerTransport = (function WorkerTransportClosure() {
}, this);
messageHandler.on('commonobj', function transportObj(data) {
if (this.destroyed) {
return; // Ignore any pending requests if the worker was terminated.
}
var id = data[0];
var type = data[1];
if (this.commonObjs.hasData(id)) {
@ -2909,6 +2913,10 @@ var WorkerTransport = (function WorkerTransportClosure() { @@ -2909,6 +2913,10 @@ var WorkerTransport = (function WorkerTransportClosure() {
}, this);
messageHandler.on('obj', function transportObj(data) {
if (this.destroyed) {
return; // Ignore any pending requests if the worker was terminated.
}
var id = data[0];
var pageIndex = data[1];
var type = data[2];
@ -2940,6 +2948,10 @@ var WorkerTransport = (function WorkerTransportClosure() { @@ -2940,6 +2948,10 @@ var WorkerTransport = (function WorkerTransportClosure() {
}, this);
messageHandler.on('DocProgress', function transportDocProgress(data) {
if (this.destroyed) {
return; // Ignore any pending requests if the worker was terminated.
}
var loadingTask = this.loadingTask;
if (loadingTask.onProgress) {
loadingTask.onProgress({
@ -2950,6 +2962,10 @@ var WorkerTransport = (function WorkerTransportClosure() { @@ -2950,6 +2962,10 @@ var WorkerTransport = (function WorkerTransportClosure() {
}, this);
messageHandler.on('PageError', function transportError(data) {
if (this.destroyed) {
return; // Ignore any pending requests if the worker was terminated.
}
var page = this.pageCache[data.pageNum - 1];
var intentState = page.intentStates[data.intent];
if (intentState.displayReadyCapability) {
@ -2960,6 +2976,10 @@ var WorkerTransport = (function WorkerTransportClosure() { @@ -2960,6 +2976,10 @@ var WorkerTransport = (function WorkerTransportClosure() {
}, this);
messageHandler.on('JpegDecode', function(data) {
if (this.destroyed) {
return Promise.reject('Worker was terminated');
}
var imageUrl = data[0];
var components = data[1];
if (components !== 3 && components !== 1) {
@ -2999,7 +3019,7 @@ var WorkerTransport = (function WorkerTransportClosure() { @@ -2999,7 +3019,7 @@ var WorkerTransport = (function WorkerTransportClosure() {
};
img.src = imageUrl;
});
});
}, this);
},
fetchDocument: function WorkerTransport_fetchDocument(loadingTask, source) {

4
build/pdf.worker.js vendored

@ -22,8 +22,8 @@ if (typeof PDFJS === 'undefined') { @@ -22,8 +22,8 @@ if (typeof PDFJS === 'undefined') {
(typeof window !== 'undefined' ? window : this).PDFJS = {};
}
PDFJS.version = '1.2.39';
PDFJS.build = '7e79ce4';
PDFJS.version = '1.2.41';
PDFJS.build = 'b56b415';
(function pdfjsWrapper() {
// Use strict in our context only - users might not want it

2
package.json

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
{
"name": "pdfjs-dist",
"version": "1.2.39",
"version": "1.2.41",
"description": "Generic build of Mozilla's PDF.js library.",
"keywords": [
"Mozilla",

Loading…
Cancel
Save