| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <algorithm> | 5 #include <algorithm> |
| 6 #include <ostream> | 6 #include <ostream> |
| 7 #include <set> | 7 #include <set> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 503 memcpy(dst->payload(), src->payload(), sizeof(int)); | 503 memcpy(dst->payload(), src->payload(), sizeof(int)); |
| 504 } | 504 } |
| 505 }; | 505 }; |
| 506 | 506 |
| 507 // Redefine macros to generate fuzzing from traits declarations. | 507 // Redefine macros to generate fuzzing from traits declarations. |
| 508 // Null out all the macros that need nulling. | 508 // Null out all the macros that need nulling. |
| 509 #include "ipc/ipc_message_null_macros.h" | 509 #include "ipc/ipc_message_null_macros.h" |
| 510 | 510 |
| 511 // STRUCT declarations cause corresponding STRUCT_TRAITS declarations to occur. | 511 // STRUCT declarations cause corresponding STRUCT_TRAITS declarations to occur. |
| 512 #undef IPC_STRUCT_BEGIN | 512 #undef IPC_STRUCT_BEGIN |
| 513 #undef IPC_STRUCT_BEGIN_WITH_PARENT |
| 513 #undef IPC_STRUCT_MEMBER | 514 #undef IPC_STRUCT_MEMBER |
| 514 #undef IPC_STRUCT_END | 515 #undef IPC_STRUCT_END |
| 516 #define IPC_STRUCT_BEGIN_WITH_PARENT(struct_name, parent)\ |
| 517 IPC_STRUCT_BEGIN(struct_name) |
| 515 #define IPC_STRUCT_BEGIN(struct_name) IPC_STRUCT_TRAITS_BEGIN(struct_name) | 518 #define IPC_STRUCT_BEGIN(struct_name) IPC_STRUCT_TRAITS_BEGIN(struct_name) |
| 516 #define IPC_STRUCT_MEMBER(type, name) IPC_STRUCT_TRAITS_MEMBER(name) | 519 #define IPC_STRUCT_MEMBER(type, name) IPC_STRUCT_TRAITS_MEMBER(name) |
| 517 #define IPC_STRUCT_END() IPC_STRUCT_TRAITS_END() | 520 #define IPC_STRUCT_END() IPC_STRUCT_TRAITS_END() |
| 518 | 521 |
| 519 // Set up so next include will generate fuzz trait classes. | 522 // Set up so next include will generate fuzz trait classes. |
| 520 #undef IPC_STRUCT_TRAITS_BEGIN | 523 #undef IPC_STRUCT_TRAITS_BEGIN |
| 521 #undef IPC_STRUCT_TRAITS_MEMBER | 524 #undef IPC_STRUCT_TRAITS_MEMBER |
| 522 #undef IPC_STRUCT_TRAITS_PARENT | 525 #undef IPC_STRUCT_TRAITS_PARENT |
| 523 #undef IPC_STRUCT_TRAITS_END | 526 #undef IPC_STRUCT_TRAITS_END |
| 524 #define IPC_STRUCT_TRAITS_BEGIN(struct_name) \ | 527 #define IPC_STRUCT_TRAITS_BEGIN(struct_name) \ |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 677 | 680 |
| 678 // Entry point avoiding mangled names. | 681 // Entry point avoiding mangled names. |
| 679 extern "C" { | 682 extern "C" { |
| 680 __attribute__((visibility("default"))) | 683 __attribute__((visibility("default"))) |
| 681 IPC::ChannelProxy::OutgoingMessageFilter* GetFilter(void); | 684 IPC::ChannelProxy::OutgoingMessageFilter* GetFilter(void); |
| 682 } | 685 } |
| 683 | 686 |
| 684 IPC::ChannelProxy::OutgoingMessageFilter* GetFilter(void) { | 687 IPC::ChannelProxy::OutgoingMessageFilter* GetFilter(void) { |
| 685 return &g_ipcfuzz; | 688 return &g_ipcfuzz; |
| 686 } | 689 } |
| OLD | NEW |