[Pkg-javascript-commits] [pdf.js] 48/119: [B2G] Stub the |DownloadManager| to avoid error

David Prévot taffit at moszumanska.debian.org
Wed May 13 21:27:40 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository pdf.js.

commit 48242abe729b73dd9fe9be0795f44d1db31400ec
Author: Jonas Jenwald <jonas.jenwald at gmail.com>
Date:   Sat Apr 4 21:26:33 2015 +0200

    [B2G] Stub the |DownloadManager| to avoid error
    
    After the refactoring in PR 5678, the B2G viewer now prints the following in the console:
    ```
    ReferenceError: DownloadManager is not defined
    ```
    
    This will obviously not matter once the B2G viewer is replaced with the new components-based one. But until that happens, I think it makes sense to just stub the class to suppress the error.
---
 web/viewer.js | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/web/viewer.js b/web/viewer.js
index ccf940f..f9788d8 100644
--- a/web/viewer.js
+++ b/web/viewer.js
@@ -65,6 +65,11 @@ var mozL10n = document.mozL10n || document.webL10n;
 //#if GENERIC || CHROME
 //#include download_manager.js
 //#endif
+//#if B2G
+//var DownloadManager = (function DownloadManagerClosure() {
+//  return function DownloadManager() {};
+//})();
+//#endif
 
 //#if FIREFOX || MOZCENTRAL
 //#include firefoxcom.js

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/pdf.js.git



More information about the Pkg-javascript-commits mailing list