Bug 682587 Application.activeWindow is undefined (regression from bug 658632) r=Callek
authorNeil Rashbrook <neil@parkwaycc.co.uk>
Mon, 29 Aug 2011 10:21:39 +0100
changeset 9067 ff9cd429ade8b4e440b342ae925a21aac7a9aff8
parent 9066 f4bbdf829ffd6cac2e2b9ef8186f969200de2570
child 9068 2d09dbd96fcd8e146b44e76ea3761d283662ec18
push id230
push userbugzilla@standard8.plus.com
push dateTue, 08 Nov 2011 22:55:24 +0000
treeherdercomm-beta@63dad5648415 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersCallek
bugs682587, 658632
Bug 682587 Application.activeWindow is undefined (regression from bug 658632) r=Callek
suite/smile/src/smileApplication.js
--- a/suite/smile/src/smileApplication.js
+++ b/suite/smile/src/smileApplication.js
@@ -673,37 +673,36 @@ var ApplicationFactory = {
 function Application() {
   this.initToolkitHelpers();
   this._bookmarks = null;
 }
 
 //=================================================
 // Application implementation
 Application.prototype = {
-  // for nsIClassInfo + XPCOMUtils
+  // for XPCOMUtils
   classID:          Components.ID("{c9ba8f65-c936-4ac6-a859-8936832b0c12}"),
 
   // redefine the default factory for XPCOMUtils
   _xpcom_factory: ApplicationFactory,
 
   // for nsISupports
   QueryInterface : XPCOMUtils.generateQI(
                      [Components.interfaces.smileIApplication,
                       Components.interfaces.extIApplication,
-                      Components.interfaces.nsIObserver,
-                      Components.interfaces.nsIClassInfo]),
+                      Components.interfaces.nsIObserver]),
 
-  getInterfaces : function app_gi(aCount) {
-   var interfaces = [Components.interfaces.smileIApplication,
-                     Components.interfaces.extIApplication,
-                     Components.interfaces.nsIObserver,
-                     Components.interfaces.nsIClassInfo];
-    aCount.value = interfaces.length;
-    return interfaces;
-  },
+  // for nsIClassInfo
+  classInfo: XPCOMUtils.generateCI({
+    classID: Components.ID("{c9ba8f65-c936-4ac6-a859-8936832b0c12}"),
+    contractID: "@mozilla.org/smile/application;1",
+    interfaces: [Components.interfaces.smileIApplication,
+                 Components.interfaces.extIApplication,
+                 Components.interfaces.nsIObserver],
+    flags: Components.interfaces.nsIClassInfo.SINGLETON}),
 
   // for nsIObserver
   observe: function app_observe(aSubject, aTopic, aData) {
     // Call the extApplication version of this function first
     this.__proto__.__proto__.observe.call(this, aSubject, aTopic, aData);
     if (aTopic == "xpcom-shutdown") {
       this._obs.removeObserver(this, "xpcom-shutdown");
       this._bookmarks = null;