summaryrefslogtreecommitdiff
path: root/testing
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-03-29 16:58:29 -0700
committerCommit bot <commit-bot@chromium.org>2016-03-29 16:58:29 -0700
commitae95f763dfb5e4fab3a9ff026b2f844c202625d7 (patch)
tree6bde00f193474c50c3eed00e55591cab8a7e29a1 /testing
parent05d53f0355e9889c43bfa436e985d5643f249d99 (diff)
downloadpdfium-ae95f763dfb5e4fab3a9ff026b2f844c202625d7.tar.xz
Remove IFDE_XML* classes.
The CFDE_XML* classes did not inhert from the IFDE_XML variants but we casted to them anyway. This CL removes the IFDE_XML* variants and we just use the CPDF_XML* classes directly. BUG=pdfium:357 Review URL: https://codereview.chromium.org/1836353002
Diffstat (limited to 'testing')
-rw-r--r--testing/libfuzzer/pdf_xml_fuzzer.cc27
1 files changed, 11 insertions, 16 deletions
diff --git a/testing/libfuzzer/pdf_xml_fuzzer.cc b/testing/libfuzzer/pdf_xml_fuzzer.cc
index 592bf0f066..998e2ec650 100644
--- a/testing/libfuzzer/pdf_xml_fuzzer.cc
+++ b/testing/libfuzzer/pdf_xml_fuzzer.cc
@@ -14,22 +14,22 @@
namespace {
-IFDE_XMLNode* XFA_FDEExtension_GetDocumentNode(
- IFDE_XMLDoc* pXMLDoc,
+CFDE_XMLNode* XFA_FDEExtension_GetDocumentNode(
+ CFDE_XMLDoc* pXMLDoc,
FX_BOOL bVerifyWellFormness = FALSE) {
if (!pXMLDoc) {
return nullptr;
}
- IFDE_XMLNode* pXMLFakeRoot = pXMLDoc->GetRoot();
- for (IFDE_XMLNode* pXMLNode =
- pXMLFakeRoot->GetNodeItem(IFDE_XMLNode::FirstChild);
- pXMLNode; pXMLNode = pXMLNode->GetNodeItem(IFDE_XMLNode::NextSibling)) {
+ CFDE_XMLNode* pXMLFakeRoot = pXMLDoc->GetRoot();
+ for (CFDE_XMLNode* pXMLNode =
+ pXMLFakeRoot->GetNodeItem(CFDE_XMLNode::FirstChild);
+ pXMLNode; pXMLNode = pXMLNode->GetNodeItem(CFDE_XMLNode::NextSibling)) {
if (pXMLNode->GetType() == FDE_XMLNODE_Element) {
if (bVerifyWellFormness) {
- for (IFDE_XMLNode* pNextNode =
- pXMLNode->GetNodeItem(IFDE_XMLNode::NextSibling);
+ for (CFDE_XMLNode* pNextNode =
+ pXMLNode->GetNodeItem(CFDE_XMLNode::NextSibling);
pNextNode;
- pNextNode = pNextNode->GetNodeItem(IFDE_XMLNode::NextSibling)) {
+ pNextNode = pNextNode->GetNodeItem(CFDE_XMLNode::NextSibling)) {
if (pNextNode->GetType() == FDE_XMLNODE_Element) {
return FALSE;
}
@@ -54,14 +54,9 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
if (!stream)
return 0;
- std::unique_ptr<IFDE_XMLDoc> doc(IFDE_XMLDoc::Create());
- if (!doc)
- return 0;
-
- std::unique_ptr<IFDE_XMLParser, ReleaseDeleter<IFDE_XMLParser>> parser(
+ std::unique_ptr<CFDE_XMLDoc> doc(new CFDE_XMLDoc);
+ std::unique_ptr<CFDE_XMLParser, ReleaseDeleter<CFDE_XMLParser>> parser(
new CXFA_XMLParser(doc->GetRoot(), stream.get()));
- if (!parser)
- return 0;
if (!doc->LoadXML(parser.release()))
return 0;