Bug 1322735 - Remove OBSERVE_LATE_WRITES define. r=glandium
OBSERVE_LATE_WRITES is now always defined, we can just remove it.
MozReview-Commit-ID: El6RnzZnXBN
--- a/xpcom/build/LateWriteChecks.cpp
+++ b/xpcom/build/LateWriteChecks.cpp
@@ -30,18 +30,16 @@
#include <sys/stat.h>
#include <windows.h>
#else
#define NS_SLASH "/"
#endif
#include "LateWriteChecks.h"
-#define OBSERVE_LATE_WRITES
-
using namespace mozilla;
/*************************** Auxiliary Declarations ***************************/
// This a wrapper over a file descriptor that provides a Printf method and
// computes the sha1 of the data that passes through it.
class SHA1Stream
{
@@ -107,17 +105,16 @@ public:
void Observe(IOInterposeObserver::Observation& aObservation);
private:
char* mProfileDirectory;
};
void
LateWriteObserver::Observe(IOInterposeObserver::Observation& aOb)
{
-#ifdef OBSERVE_LATE_WRITES
// Crash if that is the shutdown check mode
if (gShutdownChecks == SCM_CRASH) {
MOZ_CRASH();
}
// If we have shutdown mode SCM_NOTHING or we can't record then abort
if (gShutdownChecks == SCM_NOTHING || !Telemetry::CanRecordExtended()) {
return;
@@ -202,17 +199,16 @@ LateWriteObserver::Observe(IOInterposeOb
// client side deduplication.
nsPrintfCString finalName("%s%s", mProfileDirectory,
"/Telemetry.LateWriteFinal-");
for (int i = 0; i < 20; ++i) {
finalName.AppendPrintf("%02x", sha1[i]);
}
PR_Delete(finalName.get());
PR_Rename(name, finalName.get());
-#endif
}
/******************************* Setup/Teardown *******************************/
static StaticAutoPtr<LateWriteObserver> sLateWriteObserver;
namespace mozilla {