From a2959a915cddc68ea1ddd436f228def4e32ada76 Mon Sep 17 00:00:00 2001 From: Ramanpreet Nara Date: Mon, 11 Nov 2024 13:24:49 -0800 Subject: [PATCH] earlyjs: Reset error handler state after js pipeline fails (#47528) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/47528 After the js pipeline fails to handle the error, reset the hasHandledFatalError var. Changelog: [Internal] Reviewed By: sammy-SC Differential Revision: D65678387 fbshipit-source-id: ac7cd4724954ea78bf33542e208c5f5d3dba5383 --- .../react-native/ReactCommon/jserrorhandler/JsErrorHandler.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/react-native/ReactCommon/jserrorhandler/JsErrorHandler.cpp b/packages/react-native/ReactCommon/jserrorhandler/JsErrorHandler.cpp index 904baff427d..6742322af13 100644 --- a/packages/react-native/ReactCommon/jserrorhandler/JsErrorHandler.cpp +++ b/packages/react-native/ReactCommon/jserrorhandler/JsErrorHandler.cpp @@ -244,6 +244,9 @@ void JsErrorHandler::handleError( "handleError(): Error raised while reporting using js pipeline. Using c++ pipeline instead.", ex, error); + + // Re-try reporting using the c++ pipeline + _hasHandledFatalError = false; } }