Compile on macOS 10.13.4: Use ASSERT_ABORT in destructors. Import fstream

This commit is contained in:
Dennis Schafroth 2018-04-23 11:02:13 +02:00 committed by Bhaskar Muppana
parent 56f705682f
commit a9f54e1865
6 changed files with 7 additions and 7 deletions

View File

@ -135,7 +135,7 @@ public:
~DLThreadSingleAssignmentVar() {
lock.assertNotEntered();
if(f) {
ASSERT(futureRefCount == 1);
ASSERT_ABORT(futureRefCount == 1);
api->futureDestroy(f);
}
}

View File

@ -93,7 +93,7 @@ LocationInfo::~LocationInfo() {
for( auto const& alternative : getAlternatives() )
handles.push_back( alternative.v.getVersion.getEndpoint().token ); // must match above choice of UID
std::sort( handles.begin(), handles.end() );
ASSERT( handles.size() );
ASSERT_ABORT( handles.size() );
auto it = cx->ssid_locationInfo.find( handles );
if( it != cx->ssid_locationInfo.end() )
@ -540,7 +540,7 @@ DatabaseContext::~DatabaseContext() {
monitorMasterProxiesInfoChange.cancel();
for(auto it = ssid_locationInfo.begin(); it != ssid_locationInfo.end(); it = ssid_locationInfo.erase(it))
it->second->notifyContextDestroyed();
ASSERT( ssid_locationInfo.empty() );
ASSERT_ABORT( ssid_locationInfo.empty() );
locationCache.insert( allKeys, Reference<LocationInfo>() );
}

View File

@ -233,7 +233,7 @@ Future<Void> AsyncFileCached::quiesce() {
AsyncFileCached::~AsyncFileCached() {
while ( !pages.empty() ) {
auto ok = pages.begin()->second->evict();
ASSERT( ok );
ASSERT_ABORT( ok );
}
openFiles.erase( filename );
}

View File

@ -450,7 +450,7 @@ struct AFCPage : public EvictablePage, public FastAllocated<AFCPage> {
virtual ~AFCPage() {
clearDirty();
ASSERT( flushableIndex == -1 );
ASSERT_ABORT( flushableIndex == -1 );
}
void setDirty() {

View File

@ -425,7 +425,7 @@ struct LogData : NonCopyable, public ReferenceCounted<LogData> {
tLogData->bytesDurable += bytesInput.getValue() - bytesDurable.getValue();
TraceEvent("TLogBytesWhenRemoved", tli.id()).detail("sharedBytesInput", tLogData->bytesInput).detail("sharedBytesDurable", tLogData->bytesDurable).detail("localBytesInput", bytesInput.getValue()).detail("localBytesDurable", bytesDurable.getValue());
ASSERT(tLogData->bytesDurable <= tLogData->bytesInput);
ASSERT_ABORT(tLogData->bytesDurable <= tLogData->bytesInput);
endRole(tli.id(), "TLog", "Error", true);
if(!tLogData->terminated) {

View File

@ -460,7 +460,7 @@ static int asyncDeviceCharacteristics(sqlite3_file *pFile){ return 0; }
//resulting in a locking error
auto itr = SharedMemoryInfo::table.find(filename);
if(itr != SharedMemoryInfo::table.end()) {
ASSERT(itr->second.refcount == 0);
ASSERT_ABORT(itr->second.refcount == 0);
itr->second.cleanup();
}
}