Fix SamplingProfiler and HeapCapture for apps that lazy load react modules
Reviewed By: cwdick Differential Revision: D4291903 fbshipit-source-id: 684ced8d6370494191cdb182a8e172680d69d17b
This commit is contained in:
parent
9b0e15cbb2
commit
de82931931
|
@ -22,7 +22,9 @@ import com.facebook.react.bridge.ReactContextBaseJavaModule;
|
|||
import com.facebook.react.bridge.ReactMethod;
|
||||
import com.facebook.react.module.annotations.ReactModule;
|
||||
|
||||
@ReactModule(name = "JSCHeapCapture")
|
||||
// This module is being called only by Java via the static method "captureHeap" that
|
||||
// requires it to alreay be initialized, thus we eagerly initialize this module
|
||||
@ReactModule(name = "JSCHeapCapture", needsEagerInit = true)
|
||||
public class JSCHeapCapture extends ReactContextBaseJavaModule {
|
||||
public interface HeapCapture extends JavaScriptModule {
|
||||
void captureHeap(String path);
|
||||
|
|
|
@ -21,7 +21,9 @@ import com.facebook.react.bridge.ReactContextBaseJavaModule;
|
|||
import com.facebook.react.bridge.ReactMethod;
|
||||
import com.facebook.react.module.annotations.ReactModule;
|
||||
|
||||
@ReactModule(name = "JSCSamplingProfiler")
|
||||
// This module is being called only by Java via the static method "poke" that
|
||||
// requires it to alreay be initialized, thus we eagerly initialize this module
|
||||
@ReactModule(name = "JSCSamplingProfiler", needsEagerInit = true)
|
||||
public class JSCSamplingProfiler extends ReactContextBaseJavaModule {
|
||||
public interface SamplingProfiler extends JavaScriptModule {
|
||||
void poke(int token);
|
||||
|
|
Loading…
Reference in New Issue