1
Description: GCC: workaround GCC bug "std::map::insert(value_type &&) not selected"
2
Origin: https://chromium.googlesource.com/chromium/src/+/823d20044c74ff8524954b2f3b01a51f390567b0
3
Author: Jose Dapena Paz <jose.dapena@lge.com>
5
--- a/content/browser/background_fetch/background_fetch_context.cc
6
+++ b/content/browser/background_fetch/background_fetch_context.cc
7
@@ -218,7 +218,10 @@ void BackgroundFetchContext::InitializeC
9
scheduler_->AddJobController(controller.get());
11
- job_controllers_.insert({unique_id, std::move(controller)});
12
+ // Workaround for GLIBC C++ < 7.3 that fails to insert with braces
13
+ // See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82522
14
+ auto pair = std::make_pair(unique_id, std::move(controller));
15
+ job_controllers_.insert(std::move(pair));
16
std::move(done_closure).Run();
19
--- a/content/renderer/input/input_event_prediction.cc
20
+++ b/content/renderer/input/input_event_prediction.cc
21
@@ -119,7 +119,10 @@ void InputEventPrediction::UpdateSingleP
22
if (predictor != pointer_id_predictor_map_.end()) {
23
predictor->second->Update(data);
25
- pointer_id_predictor_map_.insert({event.id, SetUpPredictor()});
26
+ // Workaround for GLIBC C++ < 7.3 that fails to insert with braces
27
+ // See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82522
28
+ auto pair = std::make_pair(event.id, SetUpPredictor());
29
+ pointer_id_predictor_map_.insert(std::move(pair));
30
pointer_id_predictor_map_[event.id]->Update(data);