Add context to zone text failures.

This commit is contained in:
Bartosz Taudul 2021-10-10 14:14:33 +02:00
parent 930ef77ea9
commit d3905bd4bb
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3
2 changed files with 4 additions and 3 deletions

View File

@ -4838,10 +4838,11 @@ void Worker::ZoneDoubleEndFailure( uint64_t thread, const ZoneEvent* ev )
m_failureData.srcloc = ev ? ev->SrcLoc() : 0;
}
void Worker::ZoneTextFailure( uint64_t thread )
void Worker::ZoneTextFailure( uint64_t thread, const char* text )
{
m_failure = Failure::ZoneText;
m_failureData.thread = thread;
m_failureData.message = text;
}
void Worker::ZoneValueFailure( uint64_t thread, uint64_t value )
@ -5054,7 +5055,7 @@ void Worker::ProcessZoneText()
auto td = RetrieveThread( m_threadCtx );
if( !td || td->stack.empty() || td->nextZoneId != td->zoneIdStack.back() )
{
ZoneTextFailure( m_threadCtx );
ZoneTextFailure( m_threadCtx, m_pendingSingleString.ptr );
return;
}

View File

@ -715,7 +715,7 @@ private:
void ZoneStackFailure( uint64_t thread, const ZoneEvent* ev );
void ZoneDoubleEndFailure( uint64_t thread, const ZoneEvent* ev );
void ZoneTextFailure( uint64_t thread );
void ZoneTextFailure( uint64_t thread, const char* text );
void ZoneValueFailure( uint64_t thread, uint64_t value );
void ZoneColorFailure( uint64_t thread );
void ZoneNameFailure( uint64_t thread );