Skip to content

Commit d2d00e0

Browse files
Dan CaspiFacebook Github Bot 5
authored andcommitted
Adding GC Timer Sweeping to Android
Reviewed By: mhahnenberg Differential Revision: D2972822 fb-gh-sync-id: b0ed28c26e3f1141c798d9d107d9e198611f9dce shipit-source-id: b0ed28c26e3f1141c798d9d107d9e198611f9dce
1 parent dc13115 commit d2d00e0

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

ReactAndroid/src/main/jni/react/JSCExecutor.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,10 @@ void JSCExecutor::destroy() {
141141
}
142142

143143
void JSCExecutor::initOnJSVMThread() {
144+
#if defined(WITH_FB_JSC_TUNING) && !defined(WITH_JSC_INTERNAL)
145+
// TODO: Find a way to pass m_jscConfig to configureJSCForAndroid()
146+
configureJSCForAndroid(m_jscConfig.getDefault("GCTimers", false).asBool());
147+
#endif
144148
m_context = JSGlobalContextCreateInGroup(nullptr, nullptr);
145149
s_globalContextRefToJSCExecutor[m_context] = this;
146150
installGlobalFunction(m_context, "nativeFlushQueueImmediate", nativeFlushQueueImmediate);
@@ -152,9 +156,7 @@ void JSCExecutor::initOnJSVMThread() {
152156

153157
installGlobalFunction(m_context, "nativeLoggingHook", JSLogging::nativeHook);
154158

155-
// TODO (t10136849): Pass the config options from map to JSC
156-
157-
#ifdef WITH_FB_JSC_TUNING
159+
#if defined(WITH_JSC_INTERNAL) && defined(WITH_FB_JSC_TUNING)
158160
configureJSCForAndroid();
159161
#endif
160162

0 commit comments

Comments
 (0)