Commit 6592dd48 authored by Jenny Wong's avatar Jenny Wong Committed by Commit Bot

Avoid crash in ~MultiSourceMemoryPressureMonitor().

Bug: 1008161
Change-Id: Ib8daa0315d3c22c810848d4f696961e7ba005d82
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1824127Reviewed-by: default avatarSébastien Marchand <sebmarchand@chromium.org>
Commit-Queue: Jenny Wong <jyw@google.com>
Cr-Commit-Position: refs/heads/master@{#700311}
parent 1e559554
...@@ -25,7 +25,14 @@ MultiSourceMemoryPressureMonitor::MultiSourceMemoryPressureMonitor() ...@@ -25,7 +25,14 @@ MultiSourceMemoryPressureMonitor::MultiSourceMemoryPressureMonitor()
StartMetricsTimer(); StartMetricsTimer();
} }
MultiSourceMemoryPressureMonitor::~MultiSourceMemoryPressureMonitor() = default; MultiSourceMemoryPressureMonitor::~MultiSourceMemoryPressureMonitor() {
// Destroy system evaluator early while the remaining members of this class
// still exist. MultiSourceMemoryPressureMonitor implements
// MemoryPressureVoteAggregator::Delegate, and
// delegate_->OnMemoryPressureLevelChanged() gets indirectly called during
// ~SystemMemoryPressureEvaluator().
system_evaluator_.reset();
}
void MultiSourceMemoryPressureMonitor::StartMetricsTimer() { void MultiSourceMemoryPressureMonitor::StartMetricsTimer() {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment