From 27be386c2ef0ab237e4650be957f6a030b05d5cf Mon Sep 17 00:00:00 2001 From: Tadeu Zagallo Date: Tue, 3 Nov 2015 03:49:44 -0800 Subject: [PATCH] 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 --- React/Base/RCTBatchedBridge.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/React/Base/RCTBatchedBridge.m b/React/Base/RCTBatchedBridge.m index 1a9e9d299..cb15bcf44 100644 --- a/React/Base/RCTBatchedBridge.m +++ b/React/Base/RCTBatchedBridge.m @@ -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]; }