Cleanup TurboModuleBinding

Summary:
* Make constructor private, all access is through install()
* Use nullability of longLivedObjectCollection_ instead of separate bool disableGlobalLongLivedObjectCollection_

Changelog: [Internal]

Reviewed By: RSNara

Differential Revision: D36592492

fbshipit-source-id: d65e779e1ac9fbe121937c5a20763aefcd589795
This commit is contained in:
Pieter De Baets
2022-05-25 07:46:21 -07:00
committed by Facebook GitHub Bot
parent 9f112af50a
commit d5045252f8
5 changed files with 47 additions and 96 deletions
@@ -169,12 +169,8 @@ void TurboModuleManager::installJSIBindings() {
return nullptr;
};
if (longLivedObjectCollection_) {
TurboModuleBinding::install(
runtime, std::move(turboModuleProvider), longLivedObjectCollection_);
} else {
TurboModuleBinding::install(runtime, std::move(turboModuleProvider));
}
TurboModuleBinding::install(
runtime, std::move(turboModuleProvider), longLivedObjectCollection_);
});
}