Type global hooks as function pointers
Reviewed By: danzimm Differential Revision: D6568053 fbshipit-source-id: 94fdecaf066a36c9c916bbd7b23c2f0680d91895
This commit is contained in:
parent
2fecbf6171
commit
eca51eb46a
|
@ -31,7 +31,11 @@ enum ReactMarkerId {
|
||||||
NATIVE_MODULE_SETUP_STOP,
|
NATIVE_MODULE_SETUP_STOP,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef __APPLE__
|
||||||
using LogTaggedMarker = std::function<void(const ReactMarkerId, const char* tag)>;
|
using LogTaggedMarker = std::function<void(const ReactMarkerId, const char* tag)>;
|
||||||
|
#else
|
||||||
|
typedef void(*LogTaggedMarker)(const ReactMarkerId, const char* tag);
|
||||||
|
#endif
|
||||||
extern RN_EXPORT LogTaggedMarker logTaggedMarker;
|
extern RN_EXPORT LogTaggedMarker logTaggedMarker;
|
||||||
|
|
||||||
extern void logMarker(const ReactMarkerId markerId);
|
extern void logMarker(const ReactMarkerId markerId);
|
||||||
|
@ -50,7 +54,7 @@ using Hook = JSValueRef(*)(
|
||||||
extern RN_EXPORT Hook loggingHook;
|
extern RN_EXPORT Hook loggingHook;
|
||||||
extern RN_EXPORT Hook nowHook;
|
extern RN_EXPORT Hook nowHook;
|
||||||
|
|
||||||
using ConfigurationHook = std::function<void(JSGlobalContextRef)>;
|
typedef void(*ConfigurationHook)(JSGlobalContextRef);
|
||||||
extern RN_EXPORT ConfigurationHook installPerfHooks;
|
extern RN_EXPORT ConfigurationHook installPerfHooks;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue