Delete ReactFeatureFlags.enableReactContextCleanupFix

Summary:
This diff deletes the flag ReactFeatureFlags.enableReactContextCleanupFix, the flag was disabled for many months, I just disable it.

changelog: [internal] internal

Reviewed By: genkikondo, makovkastar

Differential Revision: D33781628

fbshipit-source-id: 4b5e22adf9d30da5b85bbbde8bdc98d98f5e8891
This commit is contained in:
David Vacca
2022-01-27 17:03:26 -08:00
committed by Facebook GitHub Bot
parent 9abcea7e11
commit 11b7443afb
5 changed files with 0 additions and 19 deletions
@@ -8,7 +8,6 @@
package com.facebook.react.bridge;
import com.facebook.infer.annotation.Assertions;
import com.facebook.react.config.ReactFeatureFlags;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -45,8 +44,5 @@ public class JSIModuleRegistry {
JSIModuleHolder moduleHolder = entry.getValue();
moduleHolder.notifyJSInstanceDestroy();
}
if (ReactFeatureFlags.enableReactContextCleanupFix) {
mModules.clear();
}
}
}
@@ -107,9 +107,6 @@ public class NativeModuleRegistry {
for (ModuleHolder module : mModules.values()) {
module.destroy();
}
if (ReactFeatureFlags.enableReactContextCleanupFix) {
mModules.clear();
}
} finally {
Systrace.endSection(Systrace.TRACE_TAG_REACT_JAVA_BRIDGE);
}
@@ -23,7 +23,6 @@ import com.facebook.react.bridge.queue.MessageQueueThread;
import com.facebook.react.bridge.queue.ReactQueueConfiguration;
import com.facebook.react.common.LifecycleState;
import com.facebook.react.common.ReactConstants;
import com.facebook.react.config.ReactFeatureFlags;
import java.lang.ref.WeakReference;
import java.util.concurrent.CopyOnWriteArraySet;
@@ -320,11 +319,6 @@ public class ReactContext extends ContextWrapper {
if (mCatalystInstance != null) {
mCatalystInstance.destroy();
}
if (ReactFeatureFlags.enableReactContextCleanupFix) {
mLifecycleEventListeners.clear();
mActivityEventListeners.clear();
mWindowFocusEventListeners.clear();
}
}
/** Should be called by the hosting Fragment in {@link Fragment#onActivityResult} */
@@ -71,9 +71,6 @@ public class ReactFeatureFlags {
public static boolean enableRuntimeSchedulerInTurboModule = false;
/** Enables a more aggressive cleanup during destruction of ReactContext */
public static boolean enableReactContextCleanupFix = false;
/** Feature flag to configure eager attachment of the root view/initialisation of the JS code */
public static boolean enableEagerRootViewAttachment = false;
@@ -234,9 +234,6 @@ public class UIManagerModule extends ReactContextBaseJavaModule
mUIImplementation.onCatalystInstanceDestroyed();
ReactApplicationContext reactApplicationContext = getReactApplicationContext();
if (ReactFeatureFlags.enableReactContextCleanupFix) {
reactApplicationContext.removeLifecycleEventListener(this);
}
reactApplicationContext.unregisterComponentCallbacks(mMemoryTrimCallback);
YogaNodePool.get().clear();
ViewManagerPropertyUpdater.clear();