mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Update to Chromium version 111.0.5563.0 (#1097615)
This commit is contained in:
22
patch/patches/win_power_monitor_4219163.patch
Normal file
22
patch/patches/win_power_monitor_4219163.patch
Normal file
@ -0,0 +1,22 @@
|
||||
diff --git base/power_monitor/battery_level_provider_win.cc base/power_monitor/battery_level_provider_win.cc
|
||||
index 1e9f88154adc7..3c3a4ee7cd511 100644
|
||||
--- base/power_monitor/battery_level_provider_win.cc
|
||||
+++ base/power_monitor/battery_level_provider_win.cc
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
#include "base/memory/weak_ptr.h"
|
||||
#include "base/metrics/histogram_macros.h"
|
||||
+#include "base/numerics/safe_conversions.h"
|
||||
#include "base/task/sequenced_task_runner.h"
|
||||
#include "base/task/task_traits.h"
|
||||
#include "base/task/thread_pool.h"
|
||||
@@ -134,7 +135,8 @@ absl::optional<uint32_t> GetBatteryBatteryDischargeGranularity(
|
||||
if (!success)
|
||||
return absl::nullopt;
|
||||
|
||||
- size_t nb_elements = bytes_returned / sizeof(BATTERY_REPORTING_SCALE);
|
||||
+ ptrdiff_t nb_elements = base::checked_cast<ptrdiff_t>(
|
||||
+ bytes_returned / sizeof(BATTERY_REPORTING_SCALE));
|
||||
if (!nb_elements)
|
||||
return absl::nullopt;
|
||||
|
Reference in New Issue
Block a user