From 8fe37c454512853c40108c2c0d19c2d39d15af19 Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Wed, 25 Sep 2024 09:55:25 +0000 Subject: automatic import of chromium --- chromium-125-lp155-typename.patch | 376 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 376 insertions(+) create mode 100644 chromium-125-lp155-typename.patch (limited to 'chromium-125-lp155-typename.patch') diff --git a/chromium-125-lp155-typename.patch b/chromium-125-lp155-typename.patch new file mode 100644 index 0000000..9c10a00 --- /dev/null +++ b/chromium-125-lp155-typename.patch @@ -0,0 +1,376 @@ + +fixed error: missing 'typename' prior to dependent type name + +Index: chromium-123.0.6312.46/base/containers/map_util.h +=================================================================== +--- chromium-123.0.6312.46.orig/base/containers/map_util.h ++++ chromium-123.0.6312.46/base/containers/map_util.h +@@ -42,7 +42,7 @@ constexpr internal::MappedType* Fin + template >::element_type> ++ typename std::pointer_traits>::element_type> + constexpr const MappedElementType* FindPtrOrNull(const Map& map, + const Key& key) { + auto it = map.find(key); +@@ -60,7 +60,7 @@ + template >::element_type> ++ typename std::pointer_traits>::element_type> + constexpr MappedElementType* FindPtrOrNull(Map& map, const Key& key) { + auto it = map.find(key); + return it != map.end() ? base::to_address(it->second) : nullptr; +Index: chromium-123.0.6312.46/base/functional/bind_internal.h +=================================================================== +--- chromium-123.0.6312.46.orig/base/functional/bind_internal.h ++++ chromium-123.0.6312.46/base/functional/bind_internal.h +@@ -1497,11 +1497,11 @@ template + struct ParamCanBeBound { + private: +- using UnwrappedParam = BindArgument::template ForwardedAs< ++ using UnwrappedParam = typename BindArgument::template ForwardedAs< + Unwrapped>::template ToParamWithType; +- using ParamStorage = BindArgument::template ToParamWithType< ++ using ParamStorage = typename BindArgument::template ToParamWithType< + Param>::template StoredAs; +- using BoundStorage = ++ using BoundStorage = typename + BindArgument::template BoundAs::template StoredAs; + + template +-SortedItems::const_iterator GetLastIter(const SortedItems& cache) { ++typename SortedItems::const_iterator GetLastIter(const SortedItems& cache) { + CHECK(!cache.empty()); + auto it = cache.end(); + return std::prev(it); +@@ -1090,9 +1090,9 @@ bool DownloadBubbleUpdateService::CacheM + } + + template +-SortedItems::iterator ++typename SortedItems::iterator + DownloadBubbleUpdateService::CacheManager::RemoveItemFromCacheByIter( +- SortedItems::iterator iter, ++ typename SortedItems::iterator iter, + SortedItems& cache, + IterMap& iter_map) { + CHECK(iter != cache.end()); +Index: chromium-123.0.6312.46/components/optimization_guide/core/model_execution/model_execution_util.h +=================================================================== +--- chromium-123.0.6312.46.orig/components/optimization_guide/core/model_execution/model_execution_util.h ++++ chromium-123.0.6312.46/components/optimization_guide/core/model_execution/model_execution_util.h +@@ -25,7 +25,7 @@ void SetExecutionRequestTemplate( + + // Request is set by the feature and should always be typed. + auto typed_request = +- static_cast(request_metadata); ++ static_cast(request_metadata); + *(logging_data->mutable_request_data()) = typed_request; + } + +Index: chromium-123.0.6312.46/components/optimization_guide/core/model_quality/model_quality_log_entry.h +=================================================================== +--- chromium-123.0.6312.46.orig/components/optimization_guide/core/model_quality/model_quality_log_entry.h ++++ chromium-123.0.6312.46/components/optimization_guide/core/model_quality/model_quality_log_entry.h +@@ -29,7 +29,7 @@ class ModelQualityLogEntry { + } + + template +- FeatureType::Quality* quality_data() { ++ typename FeatureType::Quality* quality_data() { + return FeatureType::GetLoggingData(*log_ai_data_request_) + ->mutable_quality_data(); + } +Index: chromium-123.0.6312.46/components/optimization_guide/core/tflite_model_executor.h +=================================================================== +--- chromium-123.0.6312.46.orig/components/optimization_guide/core/tflite_model_executor.h ++++ chromium-123.0.6312.46/components/optimization_guide/core/tflite_model_executor.h +@@ -242,7 +242,7 @@ class TFLiteModelExecutor : public Model + void SendForBatchExecution( + BatchExecutionCallback callback_on_complete, + base::TimeTicks start_time, +- ModelExecutor::ConstRefInputVector inputs) ++ typename ModelExecutor::ConstRefInputVector inputs) + override { + DCHECK(execution_task_runner_->RunsTasksInCurrentSequence()); + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); +@@ -264,7 +264,7 @@ class TFLiteModelExecutor : public Model + // 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> SendForBatchExecutionSync( +- ModelExecutor::ConstRefInputVector inputs) ++ typename ModelExecutor::ConstRefInputVector inputs) + override { + DCHECK(execution_task_runner_->RunsTasksInCurrentSequence()); + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); +@@ -422,7 +422,7 @@ class TFLiteModelExecutor : public Model + // executes it on the model execution thread. + void LoadModelFileAndBatchExecute( + BatchExecutionCallback callback_on_complete, +- ModelExecutor::ConstRefInputVector inputs) { ++ typename ModelExecutor::ConstRefInputVector inputs) { + DCHECK(execution_task_runner_->RunsTasksInCurrentSequence()); + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + +@@ -439,7 +439,7 @@ class TFLiteModelExecutor : public Model + + // Batch executes the loaded model for inputs. + void BatchExecuteLoadedModel( +- ModelExecutor::ConstRefInputVector inputs, ++ typename ModelExecutor::ConstRefInputVector inputs, + std::vector>* outputs) { + DCHECK(execution_task_runner_->RunsTasksInCurrentSequence()); + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); +@@ -499,7 +499,7 @@ class TFLiteModelExecutor : public Model + // Unloads the model if needed. + void BatchExecuteLoadedModelAndRunCallback( + BatchExecutionCallback callback_on_complete, +- ModelExecutor::ConstRefInputVector inputs, ++ typename ModelExecutor::ConstRefInputVector inputs, + ExecutionStatus execution_status) { + DCHECK(execution_task_runner_->RunsTasksInCurrentSequence()); + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); +Index: chromium-123.0.6312.46/mojo/public/cpp/bindings/array_traits.h +=================================================================== +--- chromium-123.0.6312.46.orig/mojo/public/cpp/bindings/array_traits.h ++++ chromium-123.0.6312.46/mojo/public/cpp/bindings/array_traits.h +@@ -90,7 +90,7 @@ template + { c[i] } -> std::same_as; + } + struct ArrayTraits { +- using Element = Container::value_type; ++ using Element = typename Container::value_type; + + // vector-like containers have no built-in null. + static bool IsNull(const Container& c) { return false; } +Index: chromium-123.0.6312.46/third_party/blink/renderer/bindings/core/v8/async_iterable.h +=================================================================== +--- chromium-123.0.6312.46.orig/third_party/blink/renderer/bindings/core/v8/async_iterable.h ++++ chromium-123.0.6312.46/third_party/blink/renderer/bindings/core/v8/async_iterable.h +@@ -245,7 +245,7 @@ + private: + virtual IterationSource* CreateIterationSource( + ScriptState* script_state, +- IterationSource::Kind kind, ++ typename IterationSource::Kind kind, + InitArgs... args, + ExceptionState& exception_state) = 0; + }; +@@ -291,7 +291,7 @@ + private: + virtual IterationSource* CreateIterationSource( + ScriptState* script_state, +- IterationSource::Kind kind, ++ typename IterationSource::Kind kind, + InitArgs... args, + ExceptionState& exception_state) = 0; + }; +Index: chromium-123.0.6312.46/third_party/blink/renderer/core/html/parser/html_document_parser_fastpath.cc +=================================================================== +--- chromium-123.0.6312.46.orig/third_party/blink/renderer/core/html/parser/html_document_parser_fastpath.cc ++++ chromium-123.0.6312.46/third_party/blink/renderer/core/html/parser/html_document_parser_fastpath.cc +@@ -210,7 +210,7 @@ class HTMLFastPathParser { + using Span = base::span; + using USpan = base::span; + // 32 matches that used by HTMLToken::Attribute. +- typedef std::conditional, ++ typedef typename std::conditional, + UCharLiteralBuffer<32>, + LCharLiteralBuffer<32>>::type LiteralBufferType; + static_assert(std::is_same_v || std::is_same_v); +Index: chromium-123.0.6312.46/base/functional/function_ref.h +=================================================================== +--- chromium-123.0.6312.46.orig/base/functional/function_ref.h ++++ chromium-123.0.6312.46/base/functional/function_ref.h +@@ -64,7 +64,7 @@ class FunctionRef; + template + class FunctionRef { + template ::RunType> ++ typename RunType = typename internal::FunctorTraits::RunType> + static constexpr bool kCompatibleFunctor = + std::convertible_to, R> && + std::same_as, internal::TypeList>; +Index: chromium-123.0.6312.46/base/containers/heap_array.h +=================================================================== +--- chromium-123.0.6312.46.orig/base/containers/heap_array.h ++++ chromium-123.0.6312.46/base/containers/heap_array.h +@@ -32,8 +32,8 @@ + static_assert(!std::is_reference_v, + "HeapArray cannot hold reference types"); + +- using iterator = base::span::iterator; +- using const_iterator = base::span::iterator; ++ using iterator = typename base::span::iterator; ++ using const_iterator = typename base::span::iterator; + // We don't put this default value in the template parameter list to allow the + // static_assert on is_reference_v to give a nicer error message. + using deleter_type = std:: +Index: chromium-123.0.6312.46/mojo/public/cpp/bindings/type_converter.h +=================================================================== +--- chromium-123.0.6312.46.orig/mojo/public/cpp/bindings/type_converter.h ++++ chromium-123.0.6312.46/mojo/public/cpp/bindings/type_converter.h +@@ -127,7 +127,7 @@ using VecValueType = typename Vec::value + + template + using VecPtrLikeUnderlyingValueType = +- std::pointer_traits>::element_type; ++ typename std::pointer_traits>::element_type; + + } // namespace internal + +Index: chromium-123.0.6312.46/third_party/blink/renderer/platform/wtf/hash_table.h +=================================================================== +--- chromium-123.0.6312.46.orig/third_party/blink/renderer/platform/wtf/hash_table.h ++++ chromium-123.0.6312.46/third_party/blink/renderer/platform/wtf/hash_table.h +@@ -2004,7 +2004,7 @@ struct HashTableConstIteratorAdapter { + static_assert(!IsTraceable::value); + + using iterator_category = std::bidirectional_iterator_tag; +- using value_type = HashTableType::ValueType; ++ using value_type = typename HashTableType::ValueType; + using difference_type = ptrdiff_t; + using pointer = value_type*; + using reference = value_type&; +@@ -2056,7 +2056,7 @@ struct HashTableConstIteratorAdapter< + + public: + using iterator_category = std::bidirectional_iterator_tag; +- using value_type = HashTableType::ValueType; ++ using value_type = typename HashTableType::ValueType; + using difference_type = ptrdiff_t; + using pointer = value_type*; + using reference = value_type&; +@@ -2110,7 +2110,7 @@ struct HashTableIteratorAdapter { + static_assert(!IsTraceable::value); + + using iterator_category = std::bidirectional_iterator_tag; +- using value_type = HashTableType::ValueType; ++ using value_type = typename HashTableType::ValueType; + using difference_type = ptrdiff_t; + using pointer = value_type*; + using reference = value_type&; +@@ -2158,7 +2158,7 @@ struct HashTableIteratorAdapter< + + public: + using iterator_category = std::bidirectional_iterator_tag; +- using value_type = HashTableType::ValueType; ++ using value_type = typename HashTableType::ValueType; + using difference_type = ptrdiff_t; + using pointer = value_type*; + using reference = value_type&; +Index: chromium-123.0.6312.46/base/types/fixed_array.h +=================================================================== +--- chromium-123.0.6312.46.orig/base/types/fixed_array.h ++++ chromium-123.0.6312.46/base/types/fixed_array.h +@@ -27,8 +27,8 @@ template { + public: + using absl::FixedArray::FixedArray; +- explicit FixedArray(absl::FixedArray::size_type n, +- const absl::FixedArray::allocator_type& a = ++ explicit FixedArray(typename absl::FixedArray::size_type n, ++ const typename absl::FixedArray::allocator_type& a = + typename absl::FixedArray::allocator_type()) + : FixedArray(n, T(), a) {} + }; +Index: chromium-123.0.6312.46/chrome/browser/web_applications/commands/internal/command_internal.h +=================================================================== +--- chromium-123.0.6312.46.orig/chrome/browser/web_applications/commands/internal/command_internal.h ++++ chromium-123.0.6312.46/chrome/browser/web_applications/commands/internal/command_internal.h +@@ -121,7 +121,7 @@ class CommandBase { + template + class CommandWithLock : public CommandBase { + public: +- using LockDescription = LockType::LockDescription; ++ using LockDescription = typename LockType::LockDescription; + explicit CommandWithLock(const std::string& name, + LockDescription initial_lock_request); + +Index: chromium-123.0.6312.46/chrome/browser/web_applications/commands/web_app_command.h +=================================================================== +--- chromium-123.0.6312.46.orig/chrome/browser/web_applications/commands/web_app_command.h ++++ chromium-123.0.6312.46/chrome/browser/web_applications/commands/web_app_command.h +@@ -106,7 +106,7 @@ class WebAppLockManager; + template + class WebAppCommand : public internal::CommandWithLock { + public: +- using LockDescription = LockType::LockDescription; ++ using LockDescription = typename LockType::LockDescription; + using CallbackType = base::OnceCallback; + using ShutdownArgumentsTuple = std::tuple...>; + +Index: chromium-123.0.6312.46/chrome/browser/web_applications/web_app_command_scheduler.h +=================================================================== +--- chromium-123.0.6312.46.orig/chrome/browser/web_applications/web_app_command_scheduler.h ++++ chromium-123.0.6312.46/chrome/browser/web_applications/web_app_command_scheduler.h +@@ -363,7 +363,7 @@ class WebAppCommandScheduler { + // command system. + template + void ScheduleCallback(const std::string& operation_name, +- LockType::LockDescription lock_description, ++ typename LockType::LockDescription lock_description, + CallbackCommand callback, + base::OnceClosure on_complete, + const base::Location& location = FROM_HERE) { +@@ -381,7 +381,7 @@ class WebAppCommandScheduler { + typename CallbackReturnValue = std::decay_t> + void ScheduleCallbackWithResult( + const std::string& operation_name, +- LockType::LockDescription lock_description, ++ typename LockType::LockDescription lock_description, + CallbackCommand callback, + base::OnceCallback on_complete, + CallbackReturnValue arg_for_shutdown, +Index: chromium-123.0.6312.46/components/supervised_user/core/browser/proto_fetcher.h +=================================================================== +--- chromium-123.0.6312.46.orig/components/supervised_user/core/browser/proto_fetcher.h ++++ chromium-123.0.6312.46/components/supervised_user/core/browser/proto_fetcher.h +@@ -424,7 +424,7 @@ class RetryingFetcherImpl final : public + RetryingFetcherImpl(const RetryingFetcherImpl&) = delete; + RetryingFetcherImpl& operator=(const RetryingFetcherImpl&) = delete; + +- void Start(ProtoFetcher::Callback callback) override { ++ void Start(typename ProtoFetcher::Callback callback) override { + callback_ = std::move(callback); + Retry(); + } +@@ -469,7 +469,7 @@ class RetryingFetcherImpl final : public + } + + // Client callback. +- TypedProtoFetcher::Callback callback_; ++ typename TypedProtoFetcher::Callback callback_; + + // Retry controls. + base::OneShotTimer timer_; +@@ -490,7 +490,7 @@ class ParallelFetchManager { + // Deferred fetcher is required because it should be started after it is + // stored internally. + using Fetcher = ProtoFetcher; +- using KeyType = base::IDMap>::KeyType; ++ using KeyType = typename base::IDMap>::KeyType; + + public: + // Provides fresh instances of a deferred fetcher for each fetch. +@@ -506,7 +506,7 @@ 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) { + CHECK(callback) << "Use base::DoNothing() instead of empty callback."; + KeyType key = requests_in_flight_.Add(MakeFetcher(request)); + requests_in_flight_.Lookup(key)->Start( -- cgit v1.2.3