~chromium-team/chromium-browser/artful-beta

« back to all changes in this revision

Viewing changes to debian/patches/workaround-gcc-bug-7-2.patch

  • Committer: Olivier Tilloy
  • Date: 2018-07-05 21:53:02 UTC
  • Revision ID: olivier.tilloy@canonical.com-20180705215302-h92hec69yp93pxsi
* debian/patches/add-missing-string-include.patch: added
* debian/patches/workaround-gcc-bug-7-2.patch: added

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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>
 
4
 
 
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
 
8
 
 
9
   scheduler_->AddJobController(controller.get());
 
10
 
 
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();
 
17
 }
 
18
 
 
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);
 
24
     } else {
 
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);
 
31
     }
 
32
   }