Skip to content

Commit

Permalink
Fix SamplingProfiler and HeapCapture for apps that lazy load react mo…
Browse files Browse the repository at this point in the history
…dules

Reviewed By: cwdick

Differential Revision: D4291903

fbshipit-source-id: 684ced8d6370494191cdb182a8e172680d69d17b
  • Loading branch information
lukaspiatkowski authored and Martin Konicek committed Dec 12, 2016
1 parent 8fb2440 commit d919eb7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@
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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
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);
Expand Down

0 comments on commit d919eb7

Please sign in to comment.