• Cameron Pickett's avatar
    Handle nullptr from getTimekeeperSingleton · d1c5974b
    Cameron Pickett authored
    Summary:
    According to folly::Singleton::try_get(), https://fburl.com/23wqby9i, the caller is responsible for handling a nullptr return. In this case, we handle it poorly, via a crash both in production and debug code.
    
    This diff opts for handling the nullptr more gracefully, via a future loaded with an exception.
    
    Reviewed By: yfeldblum
    
    Differential Revision: D6006864
    
    fbshipit-source-id: e8fde57ed161b33fa1f157ce663ed85e69640c25
    d1c5974b
Future.cpp 1.48 KB