Skip to content

Commit

Permalink
Move initialization of MapBuffer so
Browse files Browse the repository at this point in the history
Summary:
This diff refactors the initialization of MapBuffer so

changelog: [internal] internal

Reviewed By: NickGerleman

Differential Revision: D40348981

fbshipit-source-id: 88bbf4f2370373c20f805c3b23d0ecbe8a26bb86
  • Loading branch information
mdvacca authored and facebook-github-bot committed Oct 18, 2022
1 parent 82e86c4 commit e87cdc7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import com.facebook.react.bridge.ReadableNativeMap;
import com.facebook.react.bridge.RuntimeExecutor;
import com.facebook.react.bridge.RuntimeScheduler;
import com.facebook.react.common.mapbuffer.MapBufferSoLoader;
import com.facebook.react.fabric.events.EventBeatManager;
import com.facebook.react.fabric.events.EventEmitterWrapper;
import com.facebook.react.uimanager.PixelUtil;
Expand All @@ -26,6 +27,7 @@ public class Binding {

static {
FabricSoLoader.staticInit();
MapBufferSoLoader.staticInit();
}

@DoNotStrip private final HybridData mHybridData;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
import com.facebook.react.bridge.JSIModuleProvider;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.bridge.UIManager;
import com.facebook.react.common.mapbuffer.MapBufferSoLoader;
import com.facebook.react.config.ReactFeatureFlags;
import com.facebook.react.fabric.events.EventBeatManager;
import com.facebook.react.uimanager.ViewManagerRegistry;
import com.facebook.systrace.Systrace;
Expand Down Expand Up @@ -57,10 +55,6 @@ public UIManager get() {
Systrace.TRACE_TAG_REACT_JAVA_BRIDGE, "FabricJSIModuleProvider.registerBinding");
final Binding binding = new Binding();

if (ReactFeatureFlags.mapBufferSerializationEnabled) {
MapBufferSoLoader.staticInit();
}

binding.register(
mReactApplicationContext.getCatalystInstance().getRuntimeExecutor(),
mReactApplicationContext.getCatalystInstance().getRuntimeScheduler(),
Expand Down

0 comments on commit e87cdc7

Please sign in to comment.