Fix NativeJSCHeapCapture

Summary:
In D15393464, we introduced `NativeHeapCapture`, but it had a few problems:
1. It required `JSCHeapCapture` by doing `TurboModuleRegistry.get<Spec>('HeapCapture')`, when it should have done `TurboModuleRegistry.get<Spec>('JSCHeapCapture')`.
2. It had an additional method `captureHeap`, which didn't exist on the Android NativeModule.

This diff corrects those mistakes.

Changelog:
[Both][Fixed] - Fix JSCHeapCapture

Reviewed By: PeteTheHeat

Differential Revision: D19383511

fbshipit-source-id: 30e69afbcdba673f3f32c16bde4f0342568ab97d
This commit is contained in:
Ramanpreet Nara
2020-01-14 08:03:49 -08:00
committed by Facebook Github Bot
parent 6bdfd84a45
commit 7e3a43c23d
5 changed files with 72 additions and 55 deletions
@@ -0,0 +1,29 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* <p>This source code is licensed under the MIT license found in the LICENSE file in the root
* directory of this source tree.
*
* <p>Generated by an internal genrule from Flow types.
*
* @generated
* @nolint
*/
package com.facebook.fbreact.specs;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.bridge.ReactContextBaseJavaModule;
import com.facebook.react.bridge.ReactMethod;
import com.facebook.react.bridge.ReactModuleWithSpec;
import com.facebook.react.turbomodule.core.interfaces.TurboModule;
import javax.annotation.Nullable;
public abstract class NativeJSCHeapCaptureSpec extends ReactContextBaseJavaModule implements ReactModuleWithSpec, TurboModule {
public NativeJSCHeapCaptureSpec(ReactApplicationContext reactContext) {
super(reactContext);
}
@ReactMethod
public abstract void captureComplete(String path, @Nullable String error);
}