Bug 746213 - Support mozApps.getSelf/getInstalled in desktop runtime to allow apps to access receipts [r=felipe, a=desktop-only]
authorEdward Lee <edilee@mozilla.com>
Fri, 20 Apr 2012 15:56:06 -0700
changeset 93878 c141dcc8c829c74c751dd7cce2e12cf5030da68e
parent 93877 ffb9beb36e5a8761a600f1b4244d6ae1e071c979
child 93879 e3c065802a42aaf285d52d3887ab1a15c493c922
push idunknown
push userunknown
push dateunknown
reviewersfelipe, desktop-only
bugs746213
milestone14.0a1
Bug 746213 - Support mozApps.getSelf/getInstalled in desktop runtime to allow apps to access receipts [r=felipe, a=desktop-only] Import Webapps.jsm to initialize DOMApplicationRegistry, which handles Webapps:GetSelf, etc. messages.
webapprt/CommandLineHandler.js
--- a/webapprt/CommandLineHandler.js
+++ b/webapprt/CommandLineHandler.js
@@ -4,16 +4,19 @@
 
 const Cc = Components.classes;
 const Ci = Components.interfaces;
 const Cu = Components.utils;
 
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 Cu.import("resource://gre/modules/Services.jsm");
 
+// Initialize DOMApplicationRegistry so it can receive and respond to messages
+Cu.import("resource://gre/modules/Webapps.jsm");
+
 function CommandLineHandler() {}
 
 CommandLineHandler.prototype = {
   classID: Components.ID("{6d69c782-40a3-469b-8bfd-3ee366105a4a}"),
 
   QueryInterface: XPCOMUtils.generateQI([Ci.nsICommandLineHandler]),
 
   handle: function handle(cmdLine) {