diff --git a/extensions/firefox/content/pdfjschildbootstrap.js b/extensions/firefox/content/pdfjschildbootstrap.js index c9758b3e5..737a49027 100644 --- a/extensions/firefox/content/pdfjschildbootstrap.js +++ b/extensions/firefox/content/pdfjschildbootstrap.js @@ -15,7 +15,7 @@ * limitations under the License. */ /* jshint esnext:true */ -/* globals Components, PdfjsContentUtils, PdfJs */ +/* globals Components, PdfjsContentUtils, PdfJs, Services */ 'use strict'; @@ -24,11 +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(); +}