firefox-patches/disable-pdfjs.patch
2017-11-24 23:49:37 +01:00

42 lines
1.9 KiB
Diff

--- a/browser/components/nsBrowserGlue.js
+++ b/browser/components/nsBrowserGlue.js
@@ -47,7 +47,6 @@
OS: "resource://gre/modules/osfile.jsm",
PageActions: "resource:///modules/PageActions.jsm",
PageThumbs: "resource://gre/modules/PageThumbs.jsm",
- PdfJs: "resource://pdf.js/PdfJs.jsm",
PermissionUI: "resource:///modules/PermissionUI.jsm",
PingCentre: "resource:///modules/PingCentre.jsm",
PlacesBackups: "resource://gre/modules/PlacesBackups.jsm",
@@ -505,14 +504,6 @@
this._updateFxaBadges();
break;
case "handlersvc-store-initialized":
- // Initialize PdfJs when running in-process and remote. This only
- // happens once since PdfJs registers global hooks. If the PdfJs
- // extension is installed the init method below will be overridden
- // leaving initialization to the extension.
- // parent only: configure default prefs, set up pref observers, register
- // pdf content handler, and initializes parent side message manager
- // shim for privileged api access.
- PdfJs.init(true);
break;
case "shield-init-complete":
this._sendMainPingCentrePing();
@@ -866,15 +857,6 @@
// the first browser window has finished initializing
_onFirstWindowLoaded: function BG__onFirstWindowLoaded(aWindow) {
- // Set up listeners and, if PdfJs is enabled, register the PDF stream converter.
- // We delay all of the parent's initialization other than stream converter
- // registration, because it requires file IO from nsHandlerService-json.js
- Services.ppmm.loadProcessScript("resource://pdf.js/pdfjschildbootstrap.js", true);
- if (PdfJs.enabled) {
- PdfJs.ensureRegistered();
- Services.ppmm.loadProcessScript("resource://pdf.js/pdfjschildbootstrap-enabled.js", true);
- }
-
TabCrashHandler.init();
if (AppConstants.MOZ_CRASHREPORTER) {
PluginCrashReporter.init();