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

Unified Diff: third_party/WebKit/Source/platform/testing/FuzzedDataProvider.cpp

Issue 2308443002: Make FuzzedDataProvider vend std::strings (Closed)
Patch Set: thestig review Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/websockets/websocket_frame_parser_fuzzer.cc ('k') | third_party/sfntly/fuzzers/subset_font_fuzzer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/testing/FuzzedDataProvider.cpp
diff --git a/third_party/WebKit/Source/platform/testing/FuzzedDataProvider.cpp b/third_party/WebKit/Source/platform/testing/FuzzedDataProvider.cpp
index 1231a615278d0d52962e2e02b781200035cc32ce..2f32abb1b21f9a7cecc17bdf1921ea19323b6549 100644
--- a/third_party/WebKit/Source/platform/testing/FuzzedDataProvider.cpp
+++ b/third_party/WebKit/Source/platform/testing/FuzzedDataProvider.cpp
@@ -13,13 +13,13 @@ CString FuzzedDataProvider::ConsumeBytesInRange(uint32_t minBytes,
uint32_t maxBytes) {
size_t numBytes =
static_cast<size_t>(m_provider.ConsumeUint32InRange(minBytes, maxBytes));
- base::StringPiece bytes = m_provider.ConsumeBytes(numBytes);
- return CString(bytes.data(), bytes.length());
+ std::string bytes = m_provider.ConsumeBytes(numBytes);
+ return CString(bytes.data(), bytes.size());
}
CString FuzzedDataProvider::ConsumeRemainingBytes() {
- base::StringPiece bytes = m_provider.ConsumeRemainingBytes();
- return CString(bytes.data(), bytes.length());
+ std::string bytes = m_provider.ConsumeRemainingBytes();
+ return CString(bytes.data(), bytes.size());
}
bool FuzzedDataProvider::ConsumeBool() {
« no previous file with comments | « net/websockets/websocket_frame_parser_fuzzer.cc ('k') | third_party/sfntly/fuzzers/subset_font_fuzzer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698