mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-02 09:21:44 +08: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
@@ -57,9 +57,7 @@ std::vector<MethodDescriptor> CxxNativeModule::getMethods() {
|
||||
|
||||
std::vector<MethodDescriptor> descs;
|
||||
for (auto& method : methods_) {
|
||||
assert(method.func || method.syncFunc);
|
||||
auto methodType = method.func ? (method.callbacks == 2 ? "promise" : "async") : "sync";
|
||||
descs.emplace_back(method.name, methodType);
|
||||
descs.emplace_back(method.name, method.getType());
|
||||
}
|
||||
return descs;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user