Bug 528563: define BrowserStartupServiceFactory before referencing it, r=mfinkle
authorGavin Sharp <gavin@gavinsharp.com>
Mon, 16 Nov 2009 14:18:12 -0500
changeset 65801 cd23eab8839c47856ff6fb777c53d67a11600bfb
parent 65800 425e2362958e855283cfaed7cf828c30c39d3914
child 65802 d43572bd48decee9c7198ea64ecbcba2f750a72b
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmfinkle
bugs528563
Bug 528563: define BrowserStartupServiceFactory before referencing it, r=mfinkle
mobile/components/BrowserStartup.js
--- a/mobile/components/BrowserStartup.js
+++ b/mobile/components/BrowserStartup.js
@@ -34,16 +34,26 @@
  *
  * ***** END LICENSE BLOCK ***** */
 const Cc = Components.classes;
 const Ci = Components.interfaces;
 const Cu = Components.utils;
 
 Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
 
+// Custom factory object to ensure that we're a singleton
+const BrowserStartupServiceFactory = {
+  _instance: null,
+  createInstance: function (outer, iid) {
+    if (outer != null)
+      throw Components.results.NS_ERROR_NO_AGGREGATION;
+    return this._instance || (this._instance = new BrowserStartup());
+  }
+};
+
 function BrowserStartup() {
   this._init();
 }
 BrowserStartup.prototype = {
   // for XPCOM
   classDescription: "Mobile Browser Glue Service",
   classID:          Components.ID("{1d542abc-c88b-4636-a4ef-075b49806317}"),
   contractID:       "@mozilla.org/mobile/browserstartup;1",
@@ -119,20 +129,10 @@ BrowserStartup.prototype = {
       case "places-init-complete":
         this._initDefaultBookmarks();
         this._observerService.removeObserver(this, "places-init-complete");
         break;
     }
   }
 };
 
-// Custom factory object to ensure that we're a singleton
-const BrowserStartupServiceFactory = {
-  _instance: null,
-  createInstance: function (outer, iid) {
-    if (outer != null)
-      throw Components.results.NS_ERROR_NO_AGGREGATION;
-    return this._instance || (this._instance = new BrowserGlue());
-  }
-};
-
 function NSGetModule(compMgr, fileSpec)
   XPCOMUtils.generateModule([BrowserStartup]);