summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Hartmann <sultan@gentoo.org>2021-02-18 23:07:29 +0100
committerStephan Hartmann <sultan@gentoo.org>2021-02-18 23:07:46 +0100
commitdb2726edc645a51beae5aeafed19c8ec46f456c2 (patch)
tree7a6ae208ea16690da9aeb8517ab041b6d7b34a81 /www-client/chromium/files
parentdev-libs/kdiagram: Stabilize 2.8.0 amd64, #770307 (diff)
downloadgentoo-db2726edc645a51beae5aeafed19c8ec46f456c2.tar.gz
gentoo-db2726edc645a51beae5aeafed19c8ec46f456c2.tar.bz2
gentoo-db2726edc645a51beae5aeafed19c8ec46f456c2.zip
www-client/chromium: beta channel bump to 89.0.4389.58
Bug: https://bugs.gentoo.org/770214 Package-Manager: Portage-3.0.13, Repoman-3.0.2 Signed-off-by: Stephan Hartmann <sultan@gentoo.org>
Diffstat (limited to 'www-client/chromium/files')
-rw-r--r--www-client/chromium/files/chromium-89-empty-map-crash.patch39
1 files changed, 39 insertions, 0 deletions
diff --git a/www-client/chromium/files/chromium-89-empty-map-crash.patch b/www-client/chromium/files/chromium-89-empty-map-crash.patch
new file mode 100644
index 000000000000..9c00b83f4afd
--- /dev/null
+++ b/www-client/chromium/files/chromium-89-empty-map-crash.patch
@@ -0,0 +1,39 @@
+From 9e0bf3bb5954cc8848e33d6806a67e75199e7ceb Mon Sep 17 00:00:00 2001
+From: Stephan Hartmann <stha09@googlemail.com>
+Date: Tue, 16 Feb 2021 19:51:38 +0000
+Subject: [PATCH] fix crash if smooth_thread_history_ is empty
+
+https://crrev.com/11ce5ea added smooth_thread_history_, but does
+not handle an empty std::map correctly. Decrementing iterator
+returned by lower_bound() only works, if the map is non-empty.
+
+Bug: 1169818
+Change-Id: If75c3d4c7412e77b3ae6c3e68fa3e3821dc75764
+Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2692534
+Reviewed-by: Behdad Bakhshinategh <behdadb@chromium.org>
+Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
+Commit-Queue: Behdad Bakhshinategh <behdadb@chromium.org>
+Cr-Commit-Position: refs/heads/master@{#854397}
+---
+
+diff --git a/cc/metrics/compositor_frame_reporting_controller.cc b/cc/metrics/compositor_frame_reporting_controller.cc
+index 6713366..dec573d1 100644
+--- a/cc/metrics/compositor_frame_reporting_controller.cc
++++ b/cc/metrics/compositor_frame_reporting_controller.cc
+@@ -440,10 +440,12 @@
+ }
+
+ // keep the history for the last 3 seconds.
+- auto expired_smooth_thread = smooth_thread_history_.lower_bound(
+- Now() - base::TimeDelta::FromSeconds(3))--;
+- smooth_thread_history_.erase(smooth_thread_history_.begin(),
+- expired_smooth_thread);
++ if (!smooth_thread_history_.empty()) {
++ auto expired_smooth_thread = smooth_thread_history_.lower_bound(
++ Now() - base::TimeDelta::FromSeconds(3))--;
++ smooth_thread_history_.erase(smooth_thread_history_.begin(),
++ expired_smooth_thread);
++ }
+
+ // Only trackes the history if there is a change in smooth_thread_
+ if (current_smooth_thread != GetSmoothThread()) {