diff options
author | Matt A. Tobin <email@mattatobin.com> | 2018-02-03 06:25:10 -0500 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2018-02-03 06:25:10 -0500 |
commit | 8b8c65072aedef94610748ce92c2ed3a19fd5517 (patch) | |
tree | 8614d386acf5db7a77b08d19a5854a7d75dab015 /b2g/components/BootstrapCommandLine.js | |
parent | 8c3a46bd13a0660a3ff1e0379dbf515873a852d2 (diff) | |
download | UXP-8b8c65072aedef94610748ce92c2ed3a19fd5517.tar UXP-8b8c65072aedef94610748ce92c2ed3a19fd5517.tar.gz UXP-8b8c65072aedef94610748ce92c2ed3a19fd5517.tar.lz UXP-8b8c65072aedef94610748ce92c2ed3a19fd5517.tar.xz UXP-8b8c65072aedef94610748ce92c2ed3a19fd5517.zip |
Purge b2g/
Diffstat (limited to 'b2g/components/BootstrapCommandLine.js')
-rw-r--r-- | b2g/components/BootstrapCommandLine.js | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/b2g/components/BootstrapCommandLine.js b/b2g/components/BootstrapCommandLine.js deleted file mode 100644 index 24d9f5461..000000000 --- a/b2g/components/BootstrapCommandLine.js +++ /dev/null @@ -1,52 +0,0 @@ -/* 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/XPCOMUtils.jsm"); -Cu.import("resource://gre/modules/AppsUtils.jsm"); - -function BootstrapCommandlineHandler() { - this.wrappedJSObject = this; - this.startManifestURL = null; -} - -BootstrapCommandlineHandler.prototype = { - bailout: function(aMsg) { - dump("************************************************************\n"); - dump("* /!\\ " + aMsg + "\n"); - dump("************************************************************\n"); - let appStartup = Cc["@mozilla.org/toolkit/app-startup;1"] - .getService(Ci.nsIAppStartup); - appStartup.quit(appStartup.eForceQuit); - }, - - handle: function(aCmdLine) { - this.startManifestURL = null; - - try { - // Returns null if the argument was not specified. Throws - // NS_ERROR_INVALID_ARG if there is no parameter specified (because - // it was the last argument or the next argument starts with '-'). - // However, someone could still explicitly pass an empty argument! - this.startManifestURL = aCmdLine.handleFlagWithParam("start-manifest", false); - } catch(e) { - return; - } - - if (!this.startManifestURL) { - return; - } - - if (!isAbsoluteURI(this.startManifestURL)) { - this.bailout("The start manifest url must be absolute."); - return; - } - }, - - helpInfo: "--start-manifest=manifest_url", - classID: Components.ID("{fd663ec8-cf3f-4c2b-aacb-17a6915ccb44}"), - QueryInterface: XPCOMUtils.generateQI([Ci.nsICommandLineHandler]) -}; - -this.NSGetFactory = XPCOMUtils.generateNSGetFactory([BootstrapCommandlineHandler]); |