Skip to content
Browse files

Bug 773845: lazy-load some social modules to see what effect that has…

… on maxheap/allocs tests
  • Loading branch information...
1 parent 0a2bb74 commit 222df14fcfa1a6cf986f061c66311f1efbdc453e @gavinsharp gavinsharp committed Jul 16, 2012
Showing with 6 additions and 3 deletions.
  1. +4 −2 toolkit/components/social/SocialProvider.jsm
  2. +2 −1 toolkit/components/social/SocialService.jsm
View
6 toolkit/components/social/SocialProvider.jsm
@@ -7,8 +7,10 @@
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"];
View
3 toolkit/components/social/SocialService.jsm
@@ -8,7 +8,8 @@ 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 = {

0 comments on commit 222df14

Please sign in to comment.
Something went wrong with that request. Please try again.