[cef][wam] Make the recipe work with official chromium release tarballs
[AGL/meta-agl-demo.git] / recipes-wam / cef / files / chromium / 0023-M118-fix-Add-missing-typename-keyword-in-multiple-st.patch
diff --git a/recipes-wam/cef/files/chromium/0023-M118-fix-Add-missing-typename-keyword-in-multiple-st.patch b/recipes-wam/cef/files/chromium/0023-M118-fix-Add-missing-typename-keyword-in-multiple-st.patch
new file mode 100644 (file)
index 0000000..ea0b2c5
--- /dev/null
@@ -0,0 +1,140 @@
+From a1077aa6d029f729143727ab8d25f85121f871a3 Mon Sep 17 00:00:00 2001
+From: Roger Zanoni <rzanoni@igalia.com>
+Date: Thu, 26 Oct 2023 07:43:26 -0300
+Subject: [PATCH 23/33] [M118-fix] Add missing 'typename' keyword in multiple
+ statements
+
+Add the typename keywork where it's needed as this causes build issues
+in clang 14.
+
+Upstream-Status: Inappropriate
+Signed-off-by: Roger Zanoni <rzanoni@igalia.com>
+---
+ .../optimization_guide/core/tflite_model_executor.h       | 8 ++++----
+ components/supervised_user/core/browser/proto_fetcher.cc  | 6 +++---
+ components/supervised_user/core/browser/proto_fetcher.h   | 4 ++--
+ ui/base/interaction/interactive_test_internal.h           | 6 +++---
+ 4 files changed, 12 insertions(+), 12 deletions(-)
+
+diff --git a/components/optimization_guide/core/tflite_model_executor.h b/components/optimization_guide/core/tflite_model_executor.h
+index 027ae8e101634..a256a85322e54 100644
+--- a/components/optimization_guide/core/tflite_model_executor.h
++++ b/components/optimization_guide/core/tflite_model_executor.h
+@@ -262,7 +262,7 @@ class TFLiteModelExecutor : public ModelExecutor<OutputType, InputType> {
+   // Starts the synchronous execution of the model. Returns model outputs.
+   // Model needs to be loaded. Synchronous calls do not load or unload model.
+   std::vector<absl::optional<OutputType>> SendForBatchExecutionSync(
+-      ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs)
++      typename ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs)
+       override {
+     DCHECK(execution_task_runner_->RunsTasksInCurrentSequence());
+     DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
+@@ -417,7 +417,7 @@ class TFLiteModelExecutor : public ModelExecutor<OutputType, InputType> {
+   // executes it on the model execution thread.
+   void LoadModelFileAndBatchExecute(
+       BatchExecutionCallback callback_on_complete,
+-      ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs) {
++      typename ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs) {
+     DCHECK(execution_task_runner_->RunsTasksInCurrentSequence());
+     DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
+@@ -434,7 +434,7 @@ class TFLiteModelExecutor : public ModelExecutor<OutputType, InputType> {
+   // Batch executes the loaded model for inputs.
+   void BatchExecuteLoadedModel(
+-      ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs,
++      typename ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs,
+       std::vector<absl::optional<OutputType>>* outputs) {
+     DCHECK(execution_task_runner_->RunsTasksInCurrentSequence());
+     DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
+@@ -494,7 +494,7 @@ class TFLiteModelExecutor : public ModelExecutor<OutputType, InputType> {
+   // Unloads the model if needed.
+   void BatchExecuteLoadedModelAndRunCallback(
+       BatchExecutionCallback callback_on_complete,
+-      ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs,
++      typename ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs,
+       ExecutionStatus execution_status) {
+     DCHECK(execution_task_runner_->RunsTasksInCurrentSequence());
+     DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
+diff --git a/components/supervised_user/core/browser/proto_fetcher.cc b/components/supervised_user/core/browser/proto_fetcher.cc
+index 9c8e7b5cb88f4..92a614d75b579 100644
+--- a/components/supervised_user/core/browser/proto_fetcher.cc
++++ b/components/supervised_user/core/browser/proto_fetcher.cc
+@@ -399,7 +399,7 @@ class RetryingFetcherImpl final : public DeferredFetcherImpl<Response> {
+   RetryingFetcherImpl(const RetryingFetcherImpl&) = delete;
+   RetryingFetcherImpl& operator=(const RetryingFetcherImpl&) = delete;
+-  void Start(ProtoFetcher<Response>::Callback callback) override {
++  void Start(typename ProtoFetcher<Response>::Callback callback) override {
+     callback_ = std::move(callback);
+     Retry();
+   }
+@@ -435,7 +435,7 @@ class RetryingFetcherImpl final : public DeferredFetcherImpl<Response> {
+   }
+   // Client callback.
+-  ProtoFetcher<Response>::Callback callback_;
++  typename ProtoFetcher<Response>::Callback callback_;
+   // Retry controls.
+   base::OneShotTimer timer_;
+@@ -578,7 +578,7 @@ ParallelFetchManager<Request, Response>::ParallelFetchManager(
+ template <typename Request, typename Response>
+ void ParallelFetchManager<Request, Response>::Fetch(
+     const Request& request,
+-    Fetcher::Callback callback) {
++    typename Fetcher::Callback callback) {
+   CHECK(callback) << "Use base::DoNothing() instead of empty callback.";
+   KeyType key = requests_in_flight_.Add(MakeFetcher(request));
+   requests_in_flight_.Lookup(key)->Start(
+diff --git a/components/supervised_user/core/browser/proto_fetcher.h b/components/supervised_user/core/browser/proto_fetcher.h
+index 8266c99d78a7a..9c41978aea68e 100644
+--- a/components/supervised_user/core/browser/proto_fetcher.h
++++ b/components/supervised_user/core/browser/proto_fetcher.h
+@@ -165,10 +165,10 @@ class ParallelFetchManager {
+   // Starts the fetch. Underlying fetcher is stored internally, and will be
+   // cleaned up after finish or when this manager is destroyed.
+-  void Fetch(const Request& request, Fetcher::Callback callback);
++  void Fetch(const Request& request, typename Fetcher::Callback callback);
+  private:
+-  using KeyType = base::IDMap<std::unique_ptr<Fetcher>>::KeyType;
++  using KeyType = typename base::IDMap<std::unique_ptr<Fetcher>>::KeyType;
+   // Remove fetcher under key from requests_in_flight_.
+   void Remove(KeyType key);
+diff --git a/ui/base/interaction/interactive_test_internal.h b/ui/base/interaction/interactive_test_internal.h
+index 080152fa265cd..a3c9b22f79487 100644
+--- a/ui/base/interaction/interactive_test_internal.h
++++ b/ui/base/interaction/interactive_test_internal.h
+@@ -108,7 +108,7 @@ class InteractiveTestPrivate {
+   // Adds `state_observer` and associates it with an element with identifier
+   // `id` and context `context`.
+-  template <typename Observer, typename V = Observer::ValueType>
++  template <typename Observer, typename V = typename Observer::ValueType>
+   void AddStateObserver(ElementIdentifier id,
+                         ElementContext context,
+                         std::unique_ptr<Observer> state_observer);
+@@ -457,7 +457,7 @@ struct ArgsExtractor<R(Args...)> {
+ };
+ template <typename F>
+-using ReturnTypeOf = MaybeBindTypeHelper<F>::ReturnType;
++using ReturnTypeOf = typename MaybeBindTypeHelper<F>::ReturnType;
+ template <size_t N, typename F>
+ using NthArgumentOf = std::tuple_element_t<
+@@ -556,7 +556,7 @@ struct MatcherTypeHelper<const char16_t[]> {
+ };
+ template <typename T>
+-using MatcherTypeFor = MatcherTypeHelper<std::remove_cvref_t<T>>::ActualType;
++using MatcherTypeFor = typename MatcherTypeHelper<std::remove_cvref_t<T>>::ActualType;
+ template <typename T>
+ class IsMatcherHelper {
+-- 
+2.42.1
+