mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-28 20:25:33 +08:00
Removed debug code from release builds
This commit is contained in:
@@ -7,6 +7,10 @@
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*/
|
||||
|
||||
#import "RCTDefines.h"
|
||||
|
||||
#if RCT_DEV // Debug executors are only supported in dev mode
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
#import "RCTJavaScriptExecutor.h"
|
||||
@@ -40,3 +44,5 @@
|
||||
- (UIWebView *)invalidateAndReclaimWebView;
|
||||
|
||||
@end
|
||||
|
||||
#endif
|
||||
|
||||
@@ -7,6 +7,10 @@
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*/
|
||||
|
||||
#import "RCTDefines.h"
|
||||
|
||||
#if RCT_DEV // Debug executors are only supported in dev mode
|
||||
|
||||
#import "RCTWebViewExecutor.h"
|
||||
|
||||
#import <objc/runtime.h>
|
||||
@@ -188,9 +192,14 @@ static void RCTReportError(RCTJavaScriptCallback callback, NSString *fmt, ...)
|
||||
asGlobalObjectNamed:(NSString *)objectName
|
||||
callback:(RCTJavaScriptCompleteBlock)onComplete
|
||||
{
|
||||
RCTAssert(!_objectsToInject[objectName],
|
||||
@"already injected object named %@", _objectsToInject[objectName]);
|
||||
if (RCT_DEBUG) {
|
||||
RCTAssert(!_objectsToInject[objectName],
|
||||
@"already injected object named %@", _objectsToInject[objectName]);
|
||||
}
|
||||
_objectsToInject[objectName] = script;
|
||||
onComplete(nil);
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user