Skip to content
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
* It delegates handling touch events for itself and child views and sending those events to JS by
* using JSTouchDispatcher.
* This view is overriding {@link ViewGroup#onInterceptTouchEvent} method in order to be notified
* about the events for all of it's children and it's also overriding
* about the events for all of its children and it's also overriding
* {@link ViewGroup#requestDisallowInterceptTouchEvent} to make sure that
* {@link ViewGroup#onInterceptTouchEvent} will get events even when some child view start
* intercepting it. In case when no child view is interested in handling some particular
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,14 @@
import com.facebook.jni.HybridData;
import com.facebook.proguard.annotations.DoNotStrip;
import com.facebook.react.bridge.queue.MessageQueueThread;
import com.facebook.react.bridge.queue.MessageQueueThreadRegistry;
import com.facebook.react.bridge.queue.QueueThreadExceptionHandler;
import com.facebook.react.bridge.queue.ReactQueueConfiguration;
import com.facebook.react.bridge.queue.ReactQueueConfigurationImpl;
import com.facebook.react.bridge.queue.ReactQueueConfigurationSpec;
import com.facebook.react.common.ReactConstants;
import com.facebook.react.common.annotations.VisibleForTesting;
import com.facebook.react.uimanager.ViewManagerPropertyUpdater;
import com.facebook.soloader.SoLoader;
import com.facebook.systrace.Systrace;
import com.facebook.systrace.TraceListener;
Expand Down Expand Up @@ -297,6 +299,9 @@ public void run() {
}
});

MessageQueueThreadRegistry.clear();
ViewManagerPropertyUpdater.clear();

// This is a noop if the listener was not yet registered.
Systrace.unregisterListener(mTraceListener);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,9 @@ public static MessageQueueThread myMessageQueueThread() {
sMyMessageQueueThread.get(),
"This thread doesn't have a MessageQueueThread registered to it!");
}

public static void clear() {
sMyMessageQueueThread.remove();
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ public interface ShadowNodeSetter<T extends ReactShadowNode> extends Settable {
new HashMap<>();
private static final Map<Class<?>, ShadowNodeSetter<?>> SHADOW_NODE_SETTER_MAP = new HashMap<>();

public static void clear() {
ViewManagersPropertyCache.clear();
VIEW_MANAGER_SETTER_MAP.clear();
SHADOW_NODE_SETTER_MAP.clear();
}

public static <T extends ViewManager, V extends View> void updateProps(
T manager,
V v,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@
private static final Map<Class, Map<String, PropSetter>> CLASS_PROPS_CACHE = new HashMap<>();
private static final Map<String, PropSetter> EMPTY_PROPS_MAP = new HashMap<>();

public static void clear() {
CLASS_PROPS_CACHE.clear();
EMPTY_PROPS_MAP.clear();
}

/*package*/ static abstract class PropSetter {

protected final String mPropName;
Expand Down