Migrate JSCInstance to Kotlin (#43750)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/43750

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D55610929

fbshipit-source-id: eb269bdb9a2d123605ae07d86739b32c576f5fa5
This commit is contained in:
Arushi Kesarwani
2024-04-02 12:18:50 -07:00
committed by Facebook GitHub Bot
parent 1252f63c18
commit 3571f9a5c8
3 changed files with 29 additions and 29 deletions
@@ -3649,9 +3649,12 @@ public class com/facebook/react/runtime/CoreReactPackage$$ReactModuleInfoProvide
public fun getReactModuleInfos ()Ljava/util/Map;
}
public class com/facebook/react/runtime/JSCInstance : com/facebook/react/runtime/JSRuntimeFactory {
public final class com/facebook/react/runtime/JSCInstance : com/facebook/react/runtime/JSRuntimeFactory {
public static final field Companion Lcom/facebook/react/runtime/JSCInstance$Companion;
public fun <init> ()V
protected static fun initHybrid ()Lcom/facebook/jni/HybridData;
}
public final class com/facebook/react/runtime/JSCInstance$Companion {
}
public abstract class com/facebook/react/runtime/JSRuntimeFactory {
@@ -1,27 +0,0 @@
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
package com.facebook.react.runtime;
import com.facebook.infer.annotation.Nullsafe;
import com.facebook.jni.HybridData;
import com.facebook.jni.annotations.DoNotStrip;
import com.facebook.soloader.SoLoader;
@Nullsafe(Nullsafe.Mode.LOCAL)
public class JSCInstance extends JSRuntimeFactory {
static {
SoLoader.loadLibrary("jscinstance");
}
@DoNotStrip
protected static native HybridData initHybrid();
public JSCInstance() {
super(initHybrid());
}
}
@@ -0,0 +1,24 @@
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
package com.facebook.react.runtime
import com.facebook.jni.HybridData
import com.facebook.jni.annotations.DoNotStrip
import com.facebook.soloader.SoLoader
import com.facebook.soloader.annotation.SoLoaderLibrary
@SoLoaderLibrary("jscinstance")
public class JSCInstance constructor() : JSRuntimeFactory(initHybrid()) {
public companion object {
init {
SoLoader.loadLibrary("jscinstance")
}
@DoNotStrip protected external fun initHybrid(): HybridData
}
}