Fix trace name for native module calls received from JS

Summary: public

At some point the profile call was changed to only pass `@"invoke callback"`
rather than the module name, which makes most entries pretty much useless.
Change it back to be the module name.

Reviewed By: javache

Differential Revision: D2602222

fb-gh-sync-id: c4e8e3f559f66725620293cc575baf5ede48df31
This commit is contained in:
Tadeu Zagallo 2015-11-03 03:49:44 -08:00 committed by facebook-github-bot-4
parent 4411ad49a4
commit 27be386c2e
1 changed files with 2 additions and 2 deletions

View File

@ -805,8 +805,6 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithBundleURL:(__unused NSURL *)bundleUR
return NO;
}
RCTProfileBeginEvent(0, @"Invoke callback", nil);
RCTModuleData *moduleData = _moduleDataByID[moduleID];
if (RCT_DEBUG && !moduleData) {
RCTLogError(@"No module found for id '%zd'", moduleID);
@ -819,6 +817,8 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithBundleURL:(__unused NSURL *)bundleUR
return NO;
}
RCTProfileBeginEvent(0, [NSString stringWithFormat:@"[%@ %@]", moduleData.name, method.JSMethodName], nil);
@try {
[method invokeWithBridge:self module:moduleData.instance arguments:params];
}