Bug 1463183 - Remove all instances of isUniversalBinary since we no longer build universal binaries for macOS r=spohl

MozReview-Commit-ID: FZfVrYtEo13

--HG--
extra : rebase_source : 1ae3d3e3d97255643372b41d0c8a7bdd8ed5537a
This commit is contained in:
Bharat Raghunathan 2018-05-31 20:04:23 +05:30
parent 6f3599753b
commit 9ad8a95306
11 changed files with 4 additions and 112 deletions

View File

@ -9,8 +9,6 @@ import os
import re
import sys
import mozinfo
from six import reraise
from firefox_puppeteer.base import BaseLib
@ -184,18 +182,7 @@ class SoftwareUpdate(BaseLib):
:returns: ABI version
"""
abi = self.app_info.XPCOMABI
if mozinfo.isMac:
abi += self.marionette.execute_script("""
let macutils = Components.classes['@mozilla.org/xpcom/mac-utils;1']
.getService(Components.interfaces.nsIMacUtils);
if (macutils.isUniversalBinary) {
return '-u-' + macutils.architecturesInBinary;
}
return '';
""")
return abi
return self.app_info.XPCOMABI
@property
def active_update(self):

View File

@ -1353,14 +1353,6 @@ EnvironmentCache.prototype = {
updaterAvailable: AppConstants.MOZ_UPDATER,
};
// Add |architecturesInBinary| only for Mac Universal builds.
if ("@mozilla.org/xpcom/mac-utils;1" in Cc) {
let macUtils = Cc["@mozilla.org/xpcom/mac-utils;1"].getService(Ci.nsIMacUtils);
if (macUtils && macUtils.isUniversalBinary) {
buildData.architecturesInBinary = macUtils.architecturesInBinary;
}
}
return buildData;
},

View File

@ -401,13 +401,6 @@ function checkBuildSection(data) {
// Make sure architecture is in the environment.
Assert.ok(checkString(data.build.architecture));
if (gIsMac) {
let macUtils = Cc["@mozilla.org/xpcom/mac-utils;1"].getService(Ci.nsIMacUtils);
if (macUtils && macUtils.isUniversalBinary) {
Assert.ok(checkString(data.build.architecturesInBinary));
}
}
Assert.equal(data.build.updaterAvailable, AppConstants.MOZ_UPDATER,
"build.updaterAvailable must equal AppConstants.MOZ_UPDATER");
}

View File

@ -28,16 +28,6 @@ function nsURLFormatterService() {
let ABI = "default";
try {
ABI = Services.appinfo.XPCOMABI;
if ("@mozilla.org/xpcom/mac-utils;1" in Cc) {
// Mac universal build should report a different ABI than either macppc
// or mactel.
let macutils = Cc["@mozilla.org/xpcom/mac-utils;1"]
.getService(Ci.nsIMacUtils);
if (macutils && macutils.isUniversalBinary) {
ABI = "Universal-gcc3";
}
}
} catch (e) {}
return ABI;

View File

@ -13,12 +13,7 @@ function run_test() {
OSVersion += " (" + Services.sysinfo.getProperty("secondaryLibrary") + ")";
} catch (e) {}
OSVersion = encodeURIComponent(OSVersion);
var macutils = null;
try {
macutils = Cc["@mozilla.org/xpcom/mac-utils;1"].
getService(Ci.nsIMacUtils);
} catch (e) {}
var abi = macutils && macutils.isUniversalBinary ? "Universal-gcc3" : Services.appinfo.XPCOMABI;
var abi = Services.appinfo.XPCOMABI;
let defaults = Services.prefs.getDefaultBranch(null);
let channel = defaults.getCharPref("app.update.channel", "default");

View File

@ -246,16 +246,7 @@ XPCOMUtils.defineLazyGetter(UpdateUtils, "ABI", function() {
Cu.reportError("XPCOM ABI unknown");
}
if (AppConstants.platform == "macosx") {
// Mac universal build should report a different ABI than either macppc
// or mactel.
let macutils = Cc["@mozilla.org/xpcom/mac-utils;1"].
getService(Ci.nsIMacUtils);
if (macutils.isUniversalBinary) {
abi += "-u-" + macutils.architecturesInBinary;
}
} else if (AppConstants.platform == "win") {
if (AppConstants.platform == "win") {
// Windows build should report the CPU architecture that it's running on.
abi += "-" + gWinCPUArch;
}

View File

@ -201,17 +201,7 @@ add_task(async function test_build_target() {
do_throw("nsIXULAppInfo:XPCOMABI not defined\n");
}
if (AppConstants.platform == "macosx") {
// Mac universal build should report a different ABI than either macppc
// or mactel. This is necessary since nsUpdateService.js will set the ABI to
// Universal-gcc3 for Mac universal builds.
let macutils = Cc["@mozilla.org/xpcom/mac-utils;1"].
getService(Ci.nsIMacUtils);
if (macutils.isUniversalBinary) {
abi += "-u-" + macutils.architecturesInBinary;
}
} else if (AppConstants.platform == "win") {
if (AppConstants.platform == "win") {
// Windows build should report the CPU architecture that it's running on.
abi += "-" + getProcArchitecture();
}

View File

@ -129,16 +129,6 @@ XPCOMUtils.defineLazyGetter(this, "gABI", function() {
} catch (e) {
LOG("BlockList Global gABI: XPCOM ABI unknown.");
}
if (AppConstants.platform == "macosx") {
// Mac universal build should report a different ABI than either macppc
// or mactel.
let macutils = Cc["@mozilla.org/xpcom/mac-utils;1"].
getService(Ci.nsIMacUtils);
if (macutils.isUniversalBinary)
abi += "-u-" + macutils.architecturesInBinary;
}
return abi;
});

View File

@ -42,16 +42,6 @@ add_task(async function test_blocklist_disabled() {
add_task(async function test_blocklist_disabled() {
var ABI = "noarch-spidermonkey";
// the blacklist service special-cases ABI for Universal binaries,
// so do the same here.
const CONTRACT = "@mozilla.org/xpcom/mac-utils;1";
if (CONTRACT in Cc) {
let macutils = Cc[CONTRACT].getService(Ci.nsIMacUtils);
if (macutils.isUniversalBinary) {
ABI += "-u-" + macutils.architecturesInBinary;
}
}
let osVersion;
try {
osVersion = Services.sysinfo.getProperty("name") + " " + Services.sysinfo.getProperty("version");

View File

@ -12,12 +12,6 @@
[scriptable, uuid(5E9072D7-FF95-455E-9466-8AF9841A72EC)]
interface nsIMacUtils : nsISupports
{
/**
* True when the main executable is a fat file supporting at least
* ppc and x86 (universal binary).
*/
readonly attribute boolean isUniversalBinary;
/**
* Returns a string containing a list of architectures delimited
* by "-". Architecture sets are always in the same order:

View File

@ -91,26 +91,6 @@ nsMacUtilsImpl::GetArchString(nsAString& aArchString)
return (aArchString.IsEmpty() ? NS_ERROR_FAILURE : NS_OK);
}
NS_IMETHODIMP
nsMacUtilsImpl::GetIsUniversalBinary(bool* aIsUniversalBinary)
{
if (NS_WARN_IF(!aIsUniversalBinary)) {
return NS_ERROR_INVALID_ARG;
}
*aIsUniversalBinary = false;
nsAutoString archString;
nsresult rv = GetArchString(archString);
if (NS_FAILED(rv)) {
return rv;
}
// The delimiter char in the arch string is '-', so if that character
// is in the string we know we have multiple architectures.
*aIsUniversalBinary = (archString.Find("-") > -1);
return NS_OK;
}
NS_IMETHODIMP
nsMacUtilsImpl::GetArchitecturesInBinary(nsAString& aArchString)