Bug 773845: lazy-load some social modules to see what effect that has on maxheap/allocs tests FIREFOX_AURORA_16_BASE
authorGavin Sharp <gavin@gavinsharp.com>
Mon, 16 Jul 2012 08:43:50 -0700
changeset 99414 6fdf9985acfe6f939da584b2559464ab22264fe7
parent 99413 934ef44ce5af34ceef2674b51df86d17a6c4c9fa
child 99415 9697eadafa13b4e9233b39aaeecfeac79503cb54
push id23130
push usergsharp@mozilla.com
push dateMon, 16 Jul 2012 15:45:40 +0000
treeherdermozilla-central@6fdf9985acfe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs773845
milestone16.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 773845: lazy-load some social modules to see what effect that has on maxheap/allocs tests
toolkit/components/social/SocialProvider.jsm
toolkit/components/social/SocialService.jsm
--- a/toolkit/components/social/SocialProvider.jsm
+++ b/toolkit/components/social/SocialProvider.jsm
@@ -2,18 +2,20 @@
 /* vim: set ts=2 et sw=2 tw=80: */
 /* 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/. */
 
 const {classes: Cc, interfaces: Ci, utils: Cu} = Components;
 
 Cu.import("resource://gre/modules/Services.jsm");
-Cu.import("resource://gre/modules/FrameWorker.jsm");
-Cu.import("resource://gre/modules/WorkerAPI.jsm");
+Cu.import("resource://gre/modules/XPCOMUtils.jsm");
+
+XPCOMUtils.defineLazyModuleGetter(this, "getFrameWorkerHandle", "resource://gre/modules/FrameWorker.jsm");
+XPCOMUtils.defineLazyModuleGetter(this, "WorkerAPI", "resource://gre/modules/WorkerAPI.jsm");
 
 const EXPORTED_SYMBOLS = ["SocialProvider"];
 
 /**
  * The SocialProvider object represents a social provider, and allows
  * access to its FrameWorker (if it has one).
  *
  * @constructor
--- a/toolkit/components/social/SocialService.jsm
+++ b/toolkit/components/social/SocialService.jsm
@@ -3,17 +3,18 @@
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 const EXPORTED_SYMBOLS = ["SocialService"];
 
 const { classes: Cc, interfaces: Ci, utils: Cu } = Components;
 
 Cu.import("resource://gre/modules/Services.jsm");
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-Cu.import("resource://gre/modules/SocialProvider.jsm");
+
+XPCOMUtils.defineLazyModuleGetter(this, "SocialProvider", "resource://gre/modules/SocialProvider.jsm");
 
 // Internal helper methods and state
 let SocialServiceInternal = {
   enabled: Services.prefs.getBoolPref("social.enabled"),
   get providerArray() {
     return [p for ([, p] of Iterator(this.providers))];
   }
 };