Fix errors reported by the new-cap ESLint rule

http://eslint.org/docs/rules/new-cap
This commit is contained in:
Jonas Jenwald 2016-12-10 21:33:39 +01:00
parent c36468cbce
commit efbb1e9b1c
2 changed files with 5 additions and 5 deletions

View File

@ -1729,13 +1729,13 @@ var PDF20 = (function PDF20Closure() {
var CipherTransform = (function CipherTransformClosure() { var CipherTransform = (function CipherTransformClosure() {
function CipherTransform(stringCipherConstructor, streamCipherConstructor) { function CipherTransform(stringCipherConstructor, streamCipherConstructor) {
this.stringCipherConstructor = stringCipherConstructor; this.StringCipherConstructor = stringCipherConstructor;
this.streamCipherConstructor = streamCipherConstructor; this.StreamCipherConstructor = streamCipherConstructor;
} }
CipherTransform.prototype = { CipherTransform.prototype = {
createStream: function CipherTransform_createStream(stream, length) { createStream: function CipherTransform_createStream(stream, length) {
var cipher = new this.streamCipherConstructor(); var cipher = new this.StreamCipherConstructor();
return new DecryptStream(stream, length, return new DecryptStream(stream, length,
function cipherTransformDecryptStream(data, finalize) { function cipherTransformDecryptStream(data, finalize) {
return cipher.decryptBlock(data, finalize); return cipher.decryptBlock(data, finalize);
@ -1743,7 +1743,7 @@ var CipherTransform = (function CipherTransformClosure() {
); );
}, },
decryptString: function CipherTransform_decryptString(s) { decryptString: function CipherTransform_decryptString(s) {
var cipher = new this.stringCipherConstructor(); var cipher = new this.StringCipherConstructor();
var data = stringToBytes(s); var data = stringToBytes(s);
data = cipher.decryptBlock(data, true); data = cipher.decryptBlock(data, true);
return bytesToString(data); return bytesToString(data);

View File

@ -505,7 +505,7 @@ describe('api', function() {
// PageLabels with bad "Prefix" entries. // PageLabels with bad "Prefix" entries.
var url3 = new URL('../pdfs/bad-PageLabels.pdf', window.location).href; var url3 = new URL('../pdfs/bad-PageLabels.pdf', window.location).href;
var loadingTask3 = new PDFJS.getDocument(url3); var loadingTask3 = PDFJS.getDocument(url3);
var promise3 = loadingTask3.promise.then(function (pdfDoc) { var promise3 = loadingTask3.promise.then(function (pdfDoc) {
return pdfDoc.getPageLabels(); return pdfDoc.getPageLabels();
}); });