From 1dbbcd965708d2510b21627195b7380c3a82eb98 Mon Sep 17 00:00:00 2001 From: Harini Malothu <185761277+HariniMalothu17@users.noreply.github.com> Date: Wed, 25 Feb 2026 14:37:13 +0530 Subject: [PATCH] =?UTF-8?q?Revert=20"[0.80]Fix=20crash=20in=20ABIViewManag?= =?UTF-8?q?er::RemoveAllChildren=20during=20shutdown=20=E2=80=A6"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit b376c7147ea2b8acddb7b9de9d117df5014d2861. --- ...windows-9cdf1061-38a3-4f07-b1ec-7da0c4f3fcd5.json | 7 ------- vnext/Microsoft.ReactNative/ABIViewManager.cpp | 12 +----------- 2 files changed, 1 insertion(+), 18 deletions(-) delete mode 100644 change/react-native-windows-9cdf1061-38a3-4f07-b1ec-7da0c4f3fcd5.json diff --git a/change/react-native-windows-9cdf1061-38a3-4f07-b1ec-7da0c4f3fcd5.json b/change/react-native-windows-9cdf1061-38a3-4f07-b1ec-7da0c4f3fcd5.json deleted file mode 100644 index b39740e0dd4..00000000000 --- a/change/react-native-windows-9cdf1061-38a3-4f07-b1ec-7da0c4f3fcd5.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type": "none", - "comment": "Fix watson bug", - "packageName": "react-native-windows", - "email": "hmalothu@microsoft.com", - "dependentChangeType": "none" -} diff --git a/vnext/Microsoft.ReactNative/ABIViewManager.cpp b/vnext/Microsoft.ReactNative/ABIViewManager.cpp index 686075b20fd..fcf8172894b 100644 --- a/vnext/Microsoft.ReactNative/ABIViewManager.cpp +++ b/vnext/Microsoft.ReactNative/ABIViewManager.cpp @@ -190,18 +190,8 @@ void ABIViewManager::AddView(const xaml::DependencyObject &parent, const xaml::D } void ABIViewManager::RemoveAllChildren(const xaml::DependencyObject &parent) { - if (!parent) { - return; - } - if (m_viewManagerWithChildren) { - if (auto fe = parent.try_as()) { - try { - m_viewManagerWithChildren.RemoveAllChildren(fe); - } catch (...) { - // External view manager may fail during shutdown if view is already disposed - } - } + m_viewManagerWithChildren.RemoveAllChildren(parent.as()); } else { Super::RemoveAllChildren(parent); }