mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Replace exported method registration with statically allocated struct
Reviewed By: fromcelticpark Differential Revision: D5389383 fbshipit-source-id: 9eb29b254b616574966b43ad24aa880d44589652
This commit is contained in:
committed by
Facebook Github Bot
parent
d94f3e4b98
commit
cb12080179
@@ -38,7 +38,7 @@ std::vector<MethodDescriptor> RCTNativeModule::getMethods() {
|
||||
|
||||
for (id<RCTBridgeMethod> method in m_moduleData.methods) {
|
||||
descs.emplace_back(
|
||||
method.JSMethodName.UTF8String,
|
||||
method.JSMethodName,
|
||||
RCTFunctionDescriptorFromType(method.functionType)
|
||||
);
|
||||
}
|
||||
@@ -103,7 +103,7 @@ MethodCallResult RCTNativeModule::invokeInner(unsigned int methodId, const folly
|
||||
}
|
||||
|
||||
NSString *message = [NSString stringWithFormat:
|
||||
@"Exception '%@' was thrown while invoking %@ on target %@ with params %@",
|
||||
@"Exception '%@' was thrown while invoking %s on target %@ with params %@",
|
||||
exception, method.JSMethodName, m_moduleData.name, objcParams];
|
||||
RCTFatal(RCTErrorWithMessage(message));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user