mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 14:52:16 +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,
|
static void dumpIPCMessageToFile(const UniquePtr<IPC::Message>& aMsg,
|
||||||
uint32_t aDumpCount, bool aUseNyx = false) {
|
uint32_t aDumpCount, bool aUseNyx = false) {
|
||||||
|
if (Nyx::instance().is_replay()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
std::stringstream dumpFilename;
|
std::stringstream dumpFilename;
|
||||||
std::string msgName(IPC::StringFromIPCMessageType(aMsg->type()));
|
std::string msgName(IPC::StringFromIPCMessageType(aMsg->type()));
|
||||||
std::replace(msgName.begin(), msgName.end(), ':', '_');
|
std::replace(msgName.begin(), msgName.end(), ':', '_');
|
||||||
|
@ -19,7 +19,12 @@
|
|||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
namespace fuzzing {
|
namespace fuzzing {
|
||||||
|
|
||||||
Nyx::Nyx() {}
|
Nyx::Nyx() {
|
||||||
|
char* testFilePtr = getenv("MOZ_FUZZ_TESTFILE");
|
||||||
|
if (testFilePtr) {
|
||||||
|
mReplayMode = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
Nyx& Nyx::instance() {
|
Nyx& Nyx::instance() {
|
||||||
@ -63,8 +68,6 @@ void Nyx::start(void) {
|
|||||||
// Check if we are in replay mode.
|
// Check if we are in replay mode.
|
||||||
char* testFilePtr = getenv("MOZ_FUZZ_TESTFILE");
|
char* testFilePtr = getenv("MOZ_FUZZ_TESTFILE");
|
||||||
if (testFilePtr) {
|
if (testFilePtr) {
|
||||||
mReplayMode = true;
|
|
||||||
|
|
||||||
MOZ_FUZZING_NYX_PRINT("[Replay Mode] Reading data file...\n");
|
MOZ_FUZZING_NYX_PRINT("[Replay Mode] Reading data file...\n");
|
||||||
|
|
||||||
std::string testFile(testFilePtr);
|
std::string testFile(testFilePtr);
|
||||||
|
Loading…
Reference in New Issue
Block a user