Skip to content

Commit a78a8e1

Browse files
cortinicofacebook-github-bot
authored andcommitted
Remove internal references of onCatalystInstanceDestroy() (#41835)
Summary: Pull Request resolved: #41835 This removes internal usages of `onCatalystInstanceDestroy`. The method is still available inside `NativeModule` but is `Deprecated(forRemoval = true)` so we're getting warning of its usages all over the places. Changelog: [Internal] [Changed] - Remove internal references of onCatalystInstanceDestroy() Reviewed By: hoxyq Differential Revision: D51589276 fbshipit-source-id: 84ed4d099a444977b95b4ef00e53750b79018e6f
1 parent 31005b7 commit a78a8e1

3 files changed

Lines changed: 2 additions & 10 deletions

File tree

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/bridge/BaseJavaModule.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,17 +80,12 @@ public boolean canOverrideExistingModule() {
8080
return false;
8181
}
8282

83-
@Override
84-
public void onCatalystInstanceDestroy() {}
85-
8683
/**
8784
* The CatalystInstance is going away with Venice. Therefore, the TurboModule infra introduces the
8885
* invalidate() method to allow NativeModules to clean up after themselves.
8986
*/
9087
@Override
91-
public void invalidate() {
92-
onCatalystInstanceDestroy();
93-
}
88+
public void invalidate() {}
9489

9590
/**
9691
* Subclasses can use this method to access {@link ReactApplicationContext} passed as a

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/bridge/CxxModuleWrapperBase.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,6 @@ public boolean canOverrideExistingModule() {
3737
return false;
3838
}
3939

40-
@Override
41-
public void onCatalystInstanceDestroy() {}
42-
4340
@Override
4441
public void invalidate() {
4542
mHybridData.resetNative();

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModule.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ public void onHostDestroy() {
196196

197197
@Override
198198
public void invalidate() {
199-
super.onCatalystInstanceDestroy();
199+
super.invalidate();
200200
mEventDispatcher.onCatalystInstanceDestroyed();
201201
mUIImplementation.onCatalystInstanceDestroyed();
202202

0 commit comments

Comments
 (0)