mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Back out "Disable weak event emitter in AttributedString for Apple Silicon Mac running iOS build app" (#48868)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/48868 Original commit changeset: ac48be3305eb Original Phabricator Diff: D68093083 Changelog: [iOS][Removed] - Removed workaround for a iOS build app running on Apple Silicon Mac(in Xcode Destination: "Mac(Designed for iPad)") TextInput crash due to serialization attempt of WeakEventEmitter Reviewed By: javache Differential Revision: D68452788 fbshipit-source-id: 9d3466950c43a10f36ca594997ae5a586d1a2a00
This commit is contained in:
committed by
Facebook GitHub Bot
parent
04f9451dab
commit
9b06d0d8a9
+2
-2
@@ -101,7 +101,7 @@ static NSSet<NSNumber *> *returnKeyTypesSet;
|
||||
NSMutableDictionary<NSAttributedStringKey, id> *defaultAttributes =
|
||||
[_backedTextInputView.defaultTextAttributes mutableCopy];
|
||||
|
||||
#if !TARGET_OS_MAC && !TARGET_OS_MACCATALYST
|
||||
#if !TARGET_OS_MACCATALYST
|
||||
RCTWeakEventEmitterWrapper *eventEmitterWrapper = [RCTWeakEventEmitterWrapper new];
|
||||
eventEmitterWrapper.eventEmitter = _eventEmitter;
|
||||
defaultAttributes[RCTAttributedStringEventEmitterKey] = eventEmitterWrapper;
|
||||
@@ -266,7 +266,7 @@ static NSSet<NSNumber *> *returnKeyTypesSet;
|
||||
if (newTextInputProps.textAttributes != oldTextInputProps.textAttributes) {
|
||||
NSMutableDictionary<NSAttributedStringKey, id> *defaultAttributes =
|
||||
RCTNSTextAttributesFromTextAttributes(newTextInputProps.getEffectiveTextAttributes(RCTFontSizeMultiplier()));
|
||||
#if !TARGET_OS_MAC && !TARGET_OS_MACCATALYST
|
||||
#if !TARGET_OS_MACCATALYST
|
||||
defaultAttributes[RCTAttributedStringEventEmitterKey] =
|
||||
_backedTextInputView.defaultTextAttributes[RCTAttributedStringEventEmitterKey];
|
||||
#endif
|
||||
|
||||
+1
-1
@@ -407,7 +407,7 @@ static NSMutableAttributedString *RCTNSAttributedStringFragmentWithAttributesFro
|
||||
{
|
||||
auto nsAttributedStringFragment = RCTNSAttributedStringFragmentFromFragment(fragment, placeholderImage);
|
||||
|
||||
#if !TARGET_OS_MAC && !TARGET_OS_MACCATALYST
|
||||
#if !TARGET_OS_MACCATALYST
|
||||
if (fragment.parentShadowView.componentHandle) {
|
||||
RCTWeakEventEmitterWrapper *eventEmitterWrapper = [RCTWeakEventEmitterWrapper new];
|
||||
eventEmitterWrapper.eventEmitter = fragment.parentShadowView.eventEmitter;
|
||||
|
||||
Reference in New Issue
Block a user