void-packages/srcpkgs/chromium/patches/chromium-88-CompositorFrameReporter-dcheck.patch
Peter Bui fcdbc44cf3 chromium: update to 88.0.4324.96.
- Built for x86_64, x86_64-musl, i686.
- Tested on x86_64.

- Add API deprecation warning message.
2021-01-27 13:06:54 +01:00

36 lines
1.5 KiB
Diff
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

From 56c654a91600e3bf254aa9f66c1151b0850b6ee4 Mon Sep 17 00:00:00 2001
From: Jose Dapena Paz <jdapena@igalia.com>
Date: Wed, 11 Nov 2020 10:24:47 +0100
Subject: [PATCH] GCC: do not pass unique_ptr to DCHECK_NE, but the actual pointer, in CompositorFrameReporter
DCHECK_NE comparison requires CheckOpValueStr to be defined for the
type, or providing an output stream operator. A unique_ptr does not
provide any.
Compilation in GCC is failing in CompositorFrameReporter because of
this:
../../cc/metrics/compositor_frame_reporter.cc: In member function void cc::CompositorFrameReporter::ReportEventLatencyHistograms() const:
../../base/check_op.h:224:59: error: no matching function for call to CheckOpValueStr(const std::unique_ptr<cc::EventMetrics>&)
Fixed comparing the result of get() method for unique_ptr instead of
the unique_ptr.
Bug: 819294
Change-Id: I11103d1867c7196c1de92e72f9f12dcfd31c29f1
(updated to use DCHECK as suggested in comments)
---
diff --git a/cc/metrics/compositor_frame_reporter.cc b/cc/metrics/compositor_frame_reporter.cc
index 725beb0..fafd0f3 100644
--- cc/metrics/compositor_frame_reporter.cc
+++ cc/metrics/compositor_frame_reporter.cc
@@ -686,7 +686,7 @@
void CompositorFrameReporter::ReportEventLatencyHistograms() const {
for (const auto& event_metrics : events_metrics_) {
- DCHECK_NE(event_metrics, nullptr);
+ DCHECK(event_metrics);
const std::string histogram_base_name =
GetEventLatencyHistogramBaseName(*event_metrics);
const int event_type_index = static_cast<int>(event_metrics->type());