Browse Source

PDF.js version 1.9.611 - See mozilla/pdf.js@d03e127434acfab5f35b3e34d651a19b84de8954

master v1.9.611
pdfjsbot 7 years ago
parent
commit
91601b45f1
  1. 2
      bower.json
  2. 47
      build/pdf.combined.js
  3. 2
      build/pdf.combined.js.map
  4. 47
      build/pdf.js
  5. 2
      build/pdf.js.map
  6. 2
      build/pdf.min.js
  7. 33
      build/pdf.worker.js
  8. 2
      build/pdf.worker.js.map
  9. 2
      build/pdf.worker.min.js
  10. 4
      lib/core/worker.js
  11. 14
      lib/display/api.js
  12. 4
      lib/display/global.js
  13. 4
      lib/pdf.js
  14. 4
      lib/pdf.worker.js
  15. 25
      lib/shared/util.js
  16. 2
      package.json

2
bower.json

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

47
build/pdf.combined.js

@ -1393,8 +1393,31 @@ MessageHandler.prototype = { @@ -1393,8 +1393,31 @@ MessageHandler.prototype = {
this.comObj.postMessage(message);
}
},
destroy: function destroy() {
close: function close(reason) {
this.comObj.removeEventListener('message', this._onComObjOnMessage);
for (var i in this.callbacksCapabilities) {
var callbackCapability = this.callbacksCapabilities[i];
callbackCapability.reject(reason);
}
for (var _i in this.streamSinks) {
var sink = this.streamSinks[_i];
sink.sinkCapability.reject(reason);
}
for (var _i2 in this.streamControllers) {
var controller = this.streamControllers[_i2];
if (!controller.isClosed) {
controller.controller.error(reason);
}
if (controller.startCall) {
controller.startCall.reject(reason);
}
if (controller.pullCall) {
controller.pullCall.reject(reason);
}
if (controller.cancelCall) {
controller.cancelCall.reject(reason);
}
}
}
};
function loadJpegStream(id, imageUrl, objs) {
@ -11344,7 +11367,7 @@ function _fetchDocument(worker, source, pdfDataRangeTransport, docId) { @@ -11344,7 +11367,7 @@ function _fetchDocument(worker, source, pdfDataRangeTransport, docId) {
if (worker.destroyed) {
return Promise.reject(new Error('Worker was destroyed'));
}
var apiVersion = '1.9.609';
var apiVersion = '1.9.611';
source.disableAutoFetch = (0, _dom_utils.getDefaultSetting)('disableAutoFetch');
source.disableStream = (0, _dom_utils.getDefaultSetting)('disableStream');
source.chunkedViewerLoading = !!pdfDataRangeTransport;
@ -11972,7 +11995,7 @@ var PDFWorker = function PDFWorkerClosure() { @@ -11972,7 +11995,7 @@ var PDFWorker = function PDFWorkerClosure() {
pdfWorkerPorts.delete(this._port);
this._port = null;
if (this._messageHandler) {
this._messageHandler.destroy();
this._messageHandler.close(new _util.AbortException('Worker was destroyed'));
this._messageHandler = null;
}
}
@ -12034,7 +12057,7 @@ var WorkerTransport = function WorkerTransportClosure() { @@ -12034,7 +12057,7 @@ var WorkerTransport = function WorkerTransportClosure() {
_this7._networkStream.cancelAllRequests();
}
if (_this7.messageHandler) {
_this7.messageHandler.destroy();
_this7.messageHandler.close(new _util.AbortException('Worker was destroyed'));
_this7.messageHandler = null;
}
_this7.destroyCapability.resolve();
@ -12648,8 +12671,8 @@ var _UnsupportedManager = function UnsupportedManagerClosure() { @@ -12648,8 +12671,8 @@ var _UnsupportedManager = function UnsupportedManagerClosure() {
}();
var version, build;
{
exports.version = version = '1.9.609';
exports.build = build = '3717757b';
exports.version = version = '1.9.611';
exports.build = build = 'd03e1274';
}
exports.getDocument = getDocument;
exports.LoopbackPort = LoopbackPort;
@ -29776,8 +29799,8 @@ exports.SVGGraphics = SVGGraphics; @@ -29776,8 +29799,8 @@ exports.SVGGraphics = SVGGraphics;
"use strict";
var pdfjsVersion = '1.9.609';
var pdfjsBuild = '3717757b';
var pdfjsVersion = '1.9.611';
var pdfjsBuild = 'd03e1274';
var pdfjsSharedUtil = __w_pdfjs_require__(0);
var pdfjsDisplayGlobal = __w_pdfjs_require__(98);
var pdfjsDisplayAPI = __w_pdfjs_require__(54);
@ -35639,8 +35662,8 @@ if (!_global_scope2.default.PDFJS) { @@ -35639,8 +35662,8 @@ if (!_global_scope2.default.PDFJS) {
}
var PDFJS = _global_scope2.default.PDFJS;
{
PDFJS.version = '1.9.609';
PDFJS.build = '3717757b';
PDFJS.version = '1.9.611';
PDFJS.build = 'd03e1274';
}
PDFJS.pdfBug = false;
if (PDFJS.verbosity !== undefined) {
@ -38598,7 +38621,7 @@ var WorkerMessageHandler = { @@ -38598,7 +38621,7 @@ var WorkerMessageHandler = {
var cancelXHRs = null;
var WorkerTasks = [];
var apiVersion = docParams.apiVersion;
var workerVersion = '1.9.609';
var workerVersion = '1.9.611';
if (apiVersion !== null && apiVersion !== workerVersion) {
throw new Error('The API version "' + apiVersion + '" does not match ' + ('the Worker version "' + workerVersion + '".'));
}
@ -38961,7 +38984,7 @@ var WorkerMessageHandler = { @@ -38961,7 +38984,7 @@ var WorkerMessageHandler = {
task.terminate();
});
return Promise.all(waitOn).then(function () {
handler.destroy();
handler.close(new _util.AbortException('Worker was terminated'));
handler = null;
});
});

2
build/pdf.combined.js.map

File diff suppressed because one or more lines are too long

47
build/pdf.js

@ -1393,8 +1393,31 @@ MessageHandler.prototype = { @@ -1393,8 +1393,31 @@ MessageHandler.prototype = {
this.comObj.postMessage(message);
}
},
destroy: function destroy() {
close: function close(reason) {
this.comObj.removeEventListener('message', this._onComObjOnMessage);
for (var i in this.callbacksCapabilities) {
var callbackCapability = this.callbacksCapabilities[i];
callbackCapability.reject(reason);
}
for (var _i in this.streamSinks) {
var sink = this.streamSinks[_i];
sink.sinkCapability.reject(reason);
}
for (var _i2 in this.streamControllers) {
var controller = this.streamControllers[_i2];
if (!controller.isClosed) {
controller.controller.error(reason);
}
if (controller.startCall) {
controller.startCall.reject(reason);
}
if (controller.pullCall) {
controller.pullCall.reject(reason);
}
if (controller.cancelCall) {
controller.cancelCall.reject(reason);
}
}
}
};
function loadJpegStream(id, imageUrl, objs) {
@ -2949,7 +2972,7 @@ function _fetchDocument(worker, source, pdfDataRangeTransport, docId) { @@ -2949,7 +2972,7 @@ function _fetchDocument(worker, source, pdfDataRangeTransport, docId) {
if (worker.destroyed) {
return Promise.reject(new Error('Worker was destroyed'));
}
var apiVersion = '1.9.609';
var apiVersion = '1.9.611';
source.disableAutoFetch = (0, _dom_utils.getDefaultSetting)('disableAutoFetch');
source.disableStream = (0, _dom_utils.getDefaultSetting)('disableStream');
source.chunkedViewerLoading = !!pdfDataRangeTransport;
@ -3558,7 +3581,7 @@ var PDFWorker = function PDFWorkerClosure() { @@ -3558,7 +3581,7 @@ var PDFWorker = function PDFWorkerClosure() {
var messageHandler = new _util.MessageHandler('main', 'worker', worker);
var terminateEarly = function terminateEarly() {
worker.removeEventListener('error', onWorkerError);
messageHandler.destroy();
messageHandler.close(new Error('Worker was terminated'));
worker.terminate();
if (_this6.destroyed) {
_this6._readyCapability.reject(new Error('Worker was destroyed'));
@ -3591,7 +3614,7 @@ var PDFWorker = function PDFWorkerClosure() { @@ -3591,7 +3614,7 @@ var PDFWorker = function PDFWorkerClosure() {
messageHandler.send('configure', { verbosity: (0, _util.getVerbosityLevel)() });
} else {
_this6._setupFakeWorker();
messageHandler.destroy();
messageHandler.close(new Error('Worker was terminated'));
worker.terminate();
}
});
@ -3664,7 +3687,7 @@ var PDFWorker = function PDFWorkerClosure() { @@ -3664,7 +3687,7 @@ var PDFWorker = function PDFWorkerClosure() {
pdfWorkerPorts.delete(this._port);
this._port = null;
if (this._messageHandler) {
this._messageHandler.destroy();
this._messageHandler.close(new _util.AbortException('Worker was destroyed'));
this._messageHandler = null;
}
}
@ -3726,7 +3749,7 @@ var WorkerTransport = function WorkerTransportClosure() { @@ -3726,7 +3749,7 @@ var WorkerTransport = function WorkerTransportClosure() {
_this8._networkStream.cancelAllRequests();
}
if (_this8.messageHandler) {
_this8.messageHandler.destroy();
_this8.messageHandler.close(new _util.AbortException('Worker was destroyed'));
_this8.messageHandler = null;
}
_this8.destroyCapability.resolve();
@ -4340,8 +4363,8 @@ var _UnsupportedManager = function UnsupportedManagerClosure() { @@ -4340,8 +4363,8 @@ var _UnsupportedManager = function UnsupportedManagerClosure() {
}();
var version, build;
{
exports.version = version = '1.9.609';
exports.build = build = '3717757b';
exports.version = version = '1.9.611';
exports.build = build = 'd03e1274';
}
exports.getDocument = getDocument;
exports.LoopbackPort = LoopbackPort;
@ -7413,8 +7436,8 @@ exports.SVGGraphics = SVGGraphics; @@ -7413,8 +7436,8 @@ exports.SVGGraphics = SVGGraphics;
"use strict";
var pdfjsVersion = '1.9.609';
var pdfjsBuild = '3717757b';
var pdfjsVersion = '1.9.611';
var pdfjsBuild = 'd03e1274';
var pdfjsSharedUtil = __w_pdfjs_require__(0);
var pdfjsDisplayGlobal = __w_pdfjs_require__(82);
var pdfjsDisplayAPI = __w_pdfjs_require__(48);
@ -13276,8 +13299,8 @@ if (!_global_scope2.default.PDFJS) { @@ -13276,8 +13299,8 @@ if (!_global_scope2.default.PDFJS) {
}
var PDFJS = _global_scope2.default.PDFJS;
{
PDFJS.version = '1.9.609';
PDFJS.build = '3717757b';
PDFJS.version = '1.9.611';
PDFJS.build = 'd03e1274';
}
PDFJS.pdfBug = false;
if (PDFJS.verbosity !== undefined) {

2
build/pdf.js.map

File diff suppressed because one or more lines are too long

2
build/pdf.min.js vendored

File diff suppressed because one or more lines are too long

33
build/pdf.worker.js vendored

@ -1393,8 +1393,31 @@ MessageHandler.prototype = { @@ -1393,8 +1393,31 @@ MessageHandler.prototype = {
this.comObj.postMessage(message);
}
},
destroy: function destroy() {
close: function close(reason) {
this.comObj.removeEventListener('message', this._onComObjOnMessage);
for (var i in this.callbacksCapabilities) {
var callbackCapability = this.callbacksCapabilities[i];
callbackCapability.reject(reason);
}
for (var _i in this.streamSinks) {
var sink = this.streamSinks[_i];
sink.sinkCapability.reject(reason);
}
for (var _i2 in this.streamControllers) {
var controller = this.streamControllers[_i2];
if (!controller.isClosed) {
controller.controller.error(reason);
}
if (controller.startCall) {
controller.startCall.reject(reason);
}
if (controller.pullCall) {
controller.pullCall.reject(reason);
}
if (controller.cancelCall) {
controller.cancelCall.reject(reason);
}
}
}
};
function loadJpegStream(id, imageUrl, objs) {
@ -24720,8 +24743,8 @@ exports.PostScriptCompiler = PostScriptCompiler; @@ -24720,8 +24743,8 @@ exports.PostScriptCompiler = PostScriptCompiler;
"use strict";
var pdfjsVersion = '1.9.609';
var pdfjsBuild = '3717757b';
var pdfjsVersion = '1.9.611';
var pdfjsBuild = 'd03e1274';
var pdfjsCoreWorker = __w_pdfjs_require__(62);
exports.WorkerMessageHandler = pdfjsCoreWorker.WorkerMessageHandler;
@ -24926,7 +24949,7 @@ var WorkerMessageHandler = { @@ -24926,7 +24949,7 @@ var WorkerMessageHandler = {
var cancelXHRs = null;
var WorkerTasks = [];
var apiVersion = docParams.apiVersion;
var workerVersion = '1.9.609';
var workerVersion = '1.9.611';
if (apiVersion !== null && apiVersion !== workerVersion) {
throw new Error('The API version "' + apiVersion + '" does not match ' + ('the Worker version "' + workerVersion + '".'));
}
@ -25289,7 +25312,7 @@ var WorkerMessageHandler = { @@ -25289,7 +25312,7 @@ var WorkerMessageHandler = {
task.terminate();
});
return Promise.all(waitOn).then(function () {
handler.destroy();
handler.close(new _util.AbortException('Worker was terminated'));
handler = null;
});
});

2
build/pdf.worker.js.map vendored

File diff suppressed because one or more lines are too long

2
build/pdf.worker.min.js vendored

File diff suppressed because one or more lines are too long

4
lib/core/worker.js

@ -208,7 +208,7 @@ var WorkerMessageHandler = { @@ -208,7 +208,7 @@ var WorkerMessageHandler = {
var cancelXHRs = null;
var WorkerTasks = [];
var apiVersion = docParams.apiVersion;
var workerVersion = '1.9.609';
var workerVersion = '1.9.611';
if (apiVersion !== null && apiVersion !== workerVersion) {
throw new Error('The API version "' + apiVersion + '" does not match ' + ('the Worker version "' + workerVersion + '".'));
}
@ -571,7 +571,7 @@ var WorkerMessageHandler = { @@ -571,7 +571,7 @@ var WorkerMessageHandler = {
task.terminate();
});
return Promise.all(waitOn).then(function () {
handler.destroy();
handler.close(new _util.AbortException('Worker was terminated'));
handler = null;
});
});

14
lib/display/api.js

@ -193,7 +193,7 @@ function _fetchDocument(worker, source, pdfDataRangeTransport, docId) { @@ -193,7 +193,7 @@ function _fetchDocument(worker, source, pdfDataRangeTransport, docId) {
if (worker.destroyed) {
return Promise.reject(new Error('Worker was destroyed'));
}
var apiVersion = '1.9.609';
var apiVersion = '1.9.611';
source.disableAutoFetch = (0, _dom_utils.getDefaultSetting)('disableAutoFetch');
source.disableStream = (0, _dom_utils.getDefaultSetting)('disableStream');
source.chunkedViewerLoading = !!pdfDataRangeTransport;
@ -802,7 +802,7 @@ var PDFWorker = function PDFWorkerClosure() { @@ -802,7 +802,7 @@ var PDFWorker = function PDFWorkerClosure() {
var messageHandler = new _util.MessageHandler('main', 'worker', worker);
var terminateEarly = function terminateEarly() {
worker.removeEventListener('error', onWorkerError);
messageHandler.destroy();
messageHandler.close(new Error('Worker was terminated'));
worker.terminate();
if (_this6.destroyed) {
_this6._readyCapability.reject(new Error('Worker was destroyed'));
@ -835,7 +835,7 @@ var PDFWorker = function PDFWorkerClosure() { @@ -835,7 +835,7 @@ var PDFWorker = function PDFWorkerClosure() {
messageHandler.send('configure', { verbosity: (0, _util.getVerbosityLevel)() });
} else {
_this6._setupFakeWorker();
messageHandler.destroy();
messageHandler.close(new Error('Worker was terminated'));
worker.terminate();
}
});
@ -908,7 +908,7 @@ var PDFWorker = function PDFWorkerClosure() { @@ -908,7 +908,7 @@ var PDFWorker = function PDFWorkerClosure() {
pdfWorkerPorts.delete(this._port);
this._port = null;
if (this._messageHandler) {
this._messageHandler.destroy();
this._messageHandler.close(new _util.AbortException('Worker was destroyed'));
this._messageHandler = null;
}
}
@ -970,7 +970,7 @@ var WorkerTransport = function WorkerTransportClosure() { @@ -970,7 +970,7 @@ var WorkerTransport = function WorkerTransportClosure() {
_this8._networkStream.cancelAllRequests();
}
if (_this8.messageHandler) {
_this8.messageHandler.destroy();
_this8.messageHandler.close(new _util.AbortException('Worker was destroyed'));
_this8.messageHandler = null;
}
_this8.destroyCapability.resolve();
@ -1584,8 +1584,8 @@ var _UnsupportedManager = function UnsupportedManagerClosure() { @@ -1584,8 +1584,8 @@ var _UnsupportedManager = function UnsupportedManagerClosure() {
}();
var version, build;
{
exports.version = version = '1.9.609';
exports.build = build = '3717757b';
exports.version = version = '1.9.611';
exports.build = build = 'd03e1274';
}
exports.getDocument = getDocument;
exports.LoopbackPort = LoopbackPort;

4
lib/display/global.js

@ -45,8 +45,8 @@ if (!_global_scope2.default.PDFJS) { @@ -45,8 +45,8 @@ if (!_global_scope2.default.PDFJS) {
}
var PDFJS = _global_scope2.default.PDFJS;
{
PDFJS.version = '1.9.609';
PDFJS.build = '3717757b';
PDFJS.version = '1.9.611';
PDFJS.build = 'd03e1274';
}
PDFJS.pdfBug = false;
if (PDFJS.verbosity !== undefined) {

4
lib/pdf.js

@ -14,8 +14,8 @@ @@ -14,8 +14,8 @@
*/
'use strict';
var pdfjsVersion = '1.9.609';
var pdfjsBuild = '3717757b';
var pdfjsVersion = '1.9.611';
var pdfjsBuild = 'd03e1274';
var pdfjsSharedUtil = require('./shared/util.js');
var pdfjsDisplayGlobal = require('./display/global.js');
var pdfjsDisplayAPI = require('./display/api.js');

4
lib/pdf.worker.js vendored

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
*/
'use strict';
var pdfjsVersion = '1.9.609';
var pdfjsBuild = '3717757b';
var pdfjsVersion = '1.9.611';
var pdfjsBuild = 'd03e1274';
var pdfjsCoreWorker = require('./core/worker.js');
exports.WorkerMessageHandler = pdfjsCoreWorker.WorkerMessageHandler;

25
lib/shared/util.js

@ -1312,8 +1312,31 @@ MessageHandler.prototype = { @@ -1312,8 +1312,31 @@ MessageHandler.prototype = {
this.comObj.postMessage(message);
}
},
destroy: function destroy() {
close: function close(reason) {
this.comObj.removeEventListener('message', this._onComObjOnMessage);
for (var i in this.callbacksCapabilities) {
var callbackCapability = this.callbacksCapabilities[i];
callbackCapability.reject(reason);
}
for (var _i in this.streamSinks) {
var sink = this.streamSinks[_i];
sink.sinkCapability.reject(reason);
}
for (var _i2 in this.streamControllers) {
var controller = this.streamControllers[_i2];
if (!controller.isClosed) {
controller.controller.error(reason);
}
if (controller.startCall) {
controller.startCall.reject(reason);
}
if (controller.pullCall) {
controller.pullCall.reject(reason);
}
if (controller.cancelCall) {
controller.cancelCall.reject(reason);
}
}
}
};
function loadJpegStream(id, imageUrl, objs) {

2
package.json

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
{
"name": "pdfjs-dist",
"version": "1.9.609",
"version": "1.9.611",
"main": "build/pdf.js",
"description": "Generic build of Mozilla's PDF.js library.",
"keywords": [

Loading…
Cancel
Save