Summary:
Changelog:
[iOS][Changed] - Removed methodName parameter that was used only for a warning message and moved the warning parameter to be calculated inline.

Reviewed By: fkgozali

Differential Revision: D34551444

fbshipit-source-id: 6ceba425b64df37b0dca7e222072f1836f151d83
This commit is contained in:
Gal Shirin 2022-03-01 23:56:55 -08:00 коммит произвёл Facebook GitHub Bot
Родитель 131844f40e
Коммит cfb11ca2f6
1 изменённых файлов: 3 добавлений и 7 удалений

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

@ -702,18 +702,14 @@ static Class getFallbackClassFromName(const char *name)
BOOL requiresMainQueueSetup = hasConstantsToExport || hasCustomInit;
if (requiresMainQueueSetup) {
const char *methodName = "";
if (hasConstantsToExport) {
methodName = "constantsToExport";
} else if (hasCustomInit) {
methodName = "init";
}
RCTLogWarn(
@"Module %@ requires main queue setup since it overrides `%s` but doesn't implement "
"`requiresMainQueueSetup`. In a future release React Native will default to initializing all native modules "
"on a background thread unless explicitly opted-out of.",
moduleClass,
methodName);
hasConstantsToExport ? "constantsToExport"
: hasCustomInit ? "init"
: "");
}
return requiresMainQueueSetup;