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 authored and Facebook GitHub Bot committed 2022-05-25 07:46:21 -07:00
1 parent 9f112af50a
commit d5045252f8
5 files changed
+47 -96

No files matched your search

@@ -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_);
});
}