Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2139,7 +2139,7 @@ PODS:
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- Yoga
- react-native-performance (5.1.0):
- react-native-performance (5.1.4):
- DoubleConversion
- glog
- hermes-engine
Expand Down Expand Up @@ -3816,7 +3816,7 @@ SPEC CHECKSUMS:
react-native-netinfo: 6aa96b58130ce8de834c2f6c00878b69703d9e10
react-native-pager-view: 21fa9c2dc9ba43370132b0c996eaeaefd2be4be0
react-native-pdf: 65f142fbddbb7ef4ee51c5e3bf2a03d24f507c11
react-native-performance: 025cfdaddd31efee1e334b15924a04f5497d9702
react-native-performance: 1e0b1e3a80e665fb392c658d5639d26a015efbdd
react-native-plaid-link-sdk: d82ea6d7f8065e82d9ea8cf6abf3cf4914da8b5c
react-native-release-profiler: 4dbd61f2e1ebc2b11cfa5a03511bbc88fda5a25b
react-native-safe-area-context: 00d03dc688ba86664be66f9e3f203fc7d747d899
Expand Down
6 changes: 4 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@
"react-native-onyx": "^2.0.117",
"react-native-pager-view": "6.5.3",
"react-native-pdf": "6.7.3",
"react-native-performance": "^5.1.0",
"react-native-performance": "^5.1.4",
"react-native-permissions": "^5.4.0",
"react-native-picker-select": "git+https://github.com/Expensify/react-native-picker-select.git#07d60d78d4772d47afd7a744940fc6b6d1881806",
"react-native-plaid-link-sdk": "11.11.0",
Expand Down
30 changes: 0 additions & 30 deletions patches/react-native-performance+5.1.0+001+bridgeless.patch

This file was deleted.

18 changes: 18 additions & 0 deletions patches/react-native-performance/details.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# `react-native-performance` patches

### [react-native-performance+5.1.4+001+fix-soft-crash-by-checking-for-active-react-instance.patch](react-native-performance+5.1.4+001+fix-soft-crash-by-checking-for-active-react-instance.patch)

- Reason:

```
`react-native-performance` emits some events using `RCTDeviceEventEmitter` on Android. Emitter should be used only after react instance has been created.
Otherwise, soft exception is thrown:

```
raiseSoftException(callWithExistingReactInstance(callFunctionOnModule("RCTDeviceEventEmitter", "emit"))): Execute: reactInstance is null. Dropping work.
```
```

- Upstream PR/issue: https://github.com/oblador/react-native-performance/pull/117
- E/App issue: https://github.com/Expensify/App/issues/66231
- PR introducing patch: https://github.com/Expensify/App/pull/66230
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
diff --git a/node_modules/react-native-performance/android/src/main/java/com/oblador/performance/PerformanceModule.java b/node_modules/react-native-performance/android/src/main/java/com/oblador/performance/PerformanceModule.java
index 4a187bb..66c94ee 100644
--- a/node_modules/react-native-performance/android/src/main/java/com/oblador/performance/PerformanceModule.java
+++ b/node_modules/react-native-performance/android/src/main/java/com/oblador/performance/PerformanceModule.java
@@ -187,7 +187,7 @@ public class PerformanceModule extends ReactContextBaseJavaModule implements Tur
WritableMap map = Arguments.fromBundle(metric.getDetail());
params.putMap("detail", map);
}
- if (getReactApplicationContext().hasActiveCatalystInstance()) {
+ if (getReactApplicationContext().hasActiveReactInstance()) {
getReactApplicationContext()
.getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class)
.emit("metric", params);
@@ -202,9 +202,11 @@ public class PerformanceModule extends ReactContextBaseJavaModule implements Tur
WritableMap map = Arguments.fromBundle(mark.getDetail());
params.putMap("detail", map);
}
- getReactApplicationContext()
- .getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class)
- .emit("mark", params);
+ if (getReactApplicationContext().hasActiveReactInstance()) {
+ getReactApplicationContext()
+ .getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class)
+ .emit("mark", params);
+ }
}

@Override
Loading