From 0a5eefbf298f37a0660f094cf4be7f59d06784ad Mon Sep 17 00:00:00 2001 From: Sergei Dryganets Date: Thu, 20 Sep 2018 17:35:41 -0700 Subject: [PATCH] Debug only code were leaking into release builds on iOS. (#21232) Summary: RCT_DEBUG is always defined - it is just rather 0 or 1 so ```#ifndef RCT_DEBUG is always true``` Pull Request resolved: https://github.com/facebook/react-native/pull/21232 Differential Revision: D9982316 Pulled By: hramos fbshipit-source-id: 5408bfcf95a6ed2beae38217a6ad1ee43950857d --- React/Base/RCTUtils.m | 2 +- React/CxxBridge/RCTCxxBridge.mm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/React/Base/RCTUtils.m b/React/Base/RCTUtils.m index 94abf0b0d00..97eda7fef49 100644 --- a/React/Base/RCTUtils.m +++ b/React/Base/RCTUtils.m @@ -810,7 +810,7 @@ static void RCTGetRGBAColorComponents(CGColorRef color, CGFloat rgba[4]) default: { -#ifdef RCT_DEBUG +#if RCT_DEBUG //unsupported format RCTLogError(@"Unsupported color model: %i", model); #endif diff --git a/React/CxxBridge/RCTCxxBridge.mm b/React/CxxBridge/RCTCxxBridge.mm index 2c089b007e4..62b13fa9110 100644 --- a/React/CxxBridge/RCTCxxBridge.mm +++ b/React/CxxBridge/RCTCxxBridge.mm @@ -651,7 +651,7 @@ struct RCTInstanceCallback : public InstanceCallback { NSArray *moduleDataById = [self registerModulesForClasses:modules]; if (lazilyDiscovered) { -#ifdef RCT_DEBUG +#if RCT_DEBUG // Lazily discovered modules do not require instantiation here, // as they are not allowed to have pre-instantiated instance // and must not require the main queue.