mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
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:
committed by
Facebook GitHub Bot
parent
1252f63c18
commit
3571f9a5c8
@@ -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 {
|
||||
|
||||
-27
@@ -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());
|
||||
}
|
||||
}
|
||||
+24
@@ -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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user