зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
7523430127
Коммит
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__
|
||||
|
|
Загрузка…
Ссылка в новой задаче