From 9e377f386464cc9871e97a70f39485483aca4407 Mon Sep 17 00:00:00 2001 From: Yury Delendik Date: Mon, 22 Sep 2014 16:31:11 -0500 Subject: [PATCH] PDF.js version 1.0.596 --- bower.json | 2 +- build/pdf.combined.js | 37 +++++++++++++++++++------------------ build/pdf.js | 4 ++-- build/pdf.worker.js | 37 +++++++++++++++++++------------------ package.json | 2 +- 5 files changed, 42 insertions(+), 40 deletions(-) diff --git a/bower.json b/bower.json index a2a2664af..2ab848ed1 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "pdfjs-dist", - "version": "1.0.594", + "version": "1.0.596", "keywords": [ "Mozilla", "pdf", diff --git a/build/pdf.combined.js b/build/pdf.combined.js index cb7a375f0..988e2f035 100644 --- a/build/pdf.combined.js +++ b/build/pdf.combined.js @@ -22,8 +22,8 @@ if (typeof PDFJS === 'undefined') { (typeof window !== 'undefined' ? window : this).PDFJS = {}; } -PDFJS.version = '1.0.594'; -PDFJS.build = '223f34b'; +PDFJS.version = '1.0.596'; +PDFJS.build = '179bb2e'; (function pdfjsWrapper() { // Use strict in our context only - users might not want it @@ -8447,7 +8447,7 @@ var Catalog = (function CatalogClosure() { } nodesToVisit.push(obj); next(); - }.bind(this), capability.reject.bind(capability)); + }, capability.reject); return; } @@ -9151,21 +9151,22 @@ var XRef = (function XRefClosure() { }, fetchAsync: function XRef_fetchAsync(ref, suppressEncryption) { - return new Promise(function (resolve, reject) { - var tryFetch = function () { - try { - resolve(this.fetch(ref, suppressEncryption)); - } catch (e) { - if (e instanceof MissingDataException) { - this.stream.manager.requestRange(e.begin, e.end, tryFetch); - return; - } - reject(e); - } - }.bind(this); - tryFetch(); - }.bind(this)); - }, + var streamManager = this.stream.manager; + var xref = this; + return new Promise(function tryFetch(resolve, reject) { + try { + resolve(xref.fetch(ref, suppressEncryption)); + } catch (e) { + if (e instanceof MissingDataException) { + streamManager.requestRange(e.begin, e.end, function () { + tryFetch(resolve, reject); + }); + return; + } + reject(e); + } + }); + }, getCatalogObj: function XRef_getCatalogObj() { return this.root; diff --git a/build/pdf.js b/build/pdf.js index 336a27601..19310aa3f 100644 --- a/build/pdf.js +++ b/build/pdf.js @@ -22,8 +22,8 @@ if (typeof PDFJS === 'undefined') { (typeof window !== 'undefined' ? window : this).PDFJS = {}; } -PDFJS.version = '1.0.594'; -PDFJS.build = '223f34b'; +PDFJS.version = '1.0.596'; +PDFJS.build = '179bb2e'; (function pdfjsWrapper() { // Use strict in our context only - users might not want it diff --git a/build/pdf.worker.js b/build/pdf.worker.js index ca5e48234..55f9729bb 100644 --- a/build/pdf.worker.js +++ b/build/pdf.worker.js @@ -22,8 +22,8 @@ if (typeof PDFJS === 'undefined') { (typeof window !== 'undefined' ? window : this).PDFJS = {}; } -PDFJS.version = '1.0.594'; -PDFJS.build = '223f34b'; +PDFJS.version = '1.0.596'; +PDFJS.build = '179bb2e'; (function pdfjsWrapper() { // Use strict in our context only - users might not want it @@ -3590,7 +3590,7 @@ var Catalog = (function CatalogClosure() { } nodesToVisit.push(obj); next(); - }.bind(this), capability.reject.bind(capability)); + }, capability.reject); return; } @@ -4294,21 +4294,22 @@ var XRef = (function XRefClosure() { }, fetchAsync: function XRef_fetchAsync(ref, suppressEncryption) { - return new Promise(function (resolve, reject) { - var tryFetch = function () { - try { - resolve(this.fetch(ref, suppressEncryption)); - } catch (e) { - if (e instanceof MissingDataException) { - this.stream.manager.requestRange(e.begin, e.end, tryFetch); - return; - } - reject(e); - } - }.bind(this); - tryFetch(); - }.bind(this)); - }, + var streamManager = this.stream.manager; + var xref = this; + return new Promise(function tryFetch(resolve, reject) { + try { + resolve(xref.fetch(ref, suppressEncryption)); + } catch (e) { + if (e instanceof MissingDataException) { + streamManager.requestRange(e.begin, e.end, function () { + tryFetch(resolve, reject); + }); + return; + } + reject(e); + } + }); + }, getCatalogObj: function XRef_getCatalogObj() { return this.root; diff --git a/package.json b/package.json index 4422e5f0c..79630de38 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pdfjs-dist", - "version": "1.0.594", + "version": "1.0.596", "description": "Generic build of Mozilla's PDF.js library.", "keywords": [ "Mozilla",