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

Side by Side Diff: pdf/pdfium/fuzzers/pdfium_fuzzer_helper.h

Issue 2941413002: PDF: Consistently pass FPDF handles by value. (Closed)
Patch Set: Created 3 years, 6 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 | « no previous file | pdf/pdfium/fuzzers/pdfium_fuzzer_helper.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 // This fuzzer is simplified & cleaned up pdfium/samples/pdfium_test.cc 5 // This fuzzer is simplified & cleaned up pdfium/samples/pdfium_test.cc
6 6
7 #include "third_party/pdfium/public/fpdf_ext.h" 7 #include "third_party/pdfium/public/fpdf_ext.h"
8 #include "third_party/pdfium/public/fpdf_formfill.h" 8 #include "third_party/pdfium/public/fpdf_formfill.h"
9 #include "third_party/pdfium/public/fpdfview.h" 9 #include "third_party/pdfium/public/fpdfview.h"
10 #include "v8/include/v8.h" 10 #include "v8/include/v8.h"
11 11
12 class PDFiumFuzzerHelper { 12 class PDFiumFuzzerHelper {
13 public: 13 public:
14 virtual ~PDFiumFuzzerHelper(); 14 virtual ~PDFiumFuzzerHelper();
15 15
16 void RenderPdf(const char* pBuf, size_t len); 16 void RenderPdf(const char* pBuf, size_t len);
17 17
18 virtual int GetFormCallbackVersion() const = 0; 18 virtual int GetFormCallbackVersion() const = 0;
19 virtual bool OnFormFillEnvLoaded(FPDF_DOCUMENT doc); 19 virtual bool OnFormFillEnvLoaded(FPDF_DOCUMENT doc);
20 20
21 protected: 21 protected:
22 PDFiumFuzzerHelper(); 22 PDFiumFuzzerHelper();
23 23
24 private: 24 private:
25 bool RenderPage(const FPDF_DOCUMENT& doc, 25 bool RenderPage(FPDF_DOCUMENT doc,
26 const FPDF_FORMHANDLE& form, 26 FPDF_FORMHANDLE form,
27 const int page_index); 27 const int page_index);
28 }; 28 };
OLDNEW
« no previous file with comments | « no previous file | pdf/pdfium/fuzzers/pdfium_fuzzer_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698