mirror of
https://github.com/chromium/crashpad.git
synced 2025-03-09 14:06:33 +00:00
Remove unnecessary lines in CaptureMemoryDelegate
Change-Id: I172c5bf9f399791a9bfecd26553450a2ed30315b Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3342502 Reviewed-by: Mark Mentovai <mark@chromium.org> Commit-Queue: Joshua Peraza <jperaza@chromium.org>
This commit is contained in:
parent
ff50a9e8c4
commit
b03c11533c
@ -62,14 +62,12 @@ void CaptureMemoryDelegateLinux::AddNewMemorySnapshot(
|
||||
snapshots_->push_back(std::make_unique<internal::MemorySnapshotGeneric>());
|
||||
internal::MemorySnapshotGeneric* snapshot = snapshots_->back().get();
|
||||
snapshot->Initialize(process_reader_->Memory(), range.base(), range.size());
|
||||
if (budget_remaining_) {
|
||||
if (!base::IsValueInRangeForNumericType<int64_t>(range.size())) {
|
||||
*budget_remaining_ = 0;
|
||||
} else {
|
||||
int64_t temp = *budget_remaining_;
|
||||
temp -= range.size();
|
||||
*budget_remaining_ = base::saturated_cast<uint32_t>(temp);
|
||||
}
|
||||
if (!base::IsValueInRangeForNumericType<int64_t>(range.size())) {
|
||||
*budget_remaining_ = 0;
|
||||
} else {
|
||||
int64_t temp = *budget_remaining_;
|
||||
temp -= range.size();
|
||||
*budget_remaining_ = base::saturated_cast<uint32_t>(temp);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -60,14 +60,12 @@ void CaptureMemoryDelegateWin::AddNewMemorySnapshot(
|
||||
snapshots_->push_back(std::make_unique<internal::MemorySnapshotGeneric>());
|
||||
internal::MemorySnapshotGeneric* snapshot = snapshots_->back().get();
|
||||
snapshot->Initialize(process_reader_->Memory(), range.base(), range.size());
|
||||
if (budget_remaining_) {
|
||||
if (!base::IsValueInRangeForNumericType<int64_t>(range.size())) {
|
||||
*budget_remaining_ = 0;
|
||||
} else {
|
||||
int64_t temp = *budget_remaining_;
|
||||
temp -= range.size();
|
||||
*budget_remaining_ = base::saturated_cast<uint32_t>(temp);
|
||||
}
|
||||
if (!base::IsValueInRangeForNumericType<int64_t>(range.size())) {
|
||||
*budget_remaining_ = 0;
|
||||
} else {
|
||||
int64_t temp = *budget_remaining_;
|
||||
temp -= range.size();
|
||||
*budget_remaining_ = base::saturated_cast<uint32_t>(temp);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user