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: https://github.com/facebook/react-native/pull/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
This commit is contained in:
Родитель
3a41f69f9c
Коммит
a28dd38909
|
@ -28,10 +28,7 @@ public class HermesExecutor extends JavaScriptExecutor {
|
|||
}
|
||||
|
||||
HermesExecutor(@Nullable RuntimeConfig config) {
|
||||
super(
|
||||
config == null
|
||||
? initHybridDefaultConfig()
|
||||
: initHybrid(config.heapSizeMB, config.es6Proxy));
|
||||
super(config == null ? initHybridDefaultConfig() : initHybrid(config.heapSizeMB));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -50,5 +47,5 @@ public class HermesExecutor extends JavaScriptExecutor {
|
|||
|
||||
private static native HybridData initHybridDefaultConfig();
|
||||
|
||||
private static native HybridData initHybrid(long heapSizeMB, boolean es6Proxy);
|
||||
private static native HybridData initHybrid(long heapSizeMB);
|
||||
}
|
||||
|
|
|
@ -21,9 +21,7 @@
|
|||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
static ::hermes::vm::RuntimeConfig makeRuntimeConfig(
|
||||
jlong heapSizeMB,
|
||||
bool es6Proxy) {
|
||||
static ::hermes::vm::RuntimeConfig makeRuntimeConfig(jlong heapSizeMB) {
|
||||
namespace vm = ::hermes::vm;
|
||||
auto gcConfigBuilder =
|
||||
vm::GCConfig::Builder()
|
||||
|
@ -40,7 +38,6 @@ static ::hermes::vm::RuntimeConfig makeRuntimeConfig(
|
|||
|
||||
return vm::RuntimeConfig::Builder()
|
||||
.withGCConfig(gcConfigBuilder.build())
|
||||
.withES6Proxy(es6Proxy)
|
||||
.build();
|
||||
}
|
||||
|
||||
|
@ -69,10 +66,11 @@ class HermesExecutorHolder
|
|||
std::make_unique<HermesExecutorFactory>(installBindings));
|
||||
}
|
||||
|
||||
static jni::local_ref<jhybriddata>
|
||||
initHybrid(jni::alias_ref<jclass>, jlong heapSizeMB, bool es6Proxy) {
|
||||
static jni::local_ref<jhybriddata> initHybrid(
|
||||
jni::alias_ref<jclass>,
|
||||
jlong heapSizeMB) {
|
||||
JReactMarker::setLogPerfMarkerIfNeeded();
|
||||
auto runtimeConfig = makeRuntimeConfig(heapSizeMB, es6Proxy);
|
||||
auto runtimeConfig = makeRuntimeConfig(heapSizeMB);
|
||||
return makeCxxInstance(std::make_unique<HermesExecutorFactory>(
|
||||
installBindings, JSIExecutor::defaultTimeoutInvoker, runtimeConfig));
|
||||
}
|
||||
|
|
|
@ -10,7 +10,6 @@ package com.facebook.hermes.reactexecutor;
|
|||
/** Holds runtime configuration for a Hermes VM instance (master or snapshot). */
|
||||
public final class RuntimeConfig {
|
||||
public long heapSizeMB;
|
||||
public boolean es6Proxy;
|
||||
|
||||
RuntimeConfig() {}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче