mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 22:01:30 +00:00
Bug 1330533 - Remove XRE_LibFuzzerGetFuncs. r=decoder
Now that XRE_LibFuzzerGetFuncs is not used from outside libxul, it can be inlined in LibFuzzerRunner::Run, simplifying things a little more. --HG-- extra : rebase_source : 7a09f37444bf02983b232c964d85e7a866221f48
This commit is contained in:
parent
7523430127
commit
ce74ceac47
@ -5,13 +5,6 @@
|
||||
|
||||
#include "LibFuzzerRegistry.h"
|
||||
|
||||
void XRE_LibFuzzerGetFuncs(const char* moduleName, LibFuzzerInitFunc* initFunc, LibFuzzerTestingFunc* testingFunc) {
|
||||
std::string moduleNameStr(moduleName);
|
||||
mozilla::LibFuzzerFunctions funcs = mozilla::LibFuzzerRegistry::getInstance().getModuleFunctions(moduleNameStr);
|
||||
*initFunc = funcs.first;
|
||||
*testingFunc = funcs.second;
|
||||
}
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
LibFuzzerRegistry& LibFuzzerRegistry::getInstance() {
|
||||
|
@ -26,9 +26,10 @@ public:
|
||||
|
||||
int LibFuzzerRunner::Run(int* argc, char*** argv) {
|
||||
ScopedXPCOM xpcom("LibFuzzer");
|
||||
LibFuzzerInitFunc initFunc = nullptr;
|
||||
LibFuzzerTestingFunc testingFunc = nullptr;
|
||||
XRE_LibFuzzerGetFuncs(getenv("LIBFUZZER"), &initFunc, &testingFunc);
|
||||
std::string moduleNameStr(getenv("LIBFUZZER"));
|
||||
LibFuzzerFunctions funcs = LibFuzzerRegistry::getInstance().getModuleFunctions(moduleNameStr);
|
||||
LibFuzzerInitFunc initFunc = funcs.first;
|
||||
LibFuzzerTestingFunc testingFunc = funcs.second;
|
||||
if (initFunc) {
|
||||
int ret = initFunc(argc, argv);
|
||||
if (ret) {
|
||||
|
@ -517,9 +517,6 @@ XRE_API(void,
|
||||
XRE_API(void,
|
||||
XRE_LibFuzzerSetDriver, (LibFuzzerDriver))
|
||||
|
||||
XRE_API(void,
|
||||
XRE_LibFuzzerGetFuncs, (const char*, LibFuzzerInitFunc*,
|
||||
LibFuzzerTestingFunc*))
|
||||
#endif // LIBFUZZER
|
||||
|
||||
#endif // _nsXULAppAPI_h__
|
||||
|
Loading…
Reference in New Issue
Block a user