electron/patches/common/chromium/mas-cfisobjc.patch

40 lines
1.3 KiB
Diff
Raw Normal View History

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2018-09-21 00:30:26 +00:00
From: Jeremy Apthorp <nornagon@nornagon.net>
Date: Thu, 20 Sep 2018 17:49:20 -0700
Subject: mas-cfisobjc.patch
Removes usage of the _CFIsObjC private API.
diff --git a/base/mac/foundation_util.mm b/base/mac/foundation_util.mm
2019-05-21 17:05:21 +00:00
index 8b20ebc678c39b722bd5b03930ce89847e8cc73a..dca8c939e757003aafc1528ec7bbb739bf971fa6 100644
--- a/base/mac/foundation_util.mm
+++ b/base/mac/foundation_util.mm
2019-03-06 17:50:12 +00:00
@@ -26,7 +26,6 @@
#if !defined(OS_IOS)
CFTypeID SecACLGetTypeID();
CFTypeID SecTrustedApplicationGetTypeID();
-Boolean _CFIsObjC(CFTypeID typeID, CFTypeRef obj);
#endif
} // extern "C"
2019-03-06 17:50:12 +00:00
@@ -315,8 +314,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;
}
2019-03-06 17:50:12 +00:00
@@ -384,9 +382,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);