Skip to content

Commit

Permalink
[aw] Always record memory metric
Browse files Browse the repository at this point in the history
Memory metrics need to be recorded even when the functor has been
reclaimed, otherwise counts are diverging between the "reclaim functor"
and the control paths.

Not changing the metric name since it can be filtered otherwise, and
this metric is primarily intended to evaluate a field trial.

(cherry picked from commit 4e47c13)

Bug: 1424346
Change-Id: I9a6a0e0dd3509c687a47e52cce36cf65f090ca85
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4645290
Reviewed-by: Bo Liu <boliu@chromium.org>
Commit-Queue: Benoit Lize <lizeb@chromium.org>
Cr-Original-Commit-Position: refs/heads/main@{#1162383}
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4652519
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/branch-heads/5845@{#218}
Cr-Branched-From: 5a5dff6-refs/heads/main@{#1160321}
  • Loading branch information
Benoit Lize authored and Chromium LUCI CQ committed Jun 29, 2023
1 parent 0874b1b commit e3984a8
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3405,10 +3405,8 @@ private void afterWindowHiddenTask() {
return;
}

// Nothing to do.
if (mDrawFunctor == null) return;

if (AwFeatureMap.isEnabled(AwFeatures.WEBVIEW_CLEAR_FUNCTOR_IN_BACKGROUND)) {
if (AwFeatureMap.isEnabled(AwFeatures.WEBVIEW_CLEAR_FUNCTOR_IN_BACKGROUND)
&& mDrawFunctor != null) {
// Clear the functor. This causes native-side resources to be freed. The functor
// will be re-created at the next draw.
setFunctor(null);
Expand Down

0 comments on commit e3984a8

Please sign in to comment.