Commit 7ae9faa4 authored by Kris Maglione's avatar Kris Maglione
Browse files

Bug 1651774: Update mozilla/use-services rule for native Services implementation. r=Standard8

parent cdc37b8d
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -24,9 +24,7 @@
    
    var winLowerThanVista = navigator.platform.indexOf("Win") == 0;
    if (winLowerThanVista) {
      var version =   Cc["@mozilla.org/system-info;1"]
                              .getService(Ci.nsIPropertyBag2)
                              .getProperty("version");
      var version = Services.sysinfo.getProperty("version");
      version = parseFloat(version);
      winLowerThanVista = !(version >= 6.0);
    }
+1 −3
Original line number Diff line number Diff line
function test() {
  var isWin7OrHigher = false;
  try {
    let version = Cc["@mozilla.org/system-info;1"]
      .getService(Ci.nsIPropertyBag2)
      .getProperty("version");
    let version = Services.sysinfo.getProperty("version");
    isWin7OrHigher = parseFloat(version) >= 6.1;
  } catch (ex) {}

+1 −5
Original line number Diff line number Diff line
@@ -56,10 +56,6 @@ XPCOMUtils.defineLazyGetter(this, "converter", () => {
  return conv;
});

XPCOMUtils.defineLazyGetter(this, "sysInfo", () => {
  return Cc["@mozilla.org/system-info;1"].getService(Ci.nsIPropertyBag2);
});

var logging = Services.prefs.getBoolPref("devtools.discovery.log");
function log(msg) {
  if (logging) {
@@ -162,7 +158,7 @@ LocalDevice.prototype = {
    if (Services.appinfo.widgetToolkit == "android") {
      // For Firefox for Android, use the device's model name.
      // TODO: Bug 1180997: Find the right way to expose an editable name
      this.name = sysInfo.get("device");
      this.name = Services.sysinfo.get("device");
    } else {
      this.name = Cc["@mozilla.org/network/dns-service;1"].getService(
        Ci.nsIDNSService
+1 −3
Original line number Diff line number Diff line
@@ -882,9 +882,7 @@ if (
  manifestNavigator().userAgent.includes("Mobile") ||
  manifestNavigator().userAgent.includes("Tablet")
) {
  androidVersion = SpecialPowers.Cc["@mozilla.org/system-info;1"]
    .getService(SpecialPowers.Ci.nsIPropertyBag2)
    .getProperty("version");
  androidVersion = SpecialPowers.Services.sysinfo.getProperty("version");
}

function getAndroidVersion() {
+0 −2
Original line number Diff line number Diff line
@@ -14,8 +14,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1274663
    <script>
      var importObj = {};

      var sysInfo = Cc["@mozilla.org/system-info;1"].getService(Ci.nsIPropertyBag2);

      var windows = SpecialPowers.Services.ww.getWindowEnumerator();
      var windowutils;
      while (windows.hasMoreElements()) {
Loading