From 797b9350a2c1ea90788fdd7fd274f4eb1297e9e4 Mon Sep 17 00:00:00 2001 From: Pdf Bot Date: Tue, 6 Jan 2015 22:28:27 +0000 Subject: [PATCH] PDF.js version 1.0.1059 --- bower.json | 2 +- build/pdf.combined.js | 7 +++++-- build/pdf.js | 7 +++++-- build/pdf.worker.js | 7 +++++-- package.json | 2 +- 5 files changed, 17 insertions(+), 8 deletions(-) diff --git a/bower.json b/bower.json index 984c3c23b..85e3ed024 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "pdfjs-dist", - "version": "1.0.1057", + "version": "1.0.1059", "main": [ "build/pdf.js", "build/pdf.worker.js" diff --git a/build/pdf.combined.js b/build/pdf.combined.js index e80968297..3d22d671f 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.1057'; -PDFJS.build = '039c7b4'; +PDFJS.version = '1.0.1059'; +PDFJS.build = '34bed63'; (function pdfjsWrapper() { // Use strict in our context only - users might not want it @@ -470,6 +470,8 @@ var XRefParseException = (function XRefParseExceptionClosure() { function bytesToString(bytes) { + assert(bytes !== null && typeof bytes === 'object' && + bytes.length !== undefined, 'Invalid argument for bytesToString'); var length = bytes.length; var MAX_ARGUMENT_COUNT = 8192; if (length < MAX_ARGUMENT_COUNT) { @@ -485,6 +487,7 @@ function bytesToString(bytes) { } function stringToBytes(str) { + assert(typeof str === 'string', 'Invalid argument for stringToBytes'); var length = str.length; var bytes = new Uint8Array(length); for (var i = 0; i < length; ++i) { diff --git a/build/pdf.js b/build/pdf.js index c3ef64146..d4f356b8a 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.1057'; -PDFJS.build = '039c7b4'; +PDFJS.version = '1.0.1059'; +PDFJS.build = '34bed63'; (function pdfjsWrapper() { // Use strict in our context only - users might not want it @@ -470,6 +470,8 @@ var XRefParseException = (function XRefParseExceptionClosure() { function bytesToString(bytes) { + assert(bytes !== null && typeof bytes === 'object' && + bytes.length !== undefined, 'Invalid argument for bytesToString'); var length = bytes.length; var MAX_ARGUMENT_COUNT = 8192; if (length < MAX_ARGUMENT_COUNT) { @@ -485,6 +487,7 @@ function bytesToString(bytes) { } function stringToBytes(str) { + assert(typeof str === 'string', 'Invalid argument for stringToBytes'); var length = str.length; var bytes = new Uint8Array(length); for (var i = 0; i < length; ++i) { diff --git a/build/pdf.worker.js b/build/pdf.worker.js index 7949bf365..543715f39 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.1057'; -PDFJS.build = '039c7b4'; +PDFJS.version = '1.0.1059'; +PDFJS.build = '34bed63'; (function pdfjsWrapper() { // Use strict in our context only - users might not want it @@ -470,6 +470,8 @@ var XRefParseException = (function XRefParseExceptionClosure() { function bytesToString(bytes) { + assert(bytes !== null && typeof bytes === 'object' && + bytes.length !== undefined, 'Invalid argument for bytesToString'); var length = bytes.length; var MAX_ARGUMENT_COUNT = 8192; if (length < MAX_ARGUMENT_COUNT) { @@ -485,6 +487,7 @@ function bytesToString(bytes) { } function stringToBytes(str) { + assert(typeof str === 'string', 'Invalid argument for stringToBytes'); var length = str.length; var bytes = new Uint8Array(length); for (var i = 0; i < length; ++i) { diff --git a/package.json b/package.json index 890019c53..2dfb1d632 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pdfjs-dist", - "version": "1.0.1057", + "version": "1.0.1059", "description": "Generic build of Mozilla's PDF.js library.", "keywords": [ "Mozilla",