mozilla/pdf.js — pull request #5201 by Snuffleupagus (2014-08-16 12:04:46+00:00)
Title: Small re-factoring of DocumentProperties

With the changes made in PR #5169 to enable quicker display of the File size, `setFileSize()` can now be called during file loading. This function parses *and* localizes the file size, where the l10n is a synchronous operation.
This patch:
* Re-factors `setFileSize()` to *only* update `rawFileSize`, and moves parsing and fetching of the l10n string to a separate method that isn't called until the Document Properties dialog is actually opened.

* Adds a couple of checks to make sure that `rawFileSize` is set to a positive number.

* Removes the `fileName` and `fileSize` properties. Since they are parsed every time the Document Properties dialog is opened, it doesn't seem necessary to cache them.

/cc @timvandermeij Can you please review this?