Bug 1446809 - Remove some b2g leftover in devtools/shared/system.js r?jdescottes
MozReview-Commit-ID: 1YlBPwjyWO2
--- a/devtools/shared/system.js
+++ b/devtools/shared/system.js
@@ -34,17 +34,16 @@ loader.lazyGetter(this, "endianness", ()
return "BE";
});
const APP_MAP = {
"{ec8030f7-c20a-464f-9b0e-13a3a9e97384}": "firefox",
"{3550f703-e582-4d05-9a08-453d09bdfdc6}": "thunderbird",
"{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}": "seamonkey",
"{718e30fb-e89b-41dd-9da7-e25a45638b28}": "sunbird",
- "{3c2e2abc-06d4-11e1-ac3b-374f68613e61}": "b2g",
"{aa3c5121-dab2-40e2-81ca-7ea25febc110}": "mobile/android"
};
var CACHED_INFO = null;
async function getSystemInfo() {
if (CACHED_INFO) {
return CACHED_INFO;
@@ -62,32 +61,18 @@ async function getSystemInfo() {
os,
brandName;
let appid = appInfo.ID;
let apptype = APP_MAP[appid];
let geckoVersion = appInfo.platformVersion;
let hardware = "unknown";
let version = "unknown";
- // B2G specific
- if (apptype === "b2g") {
- os = "B2G";
- // `getSetting` does not work in child processes on b2g.
- // TODO bug 1205797, make this work in child processes.
- try {
- hardware = await exports.getSetting("deviceinfo.hardware");
- version = await exports.getSetting("deviceinfo.os");
- } catch (e) {
- // Ignore.
- }
- } else {
- // Not B2G
- os = appInfo.OS;
- version = appInfo.version;
- }
+ os = appInfo.OS;
+ version = appInfo.version;
let bundle = Services.strings.createBundle("chrome://branding/locale/brand.properties");
if (bundle) {
brandName = bundle.GetStringFromName("brandFullName");
} else {
brandName = null;
}
@@ -119,17 +104,16 @@ async function getSystemInfo() {
vendor: appInfo.vendor,
// Name of the application, like "Firefox", "Thunderbird".
name: appInfo.name,
// The application's version, for example "0.8.0+" or "3.7a1pre".
// Typically, the version of Firefox, for example.
// It is different than the version of Gecko or the XULRunner platform.
- // On B2G, this is the Gaia version.
version,
// The application's build ID/date, for example "2004051604".
appbuildid: appInfo.appBuildID,
// The build ID/date of Gecko and the XULRunner platform.
platformbuildid: appInfo.platformBuildID,
geckobuildid: appInfo.platformBuildID,
@@ -150,17 +134,16 @@ async function getSystemInfo() {
// Returns the endianness of the architecture: either "LE" or "BE"
endianness: endianness,
// Returns the hostname of the machine
hostname: hostname,
// Name of the OS type. Typically the same as `uname -s`. Possible values:
// https://developer.mozilla.org/en/OS_TARGET
- // Also may be "B2G".
os,
platform: os,
// hardware and version info from `deviceinfo.hardware`
// and `deviceinfo.os`.
hardware,
// Type of process architecture running:
@@ -298,17 +281,16 @@ function getOSCPU() {
}
function getSetting(name) {
let deferred = defer();
if ("@mozilla.org/settingsService;1" in Cc) {
let settingsService;
- // settingsService fails in b2g child processes
// TODO bug 1205797, make this work in child processes.
try {
settingsService = Cc["@mozilla.org/settingsService;1"]
.getService(Ci.nsISettingsService);
} catch (e) {
return promise.reject(e);
}