Bug 1530773 - Add log module and macro for fuzzing. r=froydnj

Differential Revision: https://phabricator.services.mozilla.com/D21251

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Christian Holler 2019-02-26 21:10:02 +00:00
parent c7022eb656
commit c15caba3f0
3 changed files with 26 additions and 0 deletions

View File

@ -0,0 +1,16 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/*
* Common code for the unified fuzzing interface
*/
#include "FuzzingInterface.h"
namespace mozilla {
LazyLogModule gFuzzingLog("nsFuzzing");
} // namespace mozilla

View File

@ -14,9 +14,15 @@
#include "FuzzerRegistry.h"
#include "mozilla/Assertions.h"
#include "mozilla/Logging.h"
namespace mozilla {
extern LazyLogModule gFuzzingLog;
#define FUZZING_LOG(args) \
MOZ_LOG(mozilla::gFuzzingLog, mozilla::LogLevel::Verbose, args)
typedef int (*FuzzingTestFuncRaw)(const uint8_t*, size_t);
#ifdef __AFL_COMPILER

View File

@ -10,6 +10,10 @@ EXPORTS += [
'FuzzingInterface.h',
]
SOURCES += [
'FuzzingInterface.cpp',
]
if CONFIG['JS_STANDALONE']:
FINAL_LIBRARY = "js"
else: