Remove assertions in ~Scheduler and ~SurfaceHandler
Summary: ~Scheduler and ~SurfaceHandler both contain react_native_asserts that trip whenever we reload React Native with Fabric enabled. These asserts trip because of a memory leak in Fabric. These asserts do not run in production. We should fix the memory leak before re-enabling these assertions. Changelog: [Internal] Reviewed By: JoshuaGross Differential Revision: D27481220 fbshipit-source-id: 15c3d46f7efab9ed67a70714efe44b74b0acd385
This commit is contained in:
Родитель
4565fd8092
Коммит
f525ec0fe5
|
@ -150,9 +150,10 @@ Scheduler::~Scheduler() {
|
|||
surfaceIds.push_back(shadowTree.getSurfaceId());
|
||||
});
|
||||
|
||||
react_native_assert(
|
||||
surfaceIds.empty() &&
|
||||
"Scheduler was destroyed with outstanding Surfaces.");
|
||||
// TODO(T88046056): Fix Android memory leak before uncommenting changes
|
||||
// react_native_assert(
|
||||
// surfaceIds.empty() &&
|
||||
// "Scheduler was destroyed with outstanding Surfaces.");
|
||||
|
||||
if (surfaceIds.empty()) {
|
||||
return;
|
||||
|
|
|
@ -278,9 +278,11 @@ void SurfaceHandler::setUIManager(UIManager const *uiManager) const noexcept {
|
|||
}
|
||||
|
||||
SurfaceHandler::~SurfaceHandler() noexcept {
|
||||
react_native_assert(
|
||||
link_.status == Status::Unregistered &&
|
||||
"`SurfaceHandler` must be unregistered (or moved-from) before deallocation.");
|
||||
// TODO(T88046056): Fix Android memory leak before uncommenting changes
|
||||
// react_native_assert(
|
||||
// link_.status == Status::Unregistered &&
|
||||
// "`SurfaceHandler` must be unregistered (or moved-from) before
|
||||
// deallocation.");
|
||||
}
|
||||
|
||||
} // namespace react
|
||||
|
|
Загрузка…
Ссылка в новой задаче