summaryrefslogtreecommitdiffstats
path: root/ipc
diff options
context:
space:
mode:
authorthakis <thakis@chromium.org>2016-03-10 07:14:10 -0800
committerCommit bot <commit-bot@chromium.org>2016-03-10 15:15:32 +0000
commitfe36ec4d077c3a89979854bf37328dd41bb24ca6 (patch)
tree592f6df802ec1e5f13beab2e9d6c2bf444dce1ef /ipc
parent1ae6a023e6165754ab7d9e8f5a9ed11c4e42eac8 (diff)
downloadchromium_src-fe36ec4d077c3a89979854bf37328dd41bb24ca6.zip
chromium_src-fe36ec4d077c3a89979854bf37328dd41bb24ca6.tar.gz
chromium_src-fe36ec4d077c3a89979854bf37328dd41bb24ca6.tar.bz2
Revert of Clang plugin to check that unstable types are not used in IPC. (patchset #22 id:420001 of https://codereview.chromium.org/1665363002/ )
Reason for revert: IPC plugin tests are failing on the clang/tot win bots, even after the fix attempt. Original issue's description: > Clang plugin to check that unstable types are not used in IPC. > > We want IPC messages to be stable so that 32-bit and 64-bit processes > can talk to each other. This plugin blacklists the following types that > are known to be unstable: > > 1. Types: long / unsigned long (but not typedefs to) > 2. Typedefs: intmax_t, uintmax_t, intptr_t, uintptr_t, wint_t, > size_t, rsize_t, ssize_t, ptrdiff_t, dev_t, off_t, clock_t, > time_t, suseconds_t (including typedefs to) > > Blacklisted types are not allowed in IPC::WriteParam() invocations or > IPC::CheckedTuple<> specializations. > > BUG=581409 > CQ_INCLUDE_TRYBOTS=tryserver.chromium.win:win_optional_gpu_tests_rel > > Committed: https://crrev.com/a817c371a7a33cdf9282b711dafbdcee83b788e4 > Cr-Commit-Position: refs/heads/master@{#380151} TBR=dcheng@chromium.org,jam@chromium.org,vmpstr@chromium.org,hans@chromium.org,dskiba@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=581409 Review URL: https://codereview.chromium.org/1783803002 Cr-Commit-Position: refs/heads/master@{#380408}
Diffstat (limited to 'ipc')
-rw-r--r--ipc/ipc_message_macros.h2
-rw-r--r--ipc/ipc_message_utils.h14
2 files changed, 1 insertions, 15 deletions
diff --git a/ipc/ipc_message_macros.h b/ipc/ipc_message_macros.h
index 38f428e..ea28d0c 100644
--- a/ipc/ipc_message_macros.h
+++ b/ipc/ipc_message_macros.h
@@ -249,7 +249,7 @@
#define IPC_SYNC_MESSAGE_ROUTED(msg_class, in, out) \
IPC_MESSAGE_DECL(msg_class, ROUTED, IPC_TUPLE in, IPC_TUPLE out)
-#define IPC_TUPLE(...) IPC::CheckedTuple<__VA_ARGS__>::Tuple
+#define IPC_TUPLE(...) std::tuple<__VA_ARGS__>
#define IPC_MESSAGE_DECL(msg_name, kind, in_tuple, out_tuple) \
struct IPC_MESSAGE_EXPORT msg_name##_Meta { \
diff --git a/ipc/ipc_message_utils.h b/ipc/ipc_message_utils.h
index 9369f02..d92d833 100644
--- a/ipc/ipc_message_utils.h
+++ b/ipc/ipc_message_utils.h
@@ -76,26 +76,12 @@ struct IPC_EXPORT LogData {
struct NoParams {
};
-// Specializations are checked by 'IPC checker' part of find-bad-constructs
-// Clang plugin (see WriteParam() below for the details).
-template <typename... Ts>
-struct CheckedTuple {
- typedef std::tuple<Ts...> Tuple;
-};
-
template <class P>
static inline void GetParamSize(base::PickleSizer* sizer, const P& p) {
typedef typename SimilarTypeTraits<P>::Type Type;
ParamTraits<Type>::GetSize(sizer, static_cast<const Type&>(p));
}
-// This function is checked by 'IPC checker' part of find-bad-constructs
-// Clang plugin to make it's not called on the following types:
-// 1. long / unsigned long (but not typedefs to)
-// 2. intmax_t, uintmax_t, intptr_t, uintptr_t, wint_t,
-// size_t, rsize_t, ssize_t, ptrdiff_t, dev_t, off_t, clock_t,
-// time_t, suseconds_t (including typedefs to)
-// 3. Any template referencing types above (e.g. std::vector<size_t>)
template <class P>
static inline void WriteParam(base::Pickle* m, const P& p) {
typedef typename SimilarTypeTraits<P>::Type Type;