summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Smith <brian@dbsoft.org>2022-06-15 01:29:53 -0500
committerBrian Smith <brian@dbsoft.org>2022-06-15 01:29:53 -0500
commit5e9342a622e25b7179e31324b268a42dca5ff6f5 (patch)
treec066a387c8faf39adcd02e27ca9cfa1d28e46430
parentf924d979d537fe9ed871ad9753b71e043b740d96 (diff)
downloaduxp-5e9342a622e25b7179e31324b268a42dca5ff6f5.tar.gz
Issue #1905 - Part 4c - Follow Firefox and Safari in reporting "Intel" for Mac ARM64 devices.
Based on Mozilla bug 1655285.
-rw-r--r--dom/base/Navigator.cpp5
-rw-r--r--netwerk/protocol/http/nsHttpHandler.cpp2
2 files changed, 3 insertions, 4 deletions
diff --git a/dom/base/Navigator.cpp b/dom/base/Navigator.cpp
index 28b66be3db..05268a5156 100644
--- a/dom/base/Navigator.cpp
+++ b/dom/base/Navigator.cpp
@@ -1390,9 +1390,8 @@ Navigator::GetPlatform(nsAString& aPlatform, bool aUsePrefOverriddenValue)
aPlatform.AssignLiteral("Win32");
#elif defined(XP_MACOSX) && defined(__ppc__)
aPlatform.AssignLiteral("MacPPC");
-#elif defined(XP_MACOSX) && defined(__i386__)
- aPlatform.AssignLiteral("MacIntel");
-#elif defined(XP_MACOSX) && defined(__x86_64__)
+#elif defined(XP_MACOSX)
+ // Always return "MacIntel", even on ARM64 macOS like Safari does.
aPlatform.AssignLiteral("MacIntel");
#else
// XXX Communicator uses compiled-in build-time string defines
diff --git a/netwerk/protocol/http/nsHttpHandler.cpp b/netwerk/protocol/http/nsHttpHandler.cpp
index 7b6dcc0216..92cf9d5b54 100644
--- a/netwerk/protocol/http/nsHttpHandler.cpp
+++ b/netwerk/protocol/http/nsHttpHandler.cpp
@@ -830,7 +830,7 @@ nsHttpHandler::InitUserAgentComponents()
#elif defined (XP_MACOSX)
#if defined(__ppc__)
mOscpu.AssignLiteral("PPC Mac OS X");
-#elif defined(__i386__) || defined(__x86_64__)
+#else
mOscpu.AssignLiteral("Intel Mac OS X");
#endif
SInt32 majorVersion = nsCocoaFeatures::macOSVersionMajor();