Implement asyncMethodCallFail
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:
Родитель
9c35b5b8c4
Коммит
d22a121cb3
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче