Make pdfium_fuzzer_helper use the new InitializeV8ForPDFium methods.
Change-Id: Ib41075ef84899ae03026e4ed3b59be87716d548a Reviewed-on: https://chromium-review.googlesource.com/907645 Reviewed-by: dsinclair <dsinclair@chromium.org> Reviewed-by: Bill Budge <bbudge@chromium.org> Reviewed-by: Adam Klein <adamk@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> Cr-Commit-Position: refs/heads/master@{#535840}
This commit is contained in:
pdf/pdfium/fuzzers
@ -1,3 +1,4 @@
|
||||
include_rules = [
|
||||
"+third_party/pdfium/testing/test_support.h"
|
||||
"+third_party/pdfium/testing/test_support.h",
|
||||
"+v8/include/v8-platform.h",
|
||||
]
|
||||
|
@ -33,6 +33,7 @@
|
||||
#include "third_party/pdfium/public/fpdf_dataavail.h"
|
||||
#include "third_party/pdfium/public/fpdf_text.h"
|
||||
#include "third_party/pdfium/testing/test_support.h"
|
||||
#include "v8/include/v8-platform.h"
|
||||
|
||||
namespace {
|
||||
|
||||
@ -235,10 +236,10 @@ bool PDFiumFuzzerHelper::RenderPage(FPDF_DOCUMENT doc,
|
||||
struct TestCase {
|
||||
TestCase() {
|
||||
#ifdef V8_USE_EXTERNAL_STARTUP_DATA
|
||||
InitializeV8ForPDFium(ProgramPath(), "", &natives_blob, &snapshot_blob,
|
||||
&platform);
|
||||
platform = InitializeV8ForPDFiumWithStartupData(
|
||||
ProgramPath(), "", &natives_blob, &snapshot_blob);
|
||||
#else
|
||||
InitializeV8ForPDFium(ProgramPath(), &platform);
|
||||
platform = InitializeV8ForPDFium(ProgramPath());
|
||||
#endif
|
||||
|
||||
memset(&config, '\0', sizeof(config));
|
||||
@ -254,10 +255,11 @@ struct TestCase {
|
||||
FSDK_SetUnSpObjProcessHandler(&unsupport_info);
|
||||
}
|
||||
|
||||
v8::Platform* platform;
|
||||
std::unique_ptr<v8::Platform> platform;
|
||||
v8::StartupData natives_blob;
|
||||
v8::StartupData snapshot_blob;
|
||||
FPDF_LIBRARY_CONFIG config;
|
||||
UNSUPPORT_INFO unsupport_info;
|
||||
};
|
||||
static TestCase* testCase = new TestCase();
|
||||
|
||||
static TestCase* test_case = new TestCase();
|
||||
|
Reference in New Issue
Block a user