From 753b37e4795e363e89c7cdd8b5456391803db154 Mon Sep 17 00:00:00 2001 From: Pieter De Baets Date: Mon, 5 Sep 2016 07:32:19 -0700 Subject: [PATCH] Remove unused -[RCTBridgeMethod profileArgs] Reviewed By: mhorowitz Differential Revision: D3801106 fbshipit-source-id: 214a18b548f8142c0f3d6b2f7db7a24894d1f01d --- React/Base/RCTBridgeMethod.h | 1 - React/Base/RCTModuleMethod.m | 63 ++++++++++++++++-------------------- 2 files changed, 27 insertions(+), 37 deletions(-) diff --git a/React/Base/RCTBridgeMethod.h b/React/Base/RCTBridgeMethod.h index cb322c261..bfa466cef 100644 --- a/React/Base/RCTBridgeMethod.h +++ b/React/Base/RCTBridgeMethod.h @@ -19,7 +19,6 @@ typedef NS_ENUM(NSUInteger, RCTFunctionType) { @protocol RCTBridgeMethod @property (nonatomic, copy, readonly) NSString *JSMethodName; -@property (nonatomic, copy, readonly) NSDictionary *profileArgs; @property (nonatomic, readonly) RCTFunctionType functionType; - (void)invokeWithBridge:(RCTBridge *)bridge diff --git a/React/Base/RCTModuleMethod.m b/React/Base/RCTModuleMethod.m index 38c18c808..8c51824e9 100644 --- a/React/Base/RCTModuleMethod.m +++ b/React/Base/RCTModuleMethod.m @@ -27,7 +27,7 @@ typedef BOOL (^RCTArgumentBlock)(RCTBridge *, NSUInteger, id); nullability:(RCTNullability)nullability unused:(BOOL)unused { - if ((self = [super init])) { + if (self = [super init]) { _type = [type copy]; _nullability = nullability; _unused = unused; @@ -44,11 +44,9 @@ typedef BOOL (^RCTArgumentBlock)(RCTBridge *, NSUInteger, id); NSArray *_argumentBlocks; NSString *_methodSignature; SEL _selector; - NSDictionary *_profileArgs; } @synthesize JSMethodName = _JSMethodName; -@synthesize functionType = _functionType; static void RCTLogArgumentError(RCTModuleMethod *method, NSUInteger index, id valueOrType, const char *issue) @@ -157,27 +155,10 @@ SEL RCTParseMethodSignature(NSString *methodSignature, NSArray 0 ? JSMethodName : ({ - NSString *methodName = methodSignature; - NSRange colonRange = [methodName rangeOfString:@":"]; - if (colonRange.location != NSNotFound) { - methodName = [methodName substringToIndex:colonRange.location]; - } - methodName = [methodName stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]; - RCTAssert(methodName.length, @"%@ is not a valid JS function name, please" - " supply an alternative using RCT_REMAP_METHOD()", methodSignature); - methodName; - }); - - if ([_methodSignature rangeOfString:@"RCTPromise"].length) { - _functionType = RCTFunctionTypePromise; - } else { - _functionType = RCTFunctionTypeNormal; - } + _JSMethodName = [JSMethodName copy]; } return self; @@ -218,7 +199,6 @@ SEL RCTParseMethodSignature(NSString *methodSignature, NSArray", - [self class], self, [self methodName], _JSMethodName]; + return [NSString stringWithFormat:@"<%@: %p; exports %@ as %@()>", + [self class], self, [self methodName], self.JSMethodName]; } @end