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
This commit is contained in:
Sergei Dryganets 2018-09-20 17:35:41 -07:00 коммит произвёл Facebook Github Bot
Родитель 40bcc38d91
Коммит d1ff0b0cc5
2 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -810,7 +810,7 @@ static void RCTGetRGBAColorComponents(CGColorRef color, CGFloat rgba[4])
default: default:
{ {
#ifdef RCT_DEBUG #if RCT_DEBUG
//unsupported format //unsupported format
RCTLogError(@"Unsupported color model: %i", model); RCTLogError(@"Unsupported color model: %i", model);
#endif #endif

Просмотреть файл

@ -654,7 +654,7 @@ struct RCTInstanceCallback : public InstanceCallback {
NSArray<RCTModuleData *> *moduleDataById = [self registerModulesForClasses:modules]; NSArray<RCTModuleData *> *moduleDataById = [self registerModulesForClasses:modules];
if (lazilyDiscovered) { if (lazilyDiscovered) {
#ifdef RCT_DEBUG #if RCT_DEBUG
// Lazily discovered modules do not require instantiation here, // Lazily discovered modules do not require instantiation here,
// as they are not allowed to have pre-instantiated instance // as they are not allowed to have pre-instantiated instance
// and must not require the main queue. // and must not require the main queue.