mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Revert a small change to UIManagerBinding
Summary: Changelog: [Internal] This reverts a small change from D26885562 (https://github.com/facebook/react-native/commit/ea1f9531f00b5cd834e03f58cdfa117a93634624). I'm not sure if this change was made intentionally (feel free to reject this diff if it was luluwu). Before D26885562 (https://github.com/facebook/react-native/commit/ea1f9531f00b5cd834e03f58cdfa117a93634624), if `RN$Bridgeless` was truthy and `RN$stopSurface` was falsey, then the function returned. After D26885562 (https://github.com/facebook/react-native/commit/ea1f9531f00b5cd834e03f58cdfa117a93634624), it ran the else clause (which shouldn't be run in bridgeless mode IIUC). Reviewed By: mdvacca Differential Revision: D27751583 fbshipit-source-id: daaf5c72fec11f4b2e21d1d2926a5026b984461f
This commit is contained in:
committed by
Facebook GitHub Bot
parent
ff47b0eecd
commit
9729d4dfeb
@@ -209,8 +209,11 @@ void UIManagerBinding::setSurfaceProps(
|
||||
void UIManagerBinding::stopSurface(jsi::Runtime &runtime, SurfaceId surfaceId)
|
||||
const {
|
||||
auto global = runtime.global();
|
||||
if (global.hasProperty(runtime, "RN$Bridgeless") &&
|
||||
global.hasProperty(runtime, "RN$stopSurface")) {
|
||||
if (global.hasProperty(runtime, "RN$Bridgeless")) {
|
||||
if (!global.hasProperty(runtime, "RN$stopSurface")) {
|
||||
// ReactFabric module has not been loaded yet; there's no surface to stop.
|
||||
return;
|
||||
}
|
||||
// Bridgeless mode uses a custom JSI binding instead of callable module.
|
||||
global.getPropertyAsFunction(runtime, "RN$stopSurface")
|
||||
.call(runtime, {jsi::Value{surfaceId}});
|
||||
|
||||
Reference in New Issue
Block a user