Bug 1843207 - Stop using nsCocoaUtils::ToNSString in OSReauthenticatorDarwin.mm. r=nika

and enable it on iOS.

Differential Revision: https://phabricator.services.mozilla.com/D204320
This commit is contained in:
Mike Hommey 2024-03-13 20:54:20 +00:00
parent f340943d94
commit 752c080608
3 changed files with 7 additions and 5 deletions

View file

@ -6,7 +6,7 @@
#include "OSReauthenticator.h"
#include "nsCocoaUtils.h"
#include "mozilla/MacStringHelpers.h"
using namespace mozilla;
@ -23,7 +23,7 @@ nsresult ReauthenticateUserMacOS(const nsAString& aPrompt,
// password. If they correctly enter it, we'll set aReauthenticated to true.
LAContext* context = [[LAContext alloc] init];
NSString* prompt = nsCocoaUtils::ToNSString(aPrompt);
NSString* prompt = mozilla::XPCOMStringToNSString(aPrompt);
dispatch_semaphore_t sema = dispatch_semaphore_create(0);

View file

@ -169,7 +169,7 @@ if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
CFLAGS += CONFIG["GLIB_CFLAGS"]
CXXFLAGS += CONFIG["GLIB_CFLAGS"]
if CONFIG["TARGET_OS"] == "OSX":
if CONFIG["TARGET_KERNEL"] == "Darwin":
UNIFIED_SOURCES += [
"KeychainSecret.cpp",
"OSReauthenticatorDarwin.mm",

View file

@ -29,19 +29,21 @@ if CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa":
]
EXPORTS.mozilla += [
"MacHelpers.h",
"MacStringHelpers.h",
"nsMacPreferencesReader.h",
]
UNIFIED_SOURCES += [
"MacHelpers.mm",
"MacStringHelpers.mm",
"nsMacPreferencesReader.mm",
]
if CONFIG["OS_ARCH"] == "Darwin":
EXPORTS += [
"nsObjCExceptions.h",
]
EXPORTS.mozilla += [
"MacStringHelpers.h",
]
UNIFIED_SOURCES += [
"MacStringHelpers.mm",
"nsObjCExceptions.mm",
]