Bug 1551297 - Use MOZ_WIDGET_ANDROID instead of ANDROID when targeting Java r=jcj
authorFabrice Desré <fabrice@desre.org>
Mon, 13 May 2019 20:42:37 +0000
changeset 532502 2c0de6646a6199e4558a4bf6279f7250302fc172
parent 532501 4fbfc8798cad0ecc7ae867ed943b91b24789a500
child 532503 9abb460fe84149f3d6e6579a914c70ff50efe7dc
push id11268
push usercsabou@mozilla.com
push dateTue, 14 May 2019 15:24:22 +0000
treeherdermozilla-beta@5fb7fcd568d6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjcj
bugs1551297
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1551297 - Use MOZ_WIDGET_ANDROID instead of ANDROID when targeting Java r=jcj ANDROID is true for platforms based only on the native parts of the stack so can't be used when what you depend on is actually the Java layer. Differential Revision: https://phabricator.services.mozilla.com/D30965
dom/webauthn/U2FTokenManager.cpp
dom/webauthn/moz.build
--- a/dom/webauthn/U2FTokenManager.cpp
+++ b/dom/webauthn/U2FTokenManager.cpp
@@ -11,17 +11,17 @@
 #include "mozilla/dom/PWebAuthnTransactionParent.h"
 #include "mozilla/MozPromise.h"
 #include "mozilla/dom/WebAuthnUtil.h"
 #include "mozilla/ipc/BackgroundParent.h"
 #include "mozilla/ClearOnShutdown.h"
 #include "mozilla/Unused.h"
 #include "nsTextFormatter.h"
 
-#ifdef ANDROID
+#ifdef MOZ_WIDGET_ANDROID
 #  include "mozilla/dom/AndroidWebAuthnTokenManager.h"
 #endif
 
 // Not named "security.webauth.u2f_softtoken_counter" because setting that
 // name causes the window.u2f object to disappear until preferences get
 // reloaded, as its pref is a substring!
 #define PREF_U2F_NSSTOKEN_COUNTER "security.webauth.softtoken_counter"
 #define PREF_WEBAUTHN_SOFTTOKEN_ENABLED \
@@ -263,17 +263,17 @@ RefPtr<U2FTokenTransport> U2FTokenManage
 
   if (!gBackgroundThread) {
     gBackgroundThread = NS_GetCurrentThread();
     MOZ_ASSERT(gBackgroundThread, "This should never be null!");
   }
 
   auto pm = U2FPrefManager::Get();
 
-#ifdef ANDROID
+#ifdef MOZ_WIDGET_ANDROID
   // On Android, prefer the platform support if enabled.
   if (pm->GetAndroidFido2Enabled()) {
     return AndroidWebAuthnTokenManager::GetInstance();
   }
 #endif
 
   // Prefer the HW token, even if the softtoken is enabled too.
   // We currently don't support soft and USB tokens enabled at the
--- a/dom/webauthn/moz.build
+++ b/dom/webauthn/moz.build
@@ -58,17 +58,17 @@ include('/ipc/chromium/chromium-config.m
 FINAL_LIBRARY = 'xul'
 
 LOCAL_INCLUDES += [
     '/dom/base',
     '/dom/crypto',
     '/security/manager/ssl',
 ]
 
-if CONFIG['OS_TARGET'] == 'Android':
+if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
     EXPORTS.mozilla.dom += [
         'AndroidWebAuthnTokenManager.h',
     ]
     UNIFIED_SOURCES += [
         'AndroidWebAuthnTokenManager.cpp',
     ]
 
 if CONFIG['OS_ARCH'] == 'WINNT':