folly/wangle -> wangle cutover
[folly.git] / folly / Singleton.cpp
index bfd63e57ceb99b7c8c4d8039cf1016325c63f40e..a9ca67f6d2d2f676c643b7a1f68bfd4724357692 100644 (file)
@@ -45,7 +45,12 @@ struct FatalHelper {
   std::vector<detail::TypeDescriptor> leakedSingletons_;
 };
 
+#ifdef __APPLE__
+// OS X doesn't support constructor priorities.
+FatalHelper fatalHelper;
+#else
 FatalHelper __attribute__ ((__init_priority__ (101))) fatalHelper;
+#endif
 
 }
 
@@ -97,7 +102,7 @@ void SingletonVault::reenableInstances() {
 }
 
 void SingletonVault::scheduleDestroyInstances() {
-  RequestContext::getStaticContext();
+  RequestContext::saveContext();
 
   class SingletonVaultDestructor {
    public: