Bug 900784 part 0.9 - Add ScriptLoader LazyLogModule. r=jonco
authorNicolas B. Pierron <nicolas.b.pierron@mozilla.com>
Tue, 31 Jan 2017 20:03:57 +0000
changeset 331924 fa256821beac5b51de3397c48ff4cd039cac8ea3
parent 331923 3f430c5ce6174f359af426282f79abc67a123dd8
child 331925 aeaf50c6d238d273776dce8cb6be0bf3c034306f
push id31291
push usercbook@mozilla.com
push dateWed, 01 Feb 2017 12:14:40 +0000
treeherdermozilla-central@9e7b1041929f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjonco
bugs900784
milestone54.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 900784 part 0.9 - Add ScriptLoader LazyLogModule. r=jonco
dom/base/nsScriptLoader.cpp
--- a/dom/base/nsScriptLoader.cpp
+++ b/dom/base/nsScriptLoader.cpp
@@ -60,16 +60,27 @@
 #include "nsIScriptError.h"
 
 using namespace mozilla;
 using namespace mozilla::dom;
 
 using JS::SourceBufferHolder;
 
 static LazyLogModule gCspPRLog("CSP");
+static LazyLogModule gScriptLoaderLog("ScriptLoader");
+
+#define LOG_VERBOSE(args)                                                     \
+  MOZ_LOG(gScriptLoaderLog, mozilla::LogLevel::Verbose, args)
+#define LOG(args)                                                             \
+  MOZ_LOG(gScriptLoaderLog, mozilla::LogLevel::Debug, args)
+#define LOG_WARN(args)                                                        \
+  MOZ_LOG(gScriptLoaderLog, mozilla::LogLevel::Warning, args)
+#define LOG_ERROR(args)                                                       \
+  MOZ_LOG(gScriptLoaderLog, mozilla::LogLevel::Error, args)
+
 
 void
 ImplCycleCollectionUnlink(nsScriptLoadRequestList& aField);
 
 void
 ImplCycleCollectionTraverse(nsCycleCollectionTraversalCallback& aCallback,
                             nsScriptLoadRequestList& aField,
                             const char* aName,