Bug 1186448 - pdfjschildbootstrap.js should only be executed once per child process. r=jimm
authorMike Conley <mconley@mozilla.com>
Tue, 04 Aug 2015 15:55:54 -0400
changeset 288070 670b14b5b033de46a55acfa8c985a116fefdffea
parent 288069 2b359bf46360b01d930b8ffdde1f325859d0e155
child 288071 6498bb256c33944a9b353099ba0d0ecfa1365175
push id5067
push userraliiev@mozilla.com
push dateMon, 21 Sep 2015 14:04:52 +0000
treeherdermozilla-beta@14221ffe5b2f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjimm
bugs1186448
milestone42.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1186448 - pdfjschildbootstrap.js should only be executed once per child process. r=jimm We were executing it once per tab, originally.
browser/components/nsBrowserGlue.js
--- a/browser/components/nsBrowserGlue.js
+++ b/browser/components/nsBrowserGlue.js
@@ -1007,17 +1007,17 @@ BrowserGlue.prototype = {
     // 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);
     // child only: similar to the call above for parent - register content
     // handler and init message manager child shim for privileged api access.
     // With older versions of the extension installed, this load will fail
     // passively.
-    aWindow.messageManager.loadFrameScript("resource://pdf.js/pdfjschildbootstrap.js", true);
+    Services.ppmm.loadProcessScript("resource://pdf.js/pdfjschildbootstrap.js", true);
 
 #ifdef NIGHTLY_BUILD
     // Registering Shumway bootstrap script the child processes.
     aWindow.messageManager.loadFrameScript("chrome://shumway/content/bootstrap-content.js", true);
     // Initializing Shumway (shall be run after child script registration).
     ShumwayUtils.init();
 #endif