зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 24af6caa9bba (bug 1219482) to hopefully fix the intermittent hazard failures CLOSED TREE
--HG-- extra : commitid : ETz5wi5nzdH
This commit is contained in:
Родитель
02bbb8ab49
Коммит
e060c6dced
|
@ -72,7 +72,7 @@ using safe_browsing::ClientDownloadRequest_SignatureInfo;
|
|||
#define PREF_DOWNLOAD_ALLOW_TABLE "urlclassifier.downloadAllowTable"
|
||||
|
||||
// NSPR_LOG_MODULES=ApplicationReputation:5
|
||||
mozilla::LazyLogModule ApplicationReputationService::prlog("ApplicationReputation");
|
||||
PRLogModuleInfo *ApplicationReputationService::prlog = nullptr;
|
||||
#define LOG(args) MOZ_LOG(ApplicationReputationService::prlog, mozilla::LogLevel::Debug, args)
|
||||
#define LOG_ENABLED() MOZ_LOG_TEST(ApplicationReputationService::prlog, mozilla::LogLevel::Debug)
|
||||
|
||||
|
@ -1142,6 +1142,9 @@ ApplicationReputationService::GetSingleton()
|
|||
|
||||
ApplicationReputationService::ApplicationReputationService()
|
||||
{
|
||||
if (!prlog) {
|
||||
prlog = PR_NewLogModule("ApplicationReputation");
|
||||
}
|
||||
LOG(("Application reputation service started up"));
|
||||
}
|
||||
|
||||
|
|
|
@ -14,11 +14,11 @@
|
|||
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsString.h"
|
||||
#include "mozilla/Logging.h"
|
||||
|
||||
class nsIRequest;
|
||||
class PendingDBLookup;
|
||||
class PendingLookup;
|
||||
struct PRLogModuleInfo;
|
||||
|
||||
class ApplicationReputationService final :
|
||||
public nsIApplicationReputationService {
|
||||
|
@ -39,7 +39,7 @@ private:
|
|||
/**
|
||||
* NSPR_LOG_MODULES=ApplicationReputation:5
|
||||
*/
|
||||
static mozilla::LazyLogModule prlog;
|
||||
static PRLogModuleInfo* prlog;
|
||||
/**
|
||||
* This is a singleton, so disallow construction.
|
||||
*/
|
||||
|
|
|
@ -132,8 +132,16 @@ private:
|
|||
nsString mChangedResource;
|
||||
};
|
||||
|
||||
static mozilla::LazyLogModule gNativeWatcherPRLog("NativeFileWatcherService");
|
||||
#define FILEWATCHERLOG(...) MOZ_LOG(gNativeWatcherPRLog, mozilla::LogLevel::Debug, (__VA_ARGS__))
|
||||
static PRLogModuleInfo* GetFileWatcherContextLog()
|
||||
{
|
||||
static PRLogModuleInfo *gNativeWatcherPRLog;
|
||||
if (!gNativeWatcherPRLog) {
|
||||
gNativeWatcherPRLog = PR_NewLogModule("NativeFileWatcherService");
|
||||
}
|
||||
return gNativeWatcherPRLog;
|
||||
}
|
||||
|
||||
#define FILEWATCHERLOG(...) MOZ_LOG(GetFileWatcherContextLog(), mozilla::LogLevel::Debug, (__VA_ARGS__))
|
||||
|
||||
// The number of notifications to store within WatchedResourceDescriptor:mNotificationBuffer.
|
||||
// If the buffer overflows, its contents are discarded and a change callback is dispatched
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#include "mozilla/Logging.h"
|
||||
|
||||
// NSPR_LOG_MODULES=UrlClassifierDbService:5
|
||||
extern mozilla::LazyLogModule gUrlClassifierDbServiceLog;
|
||||
extern PRLogModuleInfo *gUrlClassifierDbServiceLog;
|
||||
#define LOG(args) MOZ_LOG(gUrlClassifierDbServiceLog, mozilla::LogLevel::Debug, args)
|
||||
#define LOG_ENABLED() MOZ_LOG_TEST(gUrlClassifierDbServiceLog, mozilla::LogLevel::Debug)
|
||||
|
||||
|
|
|
@ -93,7 +93,7 @@
|
|||
#define STORE_SUFFIX ".sbstore"
|
||||
|
||||
// NSPR_LOG_MODULES=UrlClassifierDbService:5
|
||||
extern mozilla::LazyLogModule gUrlClassifierDbServiceLog;
|
||||
extern PRLogModuleInfo *gUrlClassifierDbServiceLog;
|
||||
#define LOG(args) MOZ_LOG(gUrlClassifierDbServiceLog, mozilla::LogLevel::Debug, args)
|
||||
#define LOG_ENABLED() MOZ_LOG_TEST(gUrlClassifierDbServiceLog, mozilla::LogLevel::Debug)
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
#define PREFIXSET_SUFFIX ".pset"
|
||||
|
||||
// NSPR_LOG_MODULES=UrlClassifierDbService:5
|
||||
extern mozilla::LazyLogModule gUrlClassifierDbServiceLog;
|
||||
extern PRLogModuleInfo *gUrlClassifierDbServiceLog;
|
||||
#define LOG(args) MOZ_LOG(gUrlClassifierDbServiceLog, mozilla::LogLevel::Debug, args)
|
||||
#define LOG_ENABLED() MOZ_LOG_TEST(gUrlClassifierDbServiceLog, mozilla::LogLevel::Debug)
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
#include "nsUrlClassifierUtils.h"
|
||||
|
||||
// NSPR_LOG_MODULES=UrlClassifierProtocolParser:5
|
||||
mozilla::LazyLogModule gUrlClassifierProtocolParserLog("UrlClassifierProtocolParser");
|
||||
PRLogModuleInfo *gUrlClassifierProtocolParserLog = nullptr;
|
||||
#define PARSER_LOG(args) MOZ_LOG(gUrlClassifierProtocolParserLog, mozilla::LogLevel::Debug, args)
|
||||
|
||||
namespace mozilla {
|
||||
|
@ -77,6 +77,10 @@ ProtocolParser::~ProtocolParser()
|
|||
nsresult
|
||||
ProtocolParser::Init(nsICryptoHash* aHasher)
|
||||
{
|
||||
if (!gUrlClassifierProtocolParserLog) {
|
||||
gUrlClassifierProtocolParserLog =
|
||||
PR_NewLogModule("UrlClassifierProtocolParser");
|
||||
}
|
||||
mCryptoHash = aHasher;
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
@ -55,7 +55,7 @@ using namespace mozilla;
|
|||
using namespace mozilla::safebrowsing;
|
||||
|
||||
// NSPR_LOG_MODULES=UrlClassifierDbService:5
|
||||
LazyLogModule gUrlClassifierDbServiceLog("UrlClassifierDbService");
|
||||
PRLogModuleInfo *gUrlClassifierDbServiceLog = nullptr;
|
||||
#define LOG(args) MOZ_LOG(gUrlClassifierDbServiceLog, mozilla::LogLevel::Debug, args)
|
||||
#define LOG_ENABLED() MOZ_LOG_TEST(gUrlClassifierDbServiceLog, mozilla::LogLevel::Debug)
|
||||
|
||||
|
@ -1133,6 +1133,8 @@ nsUrlClassifierDBService::ReadTablesFromPrefs()
|
|||
nsresult
|
||||
nsUrlClassifierDBService::Init()
|
||||
{
|
||||
if (!gUrlClassifierDbServiceLog)
|
||||
gUrlClassifierDbServiceLog = PR_NewLogModule("UrlClassifierDbService");
|
||||
MOZ_ASSERT(NS_IsMainThread(), "Must initialize DB service on main thread");
|
||||
nsCOMPtr<nsIXULRuntime> appInfo = do_GetService("@mozilla.org/xre/app-info;1");
|
||||
if (appInfo) {
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
using namespace mozilla;
|
||||
|
||||
// NSPR_LOG_MODULES=UrlClassifierPrefixSet:5
|
||||
static LazyLogModule gUrlClassifierPrefixSetLog("UrlClassifierPrefixSet");
|
||||
static const PRLogModuleInfo *gUrlClassifierPrefixSetLog = nullptr;
|
||||
#define LOG(args) MOZ_LOG(gUrlClassifierPrefixSetLog, mozilla::LogLevel::Debug, args)
|
||||
#define LOG_ENABLED() MOZ_LOG_TEST(gUrlClassifierPrefixSetLog, mozilla::LogLevel::Debug)
|
||||
|
||||
|
@ -42,6 +42,8 @@ nsUrlClassifierPrefixSet::nsUrlClassifierPrefixSet()
|
|||
, mMemoryInUse(0)
|
||||
, mMemoryReportPath()
|
||||
{
|
||||
if (!gUrlClassifierPrefixSetLog)
|
||||
gUrlClassifierPrefixSetLog = PR_NewLogModule("UrlClassifierPrefixSet");
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
|
|
@ -27,7 +27,7 @@ static const char* gQuitApplicationMessage = "quit-application";
|
|||
#undef LOG
|
||||
|
||||
// NSPR_LOG_MODULES=UrlClassifierStreamUpdater:5
|
||||
static mozilla::LazyLogModule gUrlClassifierStreamUpdaterLog("UrlClassifierStreamUpdater");
|
||||
static const PRLogModuleInfo *gUrlClassifierStreamUpdaterLog = nullptr;
|
||||
#define LOG(args) MOZ_LOG(gUrlClassifierStreamUpdaterLog, mozilla::LogLevel::Debug, args)
|
||||
|
||||
// This class does absolutely nothing, except pass requests onto the DBService.
|
||||
|
@ -40,6 +40,8 @@ nsUrlClassifierStreamUpdater::nsUrlClassifierStreamUpdater()
|
|||
: mIsUpdating(false), mInitialized(false), mDownloadError(false),
|
||||
mBeganStream(false), mChannel(nullptr)
|
||||
{
|
||||
if (!gUrlClassifierStreamUpdaterLog)
|
||||
gUrlClassifierStreamUpdaterLog = PR_NewLogModule("UrlClassifierStreamUpdater");
|
||||
LOG(("nsUrlClassifierStreamUpdater init [this=%p]", this));
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче