Bug 1071709 - Don't register Pdf.js mime handlers twice in the parent, fix for startup perf regression. r=mconley

This commit is contained in:
Jim Mathies 2014-09-24 04:22:25 -05:00
parent 9fb4871b0d
commit 261334f593

View File

@ -24,12 +24,14 @@
* initializing our built-in version of pdfjs when running remote.
*/
Components.utils.import('resource://gre/modules/Services.jsm');
Components.utils.import('resource://pdf.js/PdfJs.jsm');
Components.utils.import('resource://pdf.js/PdfjsContentUtils.jsm');
// init content utils shim pdfjs will use to access privileged apis.
PdfjsContentUtils.init();
// register various pdfjs factories that hook us into content loading.
PdfJs.updateRegistration();
if (Services.appinfo.processType == Services.appinfo.PROCESS_TYPE_CONTENT) {
// register various pdfjs factories that hook us into content loading.
PdfJs.updateRegistration();
}