Cleanup, no functional change.

This commit is contained in:
Rene Gollent 2013-04-19 18:35:47 -04:00
parent 3c6ba4733b
commit 3464764f7d
2 changed files with 21 additions and 18 deletions

View File

@ -182,15 +182,7 @@ DebugReportGenerator::ThreadStackTraceChanged(const ::Team::ThreadEvent& event)
void
DebugReportGenerator::MemoryBlockRetrieved(TeamMemoryBlock* block)
{
if (fCurrentBlock != NULL) {
fCurrentBlock->ReleaseReference();
fCurrentBlock = NULL;
}
fBlockRetrievalStatus = B_OK;
fCurrentBlock = block;
release_sem(fTeamDataSem);
_HandleMemoryBlockRetrieved(block, B_OK);
}
@ -198,15 +190,7 @@ void
DebugReportGenerator::MemoryBlockRetrievalFailed(TeamMemoryBlock* block,
status_t result)
{
if (fCurrentBlock != NULL) {
fCurrentBlock->ReleaseReference();
fCurrentBlock = NULL;
}
fBlockRetrievalStatus = result;
fCurrentBlock = block;
release_sem(fTeamDataSem);
_HandleMemoryBlockRetrieved(block, result);
}
@ -554,3 +538,19 @@ DebugReportGenerator::_ResolveValueIfNeeded(ValueNode* node, StackFrame* frame,
return result;
}
void
DebugReportGenerator::_HandleMemoryBlockRetrieved(TeamMemoryBlock* block,
status_t result)
{
if (fCurrentBlock != NULL) {
fCurrentBlock->ReleaseReference();
fCurrentBlock = NULL;
}
fBlockRetrievalStatus = result;
fCurrentBlock = block;
release_sem(fTeamDataSem);
}

View File

@ -74,6 +74,9 @@ private:
status_t _ResolveValueIfNeeded(ValueNode* node,
StackFrame* frame, int32 maxDepth);
void _HandleMemoryBlockRetrieved(
TeamMemoryBlock* block, status_t result);
private:
::Team* fTeam;
Architecture* fArchitecture;