mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 21:01:08 +00:00
Bug 1866421 - Make Nyx::is_replay work before snapshot point. r=truber
Differential Revision: https://phabricator.services.mozilla.com/D194643
This commit is contained in:
parent
01f1337180
commit
7504f01021
@ -1088,6 +1088,10 @@ void IPCFuzzController::SynchronizeOnMessageExecution(
|
||||
|
||||
static void dumpIPCMessageToFile(const UniquePtr<IPC::Message>& aMsg,
|
||||
uint32_t aDumpCount, bool aUseNyx = false) {
|
||||
if (Nyx::instance().is_replay()) {
|
||||
return;
|
||||
}
|
||||
|
||||
std::stringstream dumpFilename;
|
||||
std::string msgName(IPC::StringFromIPCMessageType(aMsg->type()));
|
||||
std::replace(msgName.begin(), msgName.end(), ':', '_');
|
||||
|
@ -19,7 +19,12 @@
|
||||
namespace mozilla {
|
||||
namespace fuzzing {
|
||||
|
||||
Nyx::Nyx() {}
|
||||
Nyx::Nyx() {
|
||||
char* testFilePtr = getenv("MOZ_FUZZ_TESTFILE");
|
||||
if (testFilePtr) {
|
||||
mReplayMode = true;
|
||||
}
|
||||
}
|
||||
|
||||
// static
|
||||
Nyx& Nyx::instance() {
|
||||
@ -63,8 +68,6 @@ void Nyx::start(void) {
|
||||
// Check if we are in replay mode.
|
||||
char* testFilePtr = getenv("MOZ_FUZZ_TESTFILE");
|
||||
if (testFilePtr) {
|
||||
mReplayMode = true;
|
||||
|
||||
MOZ_FUZZING_NYX_PRINT("[Replay Mode] Reading data file...\n");
|
||||
|
||||
std::string testFile(testFilePtr);
|
||||
|
Loading…
Reference in New Issue
Block a user