Skip to content

Commit

Permalink
Delete feature flag enable_crash_on_missing_component_descriptor
Browse files Browse the repository at this point in the history
Summary:
changelog: [internal]

Clean up unused feature flag

Reviewed By: fkgozali

Differential Revision: D42709724

fbshipit-source-id: a124015783983dea28db31a4431183f5c30a30e7
  • Loading branch information
sammy-SC authored and facebook-github-bot committed Jan 25, 2023
1 parent 51c03a0 commit 8863be4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 28 deletions.
4 changes: 1 addition & 3 deletions React/Fabric/RCTScheduler.mm
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,7 @@ - (instancetype)initWithToolbox:(SchedulerToolbox)toolbox
_layoutAnimationDelegateProxy = std::make_shared<LayoutAnimationDelegateProxy>((__bridge void *)self);
_animationDriver = std::make_shared<LayoutAnimationDriver>(
toolbox.runtimeExecutor, toolbox.contextContainer, _layoutAnimationDelegateProxy.get());
if (reactNativeConfig->getBool("react_fabric:enable_crash_on_missing_component_descriptor")) {
_animationDriver->enableCrashOnMissingComponentDescriptor();
}

if (reactNativeConfig->getBool("react_fabric:enable_simulate_image_props_memory_access")) {
_animationDriver->enableSimulateImagePropsMemoryAccess();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1108,10 +1108,6 @@ void LayoutAnimationKeyFrameManager::setClockNow(
now_ = std::move(now);
}

void LayoutAnimationKeyFrameManager::enableCrashOnMissingComponentDescriptor() {
crashOnMissingComponentDescriptor_ = true;
}

void LayoutAnimationKeyFrameManager::enableSimulateImagePropsMemoryAccess() {
simulateImagePropsMemoryAccess_ = true;
}
Expand All @@ -1120,18 +1116,8 @@ void LayoutAnimationKeyFrameManager::enableSimulateImagePropsMemoryAccess() {

bool LayoutAnimationKeyFrameManager::hasComponentDescriptorForShadowView(
ShadowView const &shadowView) const {
auto hasComponentDescriptor =
componentDescriptorRegistry_->hasComponentDescriptorAt(
shadowView.componentHandle);

if (crashOnMissingComponentDescriptor_ && !hasComponentDescriptor) {
LOG(FATAL) << "Component descriptor with handle: "
<< shadowView.componentHandle
<< " doesn't exist. The component name: "
<< shadowView.componentName;
}

return hasComponentDescriptor;
return componentDescriptorRegistry_->hasComponentDescriptorAt(
shadowView.componentHandle);
}

ComponentDescriptor const &
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,6 @@ class LayoutAnimationKeyFrameManager : public UIManagerAnimationDelegate,

void setClockNow(std::function<uint64_t()> now);

void enableCrashOnMissingComponentDescriptor();

void enableSimulateImagePropsMemoryAccess();

protected:
Expand Down Expand Up @@ -152,13 +150,6 @@ class LayoutAnimationKeyFrameManager : public UIManagerAnimationDelegate,
mutable butter::set<SurfaceId> surfaceIdsToStop_{};
bool reduceDeleteCreateMutation_{false};

/*
* Feature flag that forces a crash if component descriptor for shadow view
* doesn't exist. This is an unexpected state and we crash to collect extra
* logs.
*/
bool crashOnMissingComponentDescriptor_{false};

/*
* Feature flag that enables simulation of memory access. This is a temporary
* flag to diagnose where crashes are coming from in LayoutAnimations on iOS.
Expand Down

0 comments on commit 8863be4

Please sign in to comment.