Summary:
The async NativeModule method call event can fail if something goes wrong when we're about do dispatch the method call.
Changelog: [Internal]

Reviewed By: ejanzer

Differential Revision: D22609410

fbshipit-source-id: 699eeb78edfbefa85e417fd82318ae8e4f6f7d90
This commit is contained in:
Ramanpreet Nara 2020-07-31 12:45:48 -07:00 коммит произвёл Facebook GitHub Bot
Родитель 9c35b5b8c4
Коммит d22a121cb3
5 изменённых файлов: 19 добавлений и 0 удалений

Просмотреть файл

@ -249,6 +249,13 @@ void asyncMethodCallEnd(const char *moduleName, const char *methodName) {
}
}
void asyncMethodCallFail(const char *moduleName, const char *methodName) {
NativeModulePerfLogger *logger = g_perfLogger.get();
if (logger != nullptr) {
logger->asyncMethodCallFail(moduleName, methodName);
}
}
void asyncMethodCallBatchPreprocessStart() {
NativeModulePerfLogger *logger = g_perfLogger.get();
if (logger != nullptr) {

Просмотреть файл

@ -76,6 +76,7 @@ void asyncMethodCallArgConversionEnd(
const char *methodName);
void asyncMethodCallDispatch(const char *moduleName, const char *methodName);
void asyncMethodCallEnd(const char *moduleName, const char *methodName);
void asyncMethodCallFail(const char *moduleName, const char *methodName);
/**
* Pre-processing async method call batch

Просмотреть файл

@ -124,6 +124,9 @@ class NativeModulePerfLogger {
virtual void asyncMethodCallEnd(
const char *moduleName,
const char *methodName) = 0;
virtual void asyncMethodCallFail(
const char *moduleName,
const char *methodName) = 0;
/**
* In the NativeModule system, we batch async NativeModule method calls.

Просмотреть файл

@ -249,6 +249,13 @@ void asyncMethodCallEnd(const char *moduleName, const char *methodName) {
}
}
void asyncMethodCallFail(const char *moduleName, const char *methodName) {
NativeModulePerfLogger *logger = g_perfLogger.get();
if (logger != nullptr) {
logger->asyncMethodCallFail(moduleName, methodName);
}
}
void asyncMethodCallBatchPreprocessStart() {
NativeModulePerfLogger *logger = g_perfLogger.get();
if (logger != nullptr) {

Просмотреть файл

@ -76,6 +76,7 @@ void asyncMethodCallArgConversionEnd(
const char *methodName);
void asyncMethodCallDispatch(const char *moduleName, const char *methodName);
void asyncMethodCallEnd(const char *moduleName, const char *methodName);
void asyncMethodCallFail(const char *moduleName, const char *methodName);
/**
* Pre-processing async method call batch