64ba8feb93
Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com> Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org> Co-authored-by: deepak1556 <hop2deep@gmail.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com> Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com> Co-authored-by: Jeremy Rose <jeremya@chromium.org>
44 lines
1.6 KiB
Diff
44 lines
1.6 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Jeremy Apthorp <nornagon@nornagon.net>
|
|
Date: Thu, 20 Sep 2018 17:49:20 -0700
|
|
Subject: mas: avoid usage of _CFIsObjC
|
|
|
|
Removes usage of the _CFIsObjC private API.
|
|
|
|
diff --git a/base/mac/foundation_util.mm b/base/mac/foundation_util.mm
|
|
index 622625b0277aa2c4d4456ce2e79a8b28c507121a..18df5fbb790ce1a3f9723cdc3bf0b2684a7d66b2 100644
|
|
--- a/base/mac/foundation_util.mm
|
|
+++ b/base/mac/foundation_util.mm
|
|
@@ -29,12 +29,6 @@
|
|
#if !defined(OS_IOS)
|
|
CFTypeID SecACLGetTypeID();
|
|
CFTypeID SecTrustedApplicationGetTypeID();
|
|
-// The NSFont/CTFont toll-free bridging is broken before 10.15.
|
|
-// http://www.openradar.me/15341349 rdar://15341349
|
|
-//
|
|
-// TODO(https://crbug.com/1076527): This is fixed in 10.15. When 10.15 is the
|
|
-// minimum OS for Chromium, remove this SPI declaration.
|
|
-Boolean _CFIsObjC(CFTypeID typeID, CFTypeRef obj);
|
|
#endif
|
|
} // extern "C"
|
|
|
|
@@ -327,8 +321,7 @@ void SetBaseBundleID(const char* new_base_bundle_id) {
|
|
const_cast<NSFont*>(reinterpret_cast<const NSFont*>(cf_val));
|
|
DCHECK(!cf_val ||
|
|
CTFontGetTypeID() == CFGetTypeID(cf_val) ||
|
|
- (_CFIsObjC(CTFontGetTypeID(), cf_val) &&
|
|
- [ns_val isKindOfClass:[NSFont class]]));
|
|
+ ([ns_val isKindOfClass:[NSFont class]]));
|
|
return ns_val;
|
|
}
|
|
|
|
@@ -399,9 +392,6 @@ CTFontRef NSToCFCast(NSFont* ns_val) {
|
|
return (CTFontRef)(cf_val);
|
|
}
|
|
|
|
- if (!_CFIsObjC(CTFontGetTypeID(), cf_val))
|
|
- return NULL;
|
|
-
|
|
id<NSObject> ns_val = reinterpret_cast<id>(const_cast<void*>(cf_val));
|
|
if ([ns_val isKindOfClass:[NSFont class]]) {
|
|
return (CTFontRef)(cf_val);
|