Skip to content

Commit a28dd38

Browse files
janicduplessisfacebook-github-bot
authored andcommitted
Use default for hermes es6 proxy enabled (#30142)
Summary: Proxy is now enabled by default in hermes 0.7 (https://github.com/facebook/hermes/releases/tag/v0.7.0). However we currently disable it because of the config we pass. This removes the config so proxy is now enabled. ## Changelog [Android] [Changed] - Use default for hermes es6 proxy enabled Pull Request resolved: #30142 Test Plan: Tested that proxy is now enabled (typeof Proxy !== 'undefined') with hermes 0.7. Reviewed By: cpojer Differential Revision: D24494182 Pulled By: mhorowitz fbshipit-source-id: 7f8a506e2c436f2f1611e183ca22d33dc763643c
1 parent 3a41f69 commit a28dd38

File tree

3 files changed

+7
-13
lines changed

3 files changed

+7
-13
lines changed

ReactAndroid/src/main/java/com/facebook/hermes/reactexecutor/HermesExecutor.java

+2-5
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,7 @@ public class HermesExecutor extends JavaScriptExecutor {
2828
}
2929

3030
HermesExecutor(@Nullable RuntimeConfig config) {
31-
super(
32-
config == null
33-
? initHybridDefaultConfig()
34-
: initHybrid(config.heapSizeMB, config.es6Proxy));
31+
super(config == null ? initHybridDefaultConfig() : initHybrid(config.heapSizeMB));
3532
}
3633

3734
@Override
@@ -50,5 +47,5 @@ public String getName() {
5047

5148
private static native HybridData initHybridDefaultConfig();
5249

53-
private static native HybridData initHybrid(long heapSizeMB, boolean es6Proxy);
50+
private static native HybridData initHybrid(long heapSizeMB);
5451
}

ReactAndroid/src/main/java/com/facebook/hermes/reactexecutor/OnLoad.cpp

+5-7
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@
2121
namespace facebook {
2222
namespace react {
2323

24-
static ::hermes::vm::RuntimeConfig makeRuntimeConfig(
25-
jlong heapSizeMB,
26-
bool es6Proxy) {
24+
static ::hermes::vm::RuntimeConfig makeRuntimeConfig(jlong heapSizeMB) {
2725
namespace vm = ::hermes::vm;
2826
auto gcConfigBuilder =
2927
vm::GCConfig::Builder()
@@ -40,7 +38,6 @@ static ::hermes::vm::RuntimeConfig makeRuntimeConfig(
4038

4139
return vm::RuntimeConfig::Builder()
4240
.withGCConfig(gcConfigBuilder.build())
43-
.withES6Proxy(es6Proxy)
4441
.build();
4542
}
4643

@@ -69,10 +66,11 @@ class HermesExecutorHolder
6966
std::make_unique<HermesExecutorFactory>(installBindings));
7067
}
7168

72-
static jni::local_ref<jhybriddata>
73-
initHybrid(jni::alias_ref<jclass>, jlong heapSizeMB, bool es6Proxy) {
69+
static jni::local_ref<jhybriddata> initHybrid(
70+
jni::alias_ref<jclass>,
71+
jlong heapSizeMB) {
7472
JReactMarker::setLogPerfMarkerIfNeeded();
75-
auto runtimeConfig = makeRuntimeConfig(heapSizeMB, es6Proxy);
73+
auto runtimeConfig = makeRuntimeConfig(heapSizeMB);
7674
return makeCxxInstance(std::make_unique<HermesExecutorFactory>(
7775
installBindings, JSIExecutor::defaultTimeoutInvoker, runtimeConfig));
7876
}

ReactAndroid/src/main/java/com/facebook/hermes/reactexecutor/RuntimeConfig.java

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
/** Holds runtime configuration for a Hermes VM instance (master or snapshot). */
1111
public final class RuntimeConfig {
1212
public long heapSizeMB;
13-
public boolean es6Proxy;
1413

1514
RuntimeConfig() {}
1615

0 commit comments

Comments
 (0)