diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-04-12 13:29:37 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-04-12 17:52:56 +0000 |
commit | 51114964fdb2a98f763318ce9affca906ed079e3 (patch) | |
tree | 0b5499f30ab34cd1f4f37b5368a766e57eca678a /testing | |
parent | 661fcc0156b78fd40937c0844034605f430b94c6 (diff) | |
download | pdfium-51114964fdb2a98f763318ce9affca906ed079e3.tar.xz |
Fold CXFA_WideTextRead into IFGAS_Stream
This Cl moves CXFA_WideTextRead to be in the anonymous namespace of
IFGAS_Stream and adds a IFGAS_Stream::CreateWideStringReadStream()
method.
This is done so we have all the implementations of IFGAS_Stream
centralized.
Change-Id: I9fbbf0a493fc2dd05fcd544e344268214a75d8a1
Reviewed-on: https://pdfium-review.googlesource.com/4052
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'testing')
-rw-r--r-- | testing/libfuzzer/pdf_cfx_saxreader_fuzzer.cc | 1 | ||||
-rw-r--r-- | testing/libfuzzer/pdf_css_fuzzer.cc | 1 | ||||
-rw-r--r-- | testing/libfuzzer/pdf_xml_fuzzer.cc | 5 |
3 files changed, 3 insertions, 4 deletions
diff --git a/testing/libfuzzer/pdf_cfx_saxreader_fuzzer.cc b/testing/libfuzzer/pdf_cfx_saxreader_fuzzer.cc index 0dfbbdf639..31e24e82f2 100644 --- a/testing/libfuzzer/pdf_cfx_saxreader_fuzzer.cc +++ b/testing/libfuzzer/pdf_cfx_saxreader_fuzzer.cc @@ -7,7 +7,6 @@ #include "core/fxcrt/cfx_retain_ptr.h" #include "core/fxcrt/xml/cfx_saxreader.h" #include "xfa/fgas/crt/ifgas_stream.h" -#include "xfa/fxfa/parser/cxfa_widetextread.h" extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { CFX_SAXReader reader; diff --git a/testing/libfuzzer/pdf_css_fuzzer.cc b/testing/libfuzzer/pdf_css_fuzzer.cc index 7566bb1ca2..9f5cdfec45 100644 --- a/testing/libfuzzer/pdf_css_fuzzer.cc +++ b/testing/libfuzzer/pdf_css_fuzzer.cc @@ -9,7 +9,6 @@ #include "xfa/fde/css/cfde_csssyntaxparser.h" #include "xfa/fde/css/fde_css.h" #include "xfa/fgas/crt/ifgas_stream.h" -#include "xfa/fxfa/parser/cxfa_widetextread.h" extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { CFX_WideString input = CFX_WideString::FromUTF8( diff --git a/testing/libfuzzer/pdf_xml_fuzzer.cc b/testing/libfuzzer/pdf_xml_fuzzer.cc index 13eda60d77..8284bc6ce7 100644 --- a/testing/libfuzzer/pdf_xml_fuzzer.cc +++ b/testing/libfuzzer/pdf_xml_fuzzer.cc @@ -13,7 +13,7 @@ #include "xfa/fde/xml/cfde_xmldoc.h" #include "xfa/fde/xml/cfde_xmlnode.h" #include "xfa/fde/xml/cfde_xmlparser.h" -#include "xfa/fxfa/parser/cxfa_widetextread.h" +#include "xfa/fgas/crt/ifgas_stream.h" namespace { @@ -53,7 +53,8 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { CFX_WideString input = CFX_WideString::FromUTF8(CFX_ByteStringC(data, safe_size.ValueOrDie())); - auto stream = pdfium::MakeRetain<CXFA_WideTextRead>(input); + CFX_RetainPtr<IFGAS_Stream> stream = + IFGAS_Stream::CreateWideStringReadStream(input); if (!stream) return 0; |