chromium/third_party/pdfium/testing/fuzzers/pdf_fuzzer_init_public.cc

// Copyright 2019 The PDFium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "testing/fuzzers/pdf_fuzzer_init_public.h"

#include <string.h>  // For memset()

#include <string>

#include "testing/fuzzers/pdfium_fuzzer_util.h"

#ifdef PDF_ENABLE_V8
#include "testing/free_deleter.h"
#include "testing/v8_initializer.h"
#include "v8/include/v8-platform.h"
#ifdef PDF_ENABLE_XFA
#include "testing/fuzzers/xfa_process_state.h"
#include "v8/include/v8-array-buffer.h"
#include "v8/include/v8-isolate.h"
#endif  // PDF_ENABLE_XFA
#endif  // PDF_ENABLE_V8

#ifdef _WIN32
#include <windows.h>
#elif defined(__APPLE__)
#include <mach-o/dyld.h>
#else  // Linux
#include <linux/limits.h>
#include <unistd.h>
#endif  // _WIN32

namespace {

// pdf_fuzzer_init.cc and pdf_fuzzer_init_public.cc are mutually exclusive
// and should not be built together. Static initializers and destructors
// avoid problems with fuzzer initialization and termination.
PDFFuzzerInitPublic g_instance;

#ifdef PDF_ENABLE_V8
std::string ProgramPath() {}
#endif  // PDF_ENABLE_V8

}  // namespace

PDFFuzzerInitPublic::PDFFuzzerInitPublic() {}

PDFFuzzerInitPublic::~PDFFuzzerInitPublic() {}