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 void
DebugReportGenerator::MemoryBlockRetrieved(TeamMemoryBlock* block) DebugReportGenerator::MemoryBlockRetrieved(TeamMemoryBlock* block)
{ {
if (fCurrentBlock != NULL) { _HandleMemoryBlockRetrieved(block, B_OK);
fCurrentBlock->ReleaseReference();
fCurrentBlock = NULL;
}
fBlockRetrievalStatus = B_OK;
fCurrentBlock = block;
release_sem(fTeamDataSem);
} }
@ -198,15 +190,7 @@ void
DebugReportGenerator::MemoryBlockRetrievalFailed(TeamMemoryBlock* block, DebugReportGenerator::MemoryBlockRetrievalFailed(TeamMemoryBlock* block,
status_t result) status_t result)
{ {
if (fCurrentBlock != NULL) { _HandleMemoryBlockRetrieved(block, result);
fCurrentBlock->ReleaseReference();
fCurrentBlock = NULL;
}
fBlockRetrievalStatus = result;
fCurrentBlock = block;
release_sem(fTeamDataSem);
} }
@ -554,3 +538,19 @@ DebugReportGenerator::_ResolveValueIfNeeded(ValueNode* node, StackFrame* frame,
return result; 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, status_t _ResolveValueIfNeeded(ValueNode* node,
StackFrame* frame, int32 maxDepth); StackFrame* frame, int32 maxDepth);
void _HandleMemoryBlockRetrieved(
TeamMemoryBlock* block, status_t result);
private: private:
::Team* fTeam; ::Team* fTeam;
Architecture* fArchitecture; Architecture* fArchitecture;