Prepare the bridge for C++

Reviewed By: @nicklockwood

Differential Revision: D2432291
This commit is contained in:
Marc Horowitz
2015-09-18 15:01:21 -07:00
committed by facebook-github-bot-8
parent 18a7e363b5
commit a87ba4ab4c
6 changed files with 74 additions and 23 deletions

View File

@@ -50,8 +50,11 @@ typedef BOOL (^RCTArgumentBlock)(RCTBridge *, NSUInteger, id);
NSArray *_argumentBlocks;
NSString *_objCMethodName;
SEL _selector;
NSDictionary *_profileArgs;
}
@synthesize JSMethodName = _JSMethodName;
static void RCTLogArgumentError(RCTModuleMethod *method, NSUInteger index,
id valueOrType, const char *issue)
{
@@ -370,6 +373,19 @@ void RCTParseObjCMethodName(NSString **objCMethodName, NSArray **arguments)
return _selector;
}
- (NSDictionary *)profileArgs
{
if (_profileArgs) {
// This sets _selector
[self processMethodSignature];
_profileArgs = @{
@"module": NSStringFromClass(_moduleClass),
@"selector": NSStringFromSelector(_selector),
};
}
return _profileArgs;
}
- (void)invokeWithBridge:(RCTBridge *)bridge
module:(id)module
arguments:(NSArray *)arguments