Bug 1214133 - Preload ExtensionContent.jsm to get rid of the overhead. r=fabrice
authorTing-Yu Chou <janus926@gmail.com>
Tue, 13 Oct 2015 17:39:52 +0800
changeset 267708 9b32f246edafce2d18fcd687f4d8d33757e130b9
parent 267707 8f9593db04d9d0efbd4b62c3716b7a70363ebc6d
child 267709 fdd123530ecc9c5e9e07859133646e58fa46617c
push id29528
push usercbook@mozilla.com
push dateThu, 15 Oct 2015 09:47:44 +0000
treeherdermozilla-central@d09cded069c3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfabrice
bugs1214133
milestone44.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 1214133 - Preload ExtensionContent.jsm to get rid of the overhead. r=fabrice
dom/browser-element/BrowserElementChildPreload.js
dom/ipc/extensions.js
--- a/dom/browser-element/BrowserElementChildPreload.js
+++ b/dom/browser-element/BrowserElementChildPreload.js
@@ -9,16 +9,17 @@ dump("######################## BrowserEl
 var BrowserElementIsReady = false;
 
 var { classes: Cc, interfaces: Ci, results: Cr, utils: Cu }  = Components;
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 Cu.import("resource://gre/modules/Services.jsm");
 Cu.import("resource://gre/modules/BrowserElementPromptService.jsm");
 Cu.import("resource://gre/modules/Task.jsm");
 Cu.import("resource://gre/modules/Microformats.js");
+Cu.import("resource://gre/modules/ExtensionContent.jsm");
 
 XPCOMUtils.defineLazyServiceGetter(this, "acs",
                                    "@mozilla.org/audiochannel/service;1",
                                    "nsIAudioChannelService");
 
 var kLongestReturnedString = 128;
 
 function debug(msg) {
--- a/dom/ipc/extensions.js
+++ b/dom/ipc/extensions.js
@@ -1,15 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 dump("######################## extensions.js loaded\n");
 
-Components.utils.import("resource://gre/modules/ExtensionContent.jsm");
-
 ExtensionContent.init(this);
 
 addEventListener("unload", () => {
   ExtensionContent.uninit(this);
 });