diff --git a/ReactAndroid/src/main/jni/react/JSCExecutor.cpp b/ReactAndroid/src/main/jni/react/JSCExecutor.cpp index e38e1a686..b678aff4c 100644 --- a/ReactAndroid/src/main/jni/react/JSCExecutor.cpp +++ b/ReactAndroid/src/main/jni/react/JSCExecutor.cpp @@ -30,7 +30,10 @@ using fbsystrace::FbSystraceSection; // Add native performance markers support #include + +#ifdef WITH_FB_MEMORY_PROFILING #include +#endif #ifdef WITH_FB_JSC_TUNING #include @@ -134,7 +137,9 @@ JSCExecutor::JSCExecutor(FlushImmediateCallback cb) : addNativePerfLoggingHooks(m_context); #endif + #ifdef WITH_FB_MEMORY_PROFILING addNativeMemoryHooks(m_context); + #endif } JSCExecutor::~JSCExecutor() { diff --git a/ReactAndroid/src/main/jni/react/JSCMemory.cpp b/ReactAndroid/src/main/jni/react/JSCMemory.cpp index 585fd64c4..f0316bd2a 100644 --- a/ReactAndroid/src/main/jni/react/JSCMemory.cpp +++ b/ReactAndroid/src/main/jni/react/JSCMemory.cpp @@ -8,7 +8,7 @@ #include "Value.h" -#if WITH_FB_MEMORY_PROFILING +#ifdef WITH_FB_MEMORY_PROFILING static JSValueRef nativeEnableAllocationTag( JSContextRef ctx, @@ -143,7 +143,7 @@ namespace facebook { namespace react { void addNativeMemoryHooks(JSGlobalContextRef ctx) { -#if WITH_FB_MEMORY_PROFILING +#ifdef WITH_FB_MEMORY_PROFILING installGlobalFunction(ctx, "nativeEnableAllocationTag", nativeEnableAllocationTag); installGlobalFunction(ctx, "nativeAllocationPushTag", nativeAllocationPushTag); installGlobalFunction(ctx, "nativeAllocationPopTag", nativeAllocationPopTag);