mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-08 22:42:05 +08:00
make ReactMarker initialization one-shot
Reviewed By: AaaChiuuu Differential Revision: D4996560 fbshipit-source-id: 020a850f72a2b5c2327b904cac3245d39e114508
This commit is contained in:
committed by
Facebook Github Bot
parent
b2f3a65eab
commit
cc3d034460
@@ -19,11 +19,10 @@ public class ReactMarker {
|
||||
|
||||
private static @Nullable MarkerListener sMarkerListener = null;
|
||||
|
||||
public static void setMarkerListener(MarkerListener listener) {
|
||||
SoftAssertions.assertCondition(
|
||||
sMarkerListener == null,
|
||||
"MarkerListener is being overwritten.");
|
||||
sMarkerListener = listener;
|
||||
public static void initialize(MarkerListener listener) {
|
||||
if (sMarkerListener == null) {
|
||||
sMarkerListener = listener;
|
||||
}
|
||||
}
|
||||
|
||||
@DoNotStrip
|
||||
|
||||
Reference in New Issue
Block a user