Skip to content

Commit

Permalink
Use the c.f.react.bridge.ReactMarker
Browse files Browse the repository at this point in the history
Reviewed By: andreicoman11

Differential Revision: D3834955

fbshipit-source-id: 027150d3829e8a15f28ea76877e4ab5a29ea50cf
  • Loading branch information
aaronechiu authored and Facebook Github Bot committed Sep 8, 2016
1 parent 29febb9 commit e70d1db
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 44 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,6 @@ public class ReactMarkerConstants {
public static final String CREATE_CATALYST_INSTANCE_END = "CREATE_CATALYST_INSTANCE_END";
public static final String RUN_JS_BUNDLE_START = "RUN_JS_BUNDLE_START";
public static final String RUN_JS_BUNDLE_END = "RUN_JS_BUNDLE_END";
public static final String NATIVE_MODULE_INITIALIZE_START = "NativeModule_start";
public static final String NATIVE_MODULE_INITIALIZE_END = "NativeModule_end";
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,18 @@

package com.facebook.react.cxxbridge;

import java.io.IOException;
import java.io.StringWriter;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;

import javax.annotation.Nullable;

import com.facebook.infer.annotation.Assertions;
import com.facebook.react.bridge.BaseJavaModule;
import com.facebook.react.bridge.CatalystInstance;
import com.facebook.react.bridge.NativeModule;
import com.facebook.react.bridge.OnBatchCompleteListener;
import com.facebook.react.bridge.ReadableNativeArray;
import com.facebook.react.bridge.ReactMarker;
import com.facebook.react.bridge.ReactMarkerConstants;
import com.facebook.react.common.MapBuilder;
import com.facebook.react.common.SetBuilder;
import com.facebook.infer.annotation.Assertions;
import com.facebook.systrace.Systrace;

/**
Expand Down Expand Up @@ -80,7 +73,7 @@ private NativeModuleRegistry(Map<Class<NativeModule>, NativeModule> moduleInstan
/* package */ void notifyCatalystInstanceInitialized() {
UiThreadUtil.assertOnUiThread();

ReactMarker.logMarker("NativeModule_start");
ReactMarker.logMarker(ReactMarkerConstants.NATIVE_MODULE_INITIALIZE_START);
Systrace.beginSection(
Systrace.TRACE_TAG_REACT_JAVA_BRIDGE,
"NativeModuleRegistry_notifyCatalystInstanceInitialized");
Expand All @@ -90,7 +83,7 @@ private NativeModuleRegistry(Map<Class<NativeModule>, NativeModule> moduleInstan
}
} finally {
Systrace.endSection(Systrace.TRACE_TAG_REACT_JAVA_BRIDGE);
ReactMarker.logMarker("NativeModule_end");
ReactMarker.logMarker(ReactMarkerConstants.NATIVE_MODULE_INITIALIZE_END);
}
}

Expand Down Expand Up @@ -130,7 +123,7 @@ public Builder add(NativeModule module) {
public NativeModuleRegistry build() {
Map<Class<NativeModule>, NativeModule> moduleInstances = new HashMap<>();
for (NativeModule module : mModules.values()) {
moduleInstances.put((Class<NativeModule>)module.getClass(), module);
moduleInstances.put((Class<NativeModule>) module.getClass(), module);
}
return new NativeModuleRegistry(moduleInstances);
}
Expand Down

This file was deleted.

0 comments on commit e70d1db

Please sign in to comment.