Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(96)

Side by Side Diff: tools/ipc_fuzzer/fuzzer/fuzzer.cc

Issue 2147873003: cc: Dedup IPCs to return resources to client (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « services/ui/public/cpp/lib/output_surface.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 <iostream> 5 #include <iostream>
6 #include <set> 6 #include <set>
7 #include <string> 7 #include <string>
8 #include <tuple> 8 #include <tuple>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 685 matching lines...) Expand 10 before | Expand all | Expand 10 after
696 return true; 696 return true;
697 } 697 }
698 default: 698 default:
699 // Fuzz nothing to handle the no frame case. 699 // Fuzz nothing to handle the no frame case.
700 return true; 700 return true;
701 } 701 }
702 } 702 }
703 }; 703 };
704 704
705 template <> 705 template <>
706 struct FuzzTraits<cc::CompositorFrameAck> {
707 static bool Fuzz(cc::CompositorFrameAck* p, Fuzzer* fuzzer) {
708 return FuzzParam(&p->resources, fuzzer);
709 }
710 };
711
712 template <>
713 struct FuzzTraits<cc::DelegatedFrameData> { 706 struct FuzzTraits<cc::DelegatedFrameData> {
714 static bool Fuzz(cc::DelegatedFrameData* p, Fuzzer* fuzzer) { 707 static bool Fuzz(cc::DelegatedFrameData* p, Fuzzer* fuzzer) {
715 if (!FuzzParam(&p->resource_list, fuzzer)) 708 if (!FuzzParam(&p->resource_list, fuzzer))
716 return false; 709 return false;
717 if (!FuzzParam(&p->render_pass_list, fuzzer)) 710 if (!FuzzParam(&p->render_pass_list, fuzzer))
718 return false; 711 return false;
719 return true; 712 return true;
720 } 713 }
721 }; 714 };
722 715
(...skipping 1309 matching lines...) Expand 10 before | Expand all | Expand 10 after
2032 #include "tools/ipc_fuzzer/message_lib/all_message_null_macros.h" 2025 #include "tools/ipc_fuzzer/message_lib/all_message_null_macros.h"
2033 #undef IPC_MESSAGE_DECL 2026 #undef IPC_MESSAGE_DECL
2034 #define IPC_MESSAGE_DECL(name, ...) \ 2027 #define IPC_MESSAGE_DECL(name, ...) \
2035 (*map)[static_cast<uint32_t>(name::ID)] = FuzzerHelper<name>::Fuzz; 2028 (*map)[static_cast<uint32_t>(name::ID)] = FuzzerHelper<name>::Fuzz;
2036 2029
2037 void PopulateFuzzerFunctionMap(FuzzerFunctionMap* map) { 2030 void PopulateFuzzerFunctionMap(FuzzerFunctionMap* map) {
2038 #include "tools/ipc_fuzzer/message_lib/all_messages.h" 2031 #include "tools/ipc_fuzzer/message_lib/all_messages.h"
2039 } 2032 }
2040 2033
2041 } // namespace ipc_fuzzer 2034 } // namespace ipc_fuzzer
OLDNEW
« no previous file with comments | « services/ui/public/cpp/lib/output_surface.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698