summaryrefslogtreecommitdiffstats
path: root/chromium/base/bind_internal.h
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2017-09-18 14:34:04 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2017-10-04 11:15:27 +0000
commite6430e577f105ad8813c92e75c54660c4985026e (patch)
tree88115e5d1fb471fea807111924dcccbeadbf9e4f /chromium/base/bind_internal.h
parent53d399fe6415a96ea6986ec0d402a9c07da72453 (diff)
BASELINE: Update Chromium to 61.0.3163.99
Change-Id: I8452f34574d88ca2b27af9bd56fc9ff3f16b1367 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'chromium/base/bind_internal.h')
-rw-r--r--chromium/base/bind_internal.h20
1 files changed, 6 insertions, 14 deletions
diff --git a/chromium/base/bind_internal.h b/chromium/base/bind_internal.h
index c8af87d5806..5aab7f408a4 100644
--- a/chromium/base/bind_internal.h
+++ b/chromium/base/bind_internal.h
@@ -206,12 +206,7 @@ struct FunctorTraits<R (Receiver::*)(Args...)> {
static R Invoke(R (Receiver::*method)(Args...),
ReceiverPtr&& receiver_ptr,
RunArgs&&... args) {
- // Clang skips CV qualifier check on a method pointer invocation when the
- // receiver is a subclass. Store the receiver into a const reference to
- // T to ensure the CV check works.
- // https://llvm.org/bugs/show_bug.cgi?id=27037
- Receiver& receiver = *receiver_ptr;
- return (receiver.*method)(std::forward<RunArgs>(args)...);
+ return ((*receiver_ptr).*method)(std::forward<RunArgs>(args)...);
}
};
@@ -226,12 +221,7 @@ struct FunctorTraits<R (Receiver::*)(Args...) const> {
static R Invoke(R (Receiver::*method)(Args...) const,
ReceiverPtr&& receiver_ptr,
RunArgs&&... args) {
- // Clang skips CV qualifier check on a method pointer invocation when the
- // receiver is a subclass. Store the receiver into a const reference to
- // T to ensure the CV check works.
- // https://llvm.org/bugs/show_bug.cgi?id=27037
- const Receiver& receiver = *receiver_ptr;
- return (receiver.*method)(std::forward<RunArgs>(args)...);
+ return ((*receiver_ptr).*method)(std::forward<RunArgs>(args)...);
}
};
@@ -492,7 +482,8 @@ struct MakeBindStateTypeImpl;
template <typename Functor, typename... BoundArgs>
struct MakeBindStateTypeImpl<false, Functor, BoundArgs...> {
- static_assert(!HasRefCountedTypeAsRawPtr<BoundArgs...>::value,
+ static_assert(!HasRefCountedTypeAsRawPtr<
+ typename std::decay<BoundArgs>::type...>::value,
"A parameter is a refcounted type and needs scoped_refptr.");
using Type = BindState<typename std::decay<Functor>::type,
typename std::decay<BoundArgs>::type...>;
@@ -508,7 +499,8 @@ struct MakeBindStateTypeImpl<true, Functor, Receiver, BoundArgs...> {
static_assert(
!std::is_array<typename std::remove_reference<Receiver>::type>::value,
"First bound argument to a method cannot be an array.");
- static_assert(!HasRefCountedTypeAsRawPtr<BoundArgs...>::value,
+ static_assert(!HasRefCountedTypeAsRawPtr<
+ typename std::decay<BoundArgs>::type...>::value,
"A parameter is a refcounted type and needs scoped_refptr.");
private: