Commit 1ff8690a authored by Andrii Grynenko's avatar Andrii Grynenko Committed by Facebook GitHub Bot

Disable late-registration errors in Relaxed mode

Differential Revision: D26265450

fbshipit-source-id: 0cefa65feb3fc3b76c1b8b8a9059dc4d321c6751
parent 1ff074e1
......@@ -239,7 +239,7 @@ void SingletonVault::registerSingleton(detail::SingletonHolderBase* entry) {
auto state = state_.rlock();
state->check(detail::SingletonVaultState::Type::Running);
if (UNLIKELY(state->registrationComplete)) {
if (UNLIKELY(state->registrationComplete) && type_ == Type::Strict) {
LOG(ERROR) << "Registering singleton after registrationComplete().";
}
......@@ -252,7 +252,7 @@ void SingletonVault::addEagerInitSingleton(detail::SingletonHolderBase* entry) {
auto state = state_.rlock();
state->check(detail::SingletonVaultState::Type::Running);
if (UNLIKELY(state->registrationComplete)) {
if (UNLIKELY(state->registrationComplete) && type_ == Type::Strict) {
LOG(ERROR) << "Registering for eager-load after registrationComplete().";
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment