Stable API - Refactor and remove unnecessary RuntimeConfig (#48934)

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

This class is publicly exposed but effectively unused at all (neither internally, nor externally).
I'm removing it as this should not affect anyone.

Changelog:
[Android] [Breaking] - Removed `RuntimeConfig` class for Hermes which was unused.

Reviewed By: tdn120

Differential Revision: D68631945

fbshipit-source-id: 6a62ccda9e62f4bae650c11bc17a95efc8c88baf
This commit is contained in:
Nicola Corti
2025-01-28 04:58:35 -08:00
committed by Facebook GitHub Bot
parent 514ec4192f
commit 08ddc11269
3 changed files with 4 additions and 22 deletions
@@ -13,11 +13,8 @@ import com.facebook.react.bridge.JavaScriptExecutor
import com.facebook.react.common.build.ReactBuildConfig
import com.facebook.soloader.SoLoader
public class HermesExecutor
internal constructor(config: RuntimeConfig?, enableDebugger: Boolean, debuggerName: String) :
JavaScriptExecutor(
config?.let { initHybrid(enableDebugger, debuggerName, it.heapSizeMB) }
?: initHybridDefaultConfig(enableDebugger, debuggerName)) {
public class HermesExecutor internal constructor(enableDebugger: Boolean, debuggerName: String) :
JavaScriptExecutor(initHybridDefaultConfig(enableDebugger, debuggerName)) {
override fun getName(): String = "HermesExecutor$mode"
@@ -13,9 +13,7 @@ import com.facebook.hermes.instrumentation.HermesSamplingProfiler.enable
import com.facebook.react.bridge.JavaScriptExecutor
import com.facebook.react.bridge.JavaScriptExecutorFactory
public class HermesExecutorFactory
@JvmOverloads
public constructor(private val config: RuntimeConfig? = null) : JavaScriptExecutorFactory {
public class HermesExecutorFactory : JavaScriptExecutorFactory {
private var enableDebugger = true
private var debuggerName = ""
@@ -27,7 +25,7 @@ public constructor(private val config: RuntimeConfig? = null) : JavaScriptExecut
this.debuggerName = debuggerName
}
override fun create(): JavaScriptExecutor = HermesExecutor(config, enableDebugger, debuggerName)
override fun create(): JavaScriptExecutor = HermesExecutor(enableDebugger, debuggerName)
override fun startSamplingProfiler() {
enable()
@@ -1,13 +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.hermes.reactexecutor
/** Holds runtime configuration for a Hermes VM instance (master or snapshot). */
public class RuntimeConfig {
public var heapSizeMB: Long = 0L
}