From 53428031ee7cd457814aaa6b89ea4cb125c2acea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dawid=20Ma=C5=82ecki?= Date: Mon, 19 Oct 2026 09:46:51 -0700 Subject: [PATCH] Classify the deprecated cxxreact/ErrorUtils.h shim as for-frameworks (#59196) Summary: Pull Request resolved: https://github.com/react/react-native/pull/59196 `cxxreact/ErrorUtils.h` is a deprecated shim that forwards to ``, which declares `handleJSError` and is already classified "for frameworks". Add the `FrameworksGuard.h` include so the shim carries the same tier as the header it forwards to. Changelog: [Internal] ___ landed-with-radar-review Differential Revision: D126072196 fbshipit-source-id: dd0bf90ebc3bf2b3ebdf78ca3b39f3ac0bd75272 --- packages/react-native/ReactAndroid/build.gradle.kts | 2 +- packages/react-native/ReactCommon/cxxreact/ErrorUtils.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/react-native/ReactAndroid/build.gradle.kts b/packages/react-native/ReactAndroid/build.gradle.kts index 1412f7a3c45..42111739e6a 100644 --- a/packages/react-native/ReactAndroid/build.gradle.kts +++ b/packages/react-native/ReactAndroid/build.gradle.kts @@ -232,7 +232,7 @@ val preparePrefab by Pair("../ReactCommon/callinvoker/", ""), Pair("../ReactCommon/callinvoker/React/", "React/"), Pair("../ReactCommon/cxxreact/", "cxxreact/"), - // Exported because the public cxxreact/ErrorUtils.h includes it + // Exported because the deprecated cxxreact/ErrorUtils.h shim includes it Pair("../ReactCommon/jserrorhandler/", "jserrorhandler/"), Pair("../ReactCommon/react/bridging/", "react/bridging/"), Pair("../ReactCommon/react/bridging/React/", "React/"), diff --git a/packages/react-native/ReactCommon/cxxreact/ErrorUtils.h b/packages/react-native/ReactCommon/cxxreact/ErrorUtils.h index 35f44511507..dfd3fefec69 100644 --- a/packages/react-native/ReactCommon/cxxreact/ErrorUtils.h +++ b/packages/react-native/ReactCommon/cxxreact/ErrorUtils.h @@ -7,6 +7,8 @@ #pragma once +#include + #warning Deprecated: use instead. #include