1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-26 10:08:06 +02:00

Refactor - remove redundant function and all references

The function `assertWllFormed` was doing nothing different than `assert` which is
available in the same namespace. Removing it will lighten the filesize - albeit
very slightly - and reduce complexity.
This commit is contained in:
Joshua T Kalis 2014-04-13 10:02:56 -04:00
parent bb739c011e
commit 5828b2c687
4 changed files with 17 additions and 25 deletions

View file

@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* globals assertWellFormed, calculateMD5, Catalog, Dict, error, info, isArray,
/* globals assert, calculateMD5, Catalog, Dict, error, info, isArray,
isArrayBuffer, isName, isStream, isString, LegacyPromise,
Linearization, NullStream, PartialEvaluator, shadow, Stream, Lexer,
StreamsSequenceStream, stringToPDFString, stringToBytes, Util, XRef,
@ -303,7 +303,7 @@ var PDFDocument = (function PDFDocumentClosure() {
}
function init(pdfManager, stream, password) {
assertWellFormed(stream.length > 0, 'stream must have data');
assert(stream.length > 0, 'stream must have data');
this.pdfManager = pdfManager;
this.stream = stream;
var xref = new XRef(this.stream, password, pdfManager);