From c30a6232df03e1efbd9f3b226777b07e087a1122 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Mon, 12 Oct 2020 14:27:29 +0200 Subject: BASELINE: Update Chromium to 85.0.4183.140 Change-Id: Iaa42f4680837c57725b1344f108c0196741f6057 Reviewed-by: Allan Sandfeld Jensen --- chromium/base/threading/sequence_bound.h | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) (limited to 'chromium/base/threading/sequence_bound.h') diff --git a/chromium/base/threading/sequence_bound.h b/chromium/base/threading/sequence_bound.h index b235fe221c3..3ee8ef6e4c9 100644 --- a/chromium/base/threading/sequence_bound.h +++ b/chromium/base/threading/sequence_bound.h @@ -94,26 +94,6 @@ namespace base { // SequenceBound(main_task_runner, ctor args); // auto c = new SomeConsumer(std::move(widget)); // upcasts to MyClass -namespace internal { - -// If we can't cast |Base*| into |Derived*|, then it's a virtual base if and -// only if |Base| is actually a base class of |Derived|. Otherwise (including -// unrelated types), it isn't. We default to Derived* so that the -// specialization below will apply when the cast to |Derived*| is valid. -template -struct is_virtual_base_of : public std::is_base_of {}; - -// If we can cast |Base*| into |Derived*|, then it's definitely not a virtual -// base. When this happens, we'll match the default third template argument. -template -struct is_virtual_base_of( - static_cast(nullptr)))> : std::false_type { -}; - -} // namespace internal - template class SequenceBound { public: @@ -134,7 +114,9 @@ class SequenceBound { Args&&... args) : impl_task_runner_(std::move(task_runner)) { // Allocate space for but do not construct an instance of |T|. - storage_ = AlignedAlloc(sizeof(T), alignof(T)); + // AlignedAlloc() requires alignment be a multiple of sizeof(void*). + storage_ = AlignedAlloc( + sizeof(T), sizeof(void*) > alignof(T) ? sizeof(void*) : alignof(T)); t_ = reinterpret_cast(storage_); // Post construction to the impl thread. -- cgit v1.2.1