From e9f3c5a02550cf72f90f416502ce6b6fbc359288 Mon Sep 17 00:00:00 2001 From: Wes Kocher Date: Mon, 6 Oct 2014 16:32:50 -0700 Subject: [PATCH] Backed out 5 changesets (bug 806819) for WinXP test failures on a CLOSED TREE Backed out changeset 009ae35b0c67 (bug 806819) Backed out changeset 5a57f87f5061 (bug 806819) Backed out changeset f06cd735b5b3 (bug 806819) Backed out changeset e25a2a8d4af4 (bug 806819) Backed out changeset 70a167982c3f (bug 806819) --- configure.in | 1 - content/base/src/moz.build | 10 +- content/base/src/nsDOMDataChannel.cpp | 4 + content/base/src/nsDocument.cpp | 4 + content/base/src/nsNodeInfoManager.cpp | 4 + content/media/Latency.cpp | 3 + content/media/moz.build | 3 +- content/media/webrtc/MediaEngineWebRTC.cpp | 8 + docshell/base/moz.build | 6 +- docshell/base/nsDocShell.cpp | 5 + dom/base/moz.build | 3 +- dom/base/nsGlobalWindow.cpp | 4 + dom/base/nsJSEnvironment.cpp | 4 + dom/ipc/moz.build | 2 +- dom/plugins/base/moz.build | 13 +- dom/plugins/base/nsPluginLogging.h | 4 +- dom/plugins/ipc/moz.build | 23 ++- extensions/auth/moz.build | 11 +- extensions/auth/nsAuth.h | 4 + extensions/pref/autoconfig/src/moz.build | 3 +- .../pref/autoconfig/src/nsAutoConfig.cpp | 4 + .../autoconfig/src/nsJSConfigTriggers.cpp | 4 + .../pref/autoconfig/src/nsReadConfig.cpp | 4 + gfx/thebes/gfxDWriteFontList.cpp | 4 + gfx/thebes/gfxFont.cpp | 3 + gfx/thebes/gfxFontEntry.cpp | 3 + gfx/thebes/gfxFontUtils.cpp | 5 + gfx/thebes/gfxGDIFontList.cpp | 3 + gfx/thebes/gfxMacPlatformFontList.mm | 3 + gfx/thebes/gfxPlatform.cpp | 4 + gfx/thebes/gfxPlatformFontList.cpp | 3 + gfx/thebes/gfxUserFontSet.cpp | 3 + gfx/thebes/moz.build | 26 ++-- image/public/ImageLogging.h | 10 ++ js/xpconnect/loader/moz.build | 1 + js/xpconnect/loader/mozJSComponentLoader.cpp | 4 + layout/base/moz.build | 6 +- layout/base/nsDocumentViewer.cpp | 4 + layout/base/nsPresShell.cpp | 3 + layout/printing/moz.build | 8 +- layout/printing/nsPrintData.cpp | 4 + layout/printing/nsPrintEngine.cpp | 4 + layout/style/FontFaceSet.cpp | 3 + layout/style/Loader.cpp | 3 + layout/style/moz.build | 5 +- layout/style/nsFontFaceLoader.cpp | 3 + media/mtransport/build/moz.build | 4 +- media/mtransport/logging.h | 9 ++ media/mtransport/standalone/moz.build | 4 +- media/webrtc/moz.build | 145 +++++++++++++++--- .../src/common/browser_logging/CSFLog.h | 10 ++ netwerk/base/src/moz.build | 10 +- .../base/src/nsAsyncRedirectVerifyHelper.cpp | 4 + netwerk/base/src/nsSocketTransport2.cpp | 4 + .../base/src/nsSocketTransportService2.cpp | 4 + netwerk/cache/moz.build | 3 +- netwerk/cache/nsCache.h | 8 + netwerk/cache2/CacheLog.h | 8 + netwerk/cookie/moz.build | 2 +- netwerk/cookie/nsCookieService.cpp | 5 + netwerk/dns/GetAddrInfo.cpp | 4 + netwerk/dns/moz.build | 4 +- netwerk/dns/nsHostResolver.cpp | 4 + netwerk/protocol/http/HttpLog.h | 21 +++ netwerk/protocol/http/moz.build | 9 +- netwerk/protocol/rtsp/moz.build | 3 +- netwerk/protocol/websocket/WebSocketLog.h | 8 + netwerk/protocol/wyciwyg/nsWyciwyg.h | 19 ++- netwerk/sctp/datachannel/DataChannelLog.h | 8 + netwerk/test/TestProtocols.cpp | 1 + .../mozbuild/backend/recursivemake.py | 5 + security/apps/AppSignatureVerification.cpp | 4 + security/apps/AppTrustDomain.cpp | 4 + security/apps/moz.build | 3 +- security/manager/boot/src/moz.build | 7 +- .../boot/src/nsSecureBrowserUIImpl.cpp | 4 + .../manager/ssl/src/PSMContentListener.cpp | 4 + security/manager/ssl/src/nsCryptoHash.cpp | 4 + security/manager/ssl/src/nsNSSComponent.cpp | 4 + uriloader/base/nsURILoader.h | 4 + uriloader/exthandler/moz.build | 18 ++- .../exthandler/nsExternalHelperAppService.cpp | 4 + .../exthandler/nsExternalHelperAppService.h | 3 + uriloader/prefetch/moz.build | 8 +- uriloader/prefetch/nsOfflineCacheUpdate.cpp | 4 + .../prefetch/nsOfflineCacheUpdateService.cpp | 4 + widget/android/nsAppShell.cpp | 1 + widget/cocoa/TextInputHandler.mm | 8 + widget/cocoa/moz.build | 6 +- widget/cocoa/nsChildView.mm | 3 + widget/cocoa/nsClipboard.mm | 3 + widget/cocoa/nsDragService.mm | 3 + widget/gtk/moz.build | 17 +- widget/gtk/nsDeviceContextSpecG.cpp | 3 + widget/gtk/nsGtkIMModule.cpp | 3 + widget/gtk/nsWindow.h | 3 + widget/qt/nsAppShell.cpp | 1 + widget/qt/nsDeviceContextSpecQt.cpp | 3 + widget/qt/nsWindow.h | 3 + widget/windows/KeyboardLayout.cpp | 3 + widget/windows/WinMouseScrollHandler.cpp | 3 + widget/windows/WinUtils.cpp | 3 + widget/windows/moz.build | 10 +- widget/windows/nsIMM32Handler.cpp | 3 + widget/windows/nsTextStore.cpp | 3 + xpcom/components/moz.build | 7 +- xpcom/components/nsNativeModuleLoader.cpp | 5 + xpcom/threads/nsTimerImpl.h | 2 + 108 files changed, 608 insertions(+), 119 deletions(-) diff --git a/configure.in b/configure.in index 133aa2f3f77d..ba77d646bf31 100644 --- a/configure.in +++ b/configure.in @@ -6911,7 +6911,6 @@ if test "$NS_DISABLE_LOGGING"; then AC_DEFINE(NS_DISABLE_LOGGING) else AC_DEFINE(MOZ_LOGGING) - AC_DEFINE(FORCE_PR_LOG) fi dnl ======================================================== diff --git a/content/base/src/moz.build b/content/base/src/moz.build index fb670d379faa..a660ba44cbc5 100644 --- a/content/base/src/moz.build +++ b/content/base/src/moz.build @@ -42,7 +42,7 @@ if CONFIG['MOZ_WEBRTC']: 'nsDOMDataChannel.h', 'nsDOMDataChannelDeclarations.h', ] - UNIFIED_SOURCES += [ + SOURCES += [ 'nsDOMDataChannel.cpp', ] LOCAL_INCLUDES += [ @@ -122,7 +122,6 @@ UNIFIED_SOURCES += [ 'nsCSPService.cpp', 'nsCSPUtils.cpp', 'nsDataDocumentContentPolicy.cpp', - 'nsDocument.cpp', 'nsDocumentEncoder.cpp', 'nsDOMAttributeMap.cpp', 'nsDOMBlobBuilder.cpp', @@ -151,7 +150,6 @@ UNIFIED_SOURCES += [ 'nsMixedContentBlocker.cpp', 'nsNameSpaceManager.cpp', 'nsNoDataProtocolContentPolicy.cpp', - 'nsNodeInfoManager.cpp', 'nsNodeUtils.cpp', 'nsPlainTextSerializer.cpp', 'nsPropertyTable.cpp', @@ -186,6 +184,12 @@ SOURCES += [ 'nsImageLoadingContent.cpp', ] +# These files cannot be built in unified mode because they use FORCE_PR_LOG +SOURCES += [ + 'nsDocument.cpp', + 'nsNodeInfoManager.cpp', +] + # These files cannot be built in unified mode because of OS X headers. SOURCES += [ 'nsContentUtils.cpp', diff --git a/content/base/src/nsDOMDataChannel.cpp b/content/base/src/nsDOMDataChannel.cpp index 68bb52651385..a6ac0ca80a70 100644 --- a/content/base/src/nsDOMDataChannel.cpp +++ b/content/base/src/nsDOMDataChannel.cpp @@ -6,6 +6,10 @@ #include "nsDOMDataChannel.h" +#ifdef MOZ_LOGGING +#define FORCE_PR_LOG +#endif + #include "base/basictypes.h" #include "prlog.h" diff --git a/content/base/src/nsDocument.cpp b/content/base/src/nsDocument.cpp index 53bea7a3bc7f..5b5e56236cf0 100644 --- a/content/base/src/nsDocument.cpp +++ b/content/base/src/nsDocument.cpp @@ -18,6 +18,10 @@ #include "mozilla/Likely.h" #include +#ifdef MOZ_LOGGING +// so we can get logging even in release builds +#define FORCE_PR_LOG 1 +#endif #include "prlog.h" #include "plstr.h" #include "prprf.h" diff --git a/content/base/src/nsNodeInfoManager.cpp b/content/base/src/nsNodeInfoManager.cpp index 4a2ee6d7d5f2..6526a93291cb 100644 --- a/content/base/src/nsNodeInfoManager.cpp +++ b/content/base/src/nsNodeInfoManager.cpp @@ -32,6 +32,10 @@ using namespace mozilla; using mozilla::dom::NodeInfo; +#ifdef MOZ_LOGGING +// so we can get logging even in release builds +#define FORCE_PR_LOG 1 +#endif #include "prlog.h" #ifdef PR_LOGGING diff --git a/content/media/Latency.cpp b/content/media/Latency.cpp index 5fa0bb4eaf1b..7270293712e9 100644 --- a/content/media/Latency.cpp +++ b/content/media/Latency.cpp @@ -4,6 +4,9 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +// We want this available in opt builds +#define FORCE_PR_LOG + #include "Latency.h" #include "nsThreadUtils.h" #include "prlog.h" diff --git a/content/media/moz.build b/content/media/moz.build index 79b01e5824d0..b6d05e6ea7e2 100644 --- a/content/media/moz.build +++ b/content/media/moz.build @@ -140,7 +140,6 @@ UNIFIED_SOURCES += [ 'EncodedBufferCache.cpp', 'FileBlockCache.cpp', "GraphDriver.cpp", - 'Latency.cpp', 'MediaCache.cpp', 'MediaData.cpp', 'MediaDecoder.cpp', @@ -178,8 +177,10 @@ if CONFIG['OS_TARGET'] == 'WINNT': SOURCES += [ 'ThreadPoolCOMListener.cpp' ] # DecoderTraits.cpp needs to be built separately because of Mac OS X headers. +# Latency.cpp needs to be built separately because it forces NSPR logging. SOURCES += [ 'DecoderTraits.cpp', + 'Latency.cpp', ] FAIL_ON_WARNINGS = True diff --git a/content/media/webrtc/MediaEngineWebRTC.cpp b/content/media/webrtc/MediaEngineWebRTC.cpp index 264872e8e34e..a5b280bf2a4c 100644 --- a/content/media/webrtc/MediaEngineWebRTC.cpp +++ b/content/media/webrtc/MediaEngineWebRTC.cpp @@ -2,6 +2,14 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this file, * You can obtain one at http://mozilla.org/MPL/2.0/. */ +#ifdef MOZ_LOGGING +#define FORCE_PR_LOG +#endif + +#if defined(PR_LOG) +#error "This file must be #included before any IPDL-generated files or other files that #include prlog.h" +#endif + #include "nsIPrefService.h" #include "nsIPrefBranch.h" diff --git a/docshell/base/moz.build b/docshell/base/moz.build index da64fe8221be..501d389fb6ee 100644 --- a/docshell/base/moz.build +++ b/docshell/base/moz.build @@ -53,7 +53,6 @@ UNIFIED_SOURCES += [ 'LoadInfo.cpp', 'nsAboutRedirector.cpp', 'nsDefaultURIFixup.cpp', - 'nsDocShell.cpp', 'nsDocShellEditorData.cpp', 'nsDocShellEnumerator.cpp', 'nsDocShellLoadInfo.cpp', @@ -64,6 +63,11 @@ UNIFIED_SOURCES += [ 'SerializedLoadContext.cpp', ] +# nsDocShell.cpp cannot be built in unified mode because it forces NSPR logging. +SOURCES += [ + 'nsDocShell.cpp', +] + FAIL_ON_WARNINGS = True MSVC_ENABLE_PGO = True diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp index fed2d6d5fd8b..f9647455116a 100644 --- a/docshell/base/nsDocShell.cpp +++ b/docshell/base/nsDocShell.cpp @@ -26,6 +26,11 @@ #include "mozilla/VisualEventTracer.h" #include "URIUtils.h" +#ifdef MOZ_LOGGING +// so we can get logging even in release builds (but only for some things) +#define FORCE_PR_LOG 1 +#endif + #include "nsIContent.h" #include "nsIContentInlines.h" #include "nsIDocument.h" diff --git a/dom/base/moz.build b/dom/base/moz.build index 1b6e1b3e1e73..30b444752f62 100644 --- a/dom/base/moz.build +++ b/dom/base/moz.build @@ -94,7 +94,6 @@ UNIFIED_SOURCES += [ 'nsGlobalWindowCommands.cpp', 'nsHistory.cpp', 'nsIGlobalObject.cpp', - 'nsJSEnvironment.cpp', 'nsJSTimeoutHandler.cpp', 'nsJSUtils.cpp', 'nsLocation.cpp', @@ -124,6 +123,8 @@ SOURCES += [ 'nsDOMWindowUtils.cpp', # This file has a #error "Never include windows.h in this file!" 'nsGlobalWindow.cpp', + # This file forces NSPR logging. + 'nsJSEnvironment.cpp', # nsPluginArray.cpp includes npapi.h indirectly, and that includes a lot of system headers 'nsPluginArray.cpp', ] diff --git a/dom/base/nsGlobalWindow.cpp b/dom/base/nsGlobalWindow.cpp index f6fb8baa9007..3ed57bdf8219 100644 --- a/dom/base/nsGlobalWindow.cpp +++ b/dom/base/nsGlobalWindow.cpp @@ -175,6 +175,10 @@ #include "nsISupportsPrimitives.h" #include "nsXPCOMCID.h" #include "mozIThirdPartyUtil.h" +#ifdef MOZ_LOGGING +// so we can get logging even in release builds +#define FORCE_PR_LOG 1 +#endif #include "prlog.h" #include "prenv.h" #include "prprf.h" diff --git a/dom/base/nsJSEnvironment.cpp b/dom/base/nsJSEnvironment.cpp index 9ada9a4a3a0d..20021f980fa8 100644 --- a/dom/base/nsJSEnvironment.cpp +++ b/dom/base/nsJSEnvironment.cpp @@ -73,6 +73,10 @@ #endif #include "AccessCheck.h" +#ifdef MOZ_LOGGING +// Force PR_LOGGING so we can get JS strict warnings even in release builds +#define FORCE_PR_LOG 1 +#endif #include "prlog.h" #include "prthread.h" diff --git a/dom/ipc/moz.build b/dom/ipc/moz.build index 500324fe741d..3b20c3fd14da 100644 --- a/dom/ipc/moz.build +++ b/dom/ipc/moz.build @@ -63,9 +63,9 @@ UNIFIED_SOURCES += [ ] # Blob.cpp cannot be compiled in unified mode because it triggers a fatal gcc warning. +# ContentChild.cpp cannot be compiled in unified mode because it forces NSPR logging. # CrashReporterChild.cpp cannot be compiled in unified mode because of name clashes # in OS X headers. -# ContentChild.cpp cannot be compiled in unified mode on linux due to Time conflict SOURCES += [ 'Blob.cpp', 'ContentChild.cpp', diff --git a/dom/plugins/base/moz.build b/dom/plugins/base/moz.build index b393a953331a..5548640fa689 100644 --- a/dom/plugins/base/moz.build +++ b/dom/plugins/base/moz.build @@ -43,19 +43,20 @@ EXPORTS.mozilla += [ UNIFIED_SOURCES += [ 'nsJSNPRuntime.cpp', - 'nsNPAPIPluginInstance.cpp', - 'nsNPAPIPluginStreamListener.cpp', 'nsPluginInstanceOwner.cpp', 'nsPluginModule.cpp', 'nsPluginPlayPreviewInfo.cpp', - 'nsPluginStreamListenerPeer.cpp', - 'nsPluginTags.cpp', 'PluginPRLibrary.cpp', ] +# These files cannot be built in unified mode because they force NSPR logging. SOURCES += [ - 'nsNPAPIPlugin.cpp', # Conflict with X11 headers - 'nsPluginHost.cpp', # Conflict with NS_NPAPIPLUGIN_CALLBACK + 'nsNPAPIPlugin.cpp', + 'nsNPAPIPluginInstance.cpp', + 'nsNPAPIPluginStreamListener.cpp', + 'nsPluginHost.cpp', + 'nsPluginStreamListenerPeer.cpp', + 'nsPluginTags.cpp', ] if CONFIG['OS_ARCH'] == 'WINNT': diff --git a/dom/plugins/base/nsPluginLogging.h b/dom/plugins/base/nsPluginLogging.h index 80260b07f118..ba4976275be8 100644 --- a/dom/plugins/base/nsPluginLogging.h +++ b/dom/plugins/base/nsPluginLogging.h @@ -8,9 +8,11 @@ #ifndef nsPluginLogging_h__ #define nsPluginLogging_h__ -#include "prlog.h" +#define FORCE_PR_LOG /* Allow logging in the release build */ +#define PR_LOGGING 1 #ifdef PR_LOGGING +#include "prlog.h" #ifndef PLUGIN_LOGGING // allow external override #define PLUGIN_LOGGING 1 // master compile-time switch for pluging logging diff --git a/dom/plugins/ipc/moz.build b/dom/plugins/ipc/moz.build index 9db1237d4bd7..4962e11c525f 100644 --- a/dom/plugins/ipc/moz.build +++ b/dom/plugins/ipc/moz.build @@ -46,14 +46,13 @@ if CONFIG['OS_ARCH'] == 'WINNT': EXPORTS.mozilla.plugins += [ 'PluginSurfaceParent.h', ] - UNIFIED_SOURCES += [ + # These files cannot be built in unified mode because they force NSPR logging. + SOURCES += [ 'COMMessageFilter.cpp', + 'MiniShmParent.cpp', 'PluginHangUIParent.cpp', 'PluginSurfaceParent.cpp', ] - SOURCES += [ - 'MiniShmParent.cpp', # Issues with CreateEvent - ] DEFINES['MOZ_HANGUI_PROCESS_NAME'] = '"plugin-hang-ui%s"' % CONFIG['BIN_SUFFIX'] LOCAL_INCLUDES += [ '/widget/shared', @@ -69,11 +68,13 @@ if CONFIG['MOZ_ENABLE_QT']: GENERATED_SOURCES += [ 'moc_NestedLoopTimer.cpp', ] - UNIFIED_SOURCES += [ + # These files cannot be built in unified mode because they force NSPR logging. + SOURCES += [ 'NestedLoopTimer.cpp', ] -UNIFIED_SOURCES += [ +# These files cannot be built in unified mode because they force NSPR logging. +SOURCES += [ 'BrowserStreamChild.cpp', 'BrowserStreamParent.cpp', 'ChildAsyncCall.cpp', @@ -81,8 +82,10 @@ UNIFIED_SOURCES += [ 'PluginBackgroundDestroyer.cpp', 'PluginIdentifierChild.cpp', 'PluginIdentifierParent.cpp', + 'PluginInstanceChild.cpp', 'PluginInstanceParent.cpp', 'PluginMessageUtils.cpp', + 'PluginModuleChild.cpp', 'PluginModuleParent.cpp', 'PluginProcessChild.cpp', 'PluginProcessParent.cpp', @@ -92,13 +95,9 @@ UNIFIED_SOURCES += [ 'PluginStreamParent.cpp', ] -SOURCES += [ - 'PluginInstanceChild.cpp', # 'PluginThreadCallback' : ambiguous symbol - 'PluginModuleChild.cpp', # Redefinition of mozilla::WindowsDllInterceptor sUser32Intercept -] - if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa': - UNIFIED_SOURCES += [ + # These files cannot be built in unified mode because they force NSPR logging. + SOURCES += [ 'PluginInterposeOSX.mm', 'PluginUtilsOSX.mm', ] diff --git a/extensions/auth/moz.build b/extensions/auth/moz.build index 31262cf7c971..405bc616b468 100644 --- a/extensions/auth/moz.build +++ b/extensions/auth/moz.build @@ -4,12 +4,9 @@ # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. -UNIFIED_SOURCES += [ - 'nsAuthFactory.cpp', - 'nsAuthGSSAPI.cpp', -] - SOURCES += [ + 'nsAuthFactory.cpp', # forces NSPR logging + 'nsAuthGSSAPI.cpp', # forces NSPR logging 'nsAuthSASL.cpp', 'nsHttpNegotiateAuth.cpp', # contains constants whose names conflict with constants in other files ] @@ -20,8 +17,8 @@ if CONFIG['OS_ARCH'] == 'WINNT': ] DEFINES['USE_SSPI'] = True else: - UNIFIED_SOURCES += [ - 'nsAuthSambaNTLM.cpp', + SOURCES += [ + 'nsAuthSambaNTLM.cpp', # forces NSPR logging ] FINAL_LIBRARY = 'xul' diff --git a/extensions/auth/nsAuth.h b/extensions/auth/nsAuth.h index d81fd61ace8e..8d46227116fc 100644 --- a/extensions/auth/nsAuth.h +++ b/extensions/auth/nsAuth.h @@ -12,6 +12,10 @@ enum pType { PACKAGE_TYPE_NTLM }; +#if defined(MOZ_LOGGING) +#define FORCE_PR_LOG +#endif + #include "prlog.h" #if defined( PR_LOGGING ) diff --git a/extensions/pref/autoconfig/src/moz.build b/extensions/pref/autoconfig/src/moz.build index 7c40fcd28c1b..eebea67742d6 100644 --- a/extensions/pref/autoconfig/src/moz.build +++ b/extensions/pref/autoconfig/src/moz.build @@ -4,7 +4,8 @@ # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. -UNIFIED_SOURCES += [ +# These files cannot be built in unified mode because they force NSPR logging. +SOURCES += [ 'nsAutoConfig.cpp', 'nsConfigFactory.cpp', 'nsJSConfigTriggers.cpp', diff --git a/extensions/pref/autoconfig/src/nsAutoConfig.cpp b/extensions/pref/autoconfig/src/nsAutoConfig.cpp index 0ee2e3fbc8b2..565bdb20ca25 100644 --- a/extensions/pref/autoconfig/src/nsAutoConfig.cpp +++ b/extensions/pref/autoconfig/src/nsAutoConfig.cpp @@ -3,6 +3,10 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#ifdef MOZ_LOGGING +// sorry, this has to be before the pre-compiled header +#define FORCE_PR_LOG /* Allow logging in the release build */ +#endif #include "nsAutoConfig.h" #include "nsIURI.h" #include "nsIHttpChannel.h" diff --git a/extensions/pref/autoconfig/src/nsJSConfigTriggers.cpp b/extensions/pref/autoconfig/src/nsJSConfigTriggers.cpp index 7979ef0f99ae..904cf531482f 100644 --- a/extensions/pref/autoconfig/src/nsJSConfigTriggers.cpp +++ b/extensions/pref/autoconfig/src/nsJSConfigTriggers.cpp @@ -3,6 +3,10 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#ifdef MOZ_LOGGING +// sorry, this has to be before the pre-compiled header +#define FORCE_PR_LOG /* Allow logging in the release build */ +#endif #include "jsapi.h" #include "nsIXPConnect.h" #include "nsIJSRuntimeService.h" diff --git a/extensions/pref/autoconfig/src/nsReadConfig.cpp b/extensions/pref/autoconfig/src/nsReadConfig.cpp index 7255916ce3bb..5a54e8a78bae 100644 --- a/extensions/pref/autoconfig/src/nsReadConfig.cpp +++ b/extensions/pref/autoconfig/src/nsReadConfig.cpp @@ -3,6 +3,10 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#ifdef MOZ_LOGGING +// sorry, this has to be before the pre-compiled header +#define FORCE_PR_LOG /* Allow logging in the release build */ +#endif #include "nsReadConfig.h" #include "nsAppDirectoryServiceDefs.h" #include "nsIAppStartup.h" diff --git a/gfx/thebes/gfxDWriteFontList.cpp b/gfx/thebes/gfxDWriteFontList.cpp index f14f8fa22616..6b34b755f82a 100644 --- a/gfx/thebes/gfxDWriteFontList.cpp +++ b/gfx/thebes/gfxDWriteFontList.cpp @@ -6,6 +6,10 @@ #include "mozilla/ArrayUtils.h" #include "mozilla/MemoryReporting.h" +#ifdef MOZ_LOGGING +#define FORCE_PR_LOG /* Allow logging in the release build */ +#endif /* MOZ_LOGGING */ + #include "gfxDWriteFontList.h" #include "gfxDWriteFonts.h" #include "nsUnicharUtils.h" diff --git a/gfx/thebes/gfxFont.cpp b/gfx/thebes/gfxFont.cpp index cc49c6be4ddd..4d6c62eef855 100644 --- a/gfx/thebes/gfxFont.cpp +++ b/gfx/thebes/gfxFont.cpp @@ -7,6 +7,9 @@ #include "mozilla/DebugOnly.h" #include "mozilla/MathAlgorithms.h" +#ifdef MOZ_LOGGING +#define FORCE_PR_LOG /* Allow logging in the release build */ +#endif #include "prlog.h" #include "nsExpirationTracker.h" diff --git a/gfx/thebes/gfxFontEntry.cpp b/gfx/thebes/gfxFontEntry.cpp index 1a16de2e4d66..7d0b35b644d5 100644 --- a/gfx/thebes/gfxFontEntry.cpp +++ b/gfx/thebes/gfxFontEntry.cpp @@ -6,6 +6,9 @@ #include "mozilla/DebugOnly.h" #include "mozilla/MathAlgorithms.h" +#ifdef MOZ_LOGGING +#define FORCE_PR_LOG /* Allow logging in the release build */ +#endif #include "prlog.h" #include "nsServiceManagerUtils.h" diff --git a/gfx/thebes/gfxFontUtils.cpp b/gfx/thebes/gfxFontUtils.cpp index 680c7d3c44b7..a7d5713323f6 100644 --- a/gfx/thebes/gfxFontUtils.cpp +++ b/gfx/thebes/gfxFontUtils.cpp @@ -3,6 +3,11 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#ifdef MOZ_LOGGING +#define FORCE_PR_LOG /* Allow logging in the release build */ +#include "prlog.h" +#endif + #include "mozilla/ArrayUtils.h" #include "mozilla/BinarySearch.h" diff --git a/gfx/thebes/gfxGDIFontList.cpp b/gfx/thebes/gfxGDIFontList.cpp index 9d893b6a5362..0b3d8e898017 100644 --- a/gfx/thebes/gfxGDIFontList.cpp +++ b/gfx/thebes/gfxGDIFontList.cpp @@ -6,6 +6,9 @@ #include "mozilla/DebugOnly.h" #include +#ifdef MOZ_LOGGING +#define FORCE_PR_LOG /* Allow logging in the release build */ +#endif #include "prlog.h" #include "gfxGDIFontList.h" diff --git a/gfx/thebes/gfxMacPlatformFontList.mm b/gfx/thebes/gfxMacPlatformFontList.mm index aa103ddd7ea4..6110727f864a 100644 --- a/gfx/thebes/gfxMacPlatformFontList.mm +++ b/gfx/thebes/gfxMacPlatformFontList.mm @@ -38,6 +38,9 @@ * * ***** END LICENSE BLOCK ***** */ +#ifdef MOZ_LOGGING +#define FORCE_PR_LOG /* Allow logging in the release build */ +#endif #include "prlog.h" #include diff --git a/gfx/thebes/gfxPlatform.cpp b/gfx/thebes/gfxPlatform.cpp index 28fdc28ed53c..0d078c0eadd0 100644 --- a/gfx/thebes/gfxPlatform.cpp +++ b/gfx/thebes/gfxPlatform.cpp @@ -3,6 +3,10 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#ifdef MOZ_LOGGING +#define FORCE_PR_LOG /* Allow logging in the release build */ +#endif + #include "mozilla/layers/AsyncTransactionTracker.h" // for AsyncTransactionTracker #include "mozilla/layers/CompositorChild.h" #include "mozilla/layers/CompositorParent.h" diff --git a/gfx/thebes/gfxPlatformFontList.cpp b/gfx/thebes/gfxPlatformFontList.cpp index b2bb822677b7..298c9befda7c 100644 --- a/gfx/thebes/gfxPlatformFontList.cpp +++ b/gfx/thebes/gfxPlatformFontList.cpp @@ -3,6 +3,9 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#ifdef MOZ_LOGGING +#define FORCE_PR_LOG /* Allow logging in the release build */ +#endif #include "prlog.h" #include "gfxPlatformFontList.h" diff --git a/gfx/thebes/gfxUserFontSet.cpp b/gfx/thebes/gfxUserFontSet.cpp index d8d1e0395b51..ba698c7e03e1 100644 --- a/gfx/thebes/gfxUserFontSet.cpp +++ b/gfx/thebes/gfxUserFontSet.cpp @@ -3,6 +3,9 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#ifdef MOZ_LOGGING +#define FORCE_PR_LOG /* Allow logging in the release build */ +#endif /* MOZ_LOGGING */ #include "prlog.h" #include "gfxUserFontSet.h" diff --git a/gfx/thebes/moz.build b/gfx/thebes/moz.build index 88d82ffaaa84..a113e69d23f4 100644 --- a/gfx/thebes/moz.build +++ b/gfx/thebes/moz.build @@ -169,6 +169,7 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows': 'gfxWindowsPlatform.h', 'gfxWindowsSurface.h', ] + # gfxGDIFontList.cpp forces NSPR logging, so it cannot be built in unified mode. SOURCES += [ 'gfxGDIFont.cpp', 'gfxGDIFontList.cpp', @@ -178,12 +179,11 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows': 'gfxWindowsSurface.cpp', ] if CONFIG['MOZ_ENABLE_DWRITE_FONT']: - UNIFIED_SOURCES += [ - 'gfxDWriteFontList.cpp', - ] + # gfxDWriteFontList.cpp forces NSPR logging, so it cannot be built in unified mode. SOURCES += [ 'gfxD2DSurface.cpp', 'gfxDWriteCommon.cpp', + 'gfxDWriteFontList.cpp', 'gfxDWriteFonts.cpp', ] if CONFIG['MOZ_ENABLE_DIRECT2D1_1']: @@ -204,9 +204,19 @@ SOURCES += [ # we could consider removing soon (affects Ubuntus older than 10.04 LTS) # which currently prevent it from joining UNIFIED_SOURCES. 'gfxDrawable.cpp', - # gfxPlatform.cpp includes mac system header conflicting with point/size + # Uses FORCE_PR_LOG + 'gfxFont.cpp', + # Uses FORCE_PR_LOG + 'gfxFontEntry.cpp', + # Uses FORCE_PR_LOG + 'gfxFontUtils.cpp', + # Includes mac system header conflicting with point/size, and also uses FORCE_PR_LOG 'gfxPlatform.cpp', + # Uses FORCE_PR_LOG + 'gfxPlatformFontList.cpp', 'gfxPrefs.cpp', + # Uses FORCE_PR_LOG + 'gfxUserFontSet.cpp', ] UNIFIED_SOURCES += [ @@ -216,13 +226,10 @@ UNIFIED_SOURCES += [ 'gfxBaseSharedMemorySurface.cpp', 'gfxBlur.cpp', 'gfxContext.cpp', - 'gfxFont.cpp', - 'gfxFontEntry.cpp', 'gfxFontFeatures.cpp', 'gfxFontInfoLoader.cpp', 'gfxFontMissingGlyphs.cpp', 'gfxFontTest.cpp', - 'gfxFontUtils.cpp', 'gfxGlyphExtents.cpp', 'gfxGradientCache.cpp', 'gfxGraphiteShaper.cpp', @@ -231,7 +238,6 @@ UNIFIED_SOURCES += [ 'gfxMathTable.cpp', 'gfxMatrix.cpp', 'gfxPattern.cpp', - 'gfxPlatformFontList.cpp', 'gfxRect.cpp', 'gfxReusableImageSurfaceWrapper.cpp', 'gfxReusableSharedImageSurfaceWrapper.cpp', @@ -240,14 +246,14 @@ UNIFIED_SOURCES += [ 'gfxSVGGlyphs.cpp', 'gfxTeeSurface.cpp', 'gfxTextRun.cpp', - 'gfxUserFontSet.cpp', 'gfxUtils.cpp', 'nsSurfaceTexture.cpp', 'nsUnicodeRange.cpp', ] if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa': - UNIFIED_SOURCES += [ + # gfxMacPlatformFontList.mm forces NSPR logging so it cannot be built in unified mode. + SOURCES += [ 'gfxMacPlatformFontList.mm', ] diff --git a/image/public/ImageLogging.h b/image/public/ImageLogging.h index 0ff3cf1a6696..f40009b209bf 100644 --- a/image/public/ImageLogging.h +++ b/image/public/ImageLogging.h @@ -7,6 +7,16 @@ #ifndef ImageLogging_h #define ImageLogging_h +// In order for FORCE_PR_LOG below to work, we have to define it before the +// first time prlog is #included. +#if defined(PR_LOG) +#error "Must #include ImageLogging.h before before any IPDL-generated files or other files that #include prlog.h." +#endif + +#if defined(MOZ_LOGGING) +#define FORCE_PR_LOG +#endif + #include "prlog.h" #include "prinrval.h" #include "nsString.h" diff --git a/js/xpconnect/loader/moz.build b/js/xpconnect/loader/moz.build index a19cf3c5e42d..f639b740c612 100644 --- a/js/xpconnect/loader/moz.build +++ b/js/xpconnect/loader/moz.build @@ -5,6 +5,7 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. # These files cannot be built in unified mode because they rely on plarena.h +# and they want to force NSPR logging. SOURCES += [ 'mozJSComponentLoader.cpp', 'mozJSLoaderUtils.cpp', diff --git a/js/xpconnect/loader/mozJSComponentLoader.cpp b/js/xpconnect/loader/mozJSComponentLoader.cpp index 70a5c6adcdf5..9f032a22e6a3 100644 --- a/js/xpconnect/loader/mozJSComponentLoader.cpp +++ b/js/xpconnect/loader/mozJSComponentLoader.cpp @@ -6,6 +6,10 @@ #include "mozilla/Attributes.h" +#ifdef MOZ_LOGGING +#define FORCE_PR_LOG +#endif + #include #include "prlog.h" diff --git a/layout/base/moz.build b/layout/base/moz.build index 6690fcadd699..819bf6710654 100644 --- a/layout/base/moz.build +++ b/layout/base/moz.build @@ -80,7 +80,6 @@ UNIFIED_SOURCES += [ 'nsCSSRenderingBorders.cpp', 'nsDisplayList.cpp', 'nsDisplayListInvalidation.cpp', - 'nsDocumentViewer.cpp', 'nsFrameManager.cpp', 'nsFrameTraversal.cpp', 'nsGenConList.cpp', @@ -88,7 +87,6 @@ UNIFIED_SOURCES += [ 'nsLayoutHistoryState.cpp', 'nsLayoutUtils.cpp', 'nsPresContext.cpp', - 'nsPresShell.cpp', 'nsQuoteList.cpp', 'nsStyleChangeList.cpp', 'nsStyleSheetService.cpp', @@ -101,10 +99,14 @@ UNIFIED_SOURCES += [ 'TouchCaret.cpp', ] +# nsDocumentViewer.cpp and nsPresShell.cpp need to be built separately +# because they force NSPR logging. # nsPresArena.cpp needs to be built separately because it uses plarena.h. # nsRefreshDriver.cpp needs to be built separately because of name clashes in the OS X headers SOURCES += [ + 'nsDocumentViewer.cpp', 'nsPresArena.cpp', + 'nsPresShell.cpp', 'nsRefreshDriver.cpp', ] diff --git a/layout/base/nsDocumentViewer.cpp b/layout/base/nsDocumentViewer.cpp index 35138310d985..b764f08cfd6f 100644 --- a/layout/base/nsDocumentViewer.cpp +++ b/layout/base/nsDocumentViewer.cpp @@ -130,6 +130,10 @@ using namespace mozilla::dom; //----------------------------------------------------- // PR LOGGING +#ifdef MOZ_LOGGING +#define FORCE_PR_LOG /* Allow logging in the release build */ +#endif + #include "prlog.h" #ifdef PR_LOGGING diff --git a/layout/base/nsPresShell.cpp b/layout/base/nsPresShell.cpp index 539ca2a44156..b780580cb9f8 100644 --- a/layout/base/nsPresShell.cpp +++ b/layout/base/nsPresShell.cpp @@ -18,6 +18,9 @@ /* a presentation of a document, part 2 */ +#ifdef MOZ_LOGGING +#define FORCE_PR_LOG /* Allow logging in the release build */ +#endif #include "prlog.h" #include "mozilla/ArrayUtils.h" diff --git a/layout/printing/moz.build b/layout/printing/moz.build index c99d2212525f..a193cfddf841 100644 --- a/layout/printing/moz.build +++ b/layout/printing/moz.build @@ -14,12 +14,16 @@ XPIDL_MODULE = 'layout_printing' UNIFIED_SOURCES += [ 'nsPagePrintTimer.cpp', - 'nsPrintData.cpp', - 'nsPrintEngine.cpp', 'nsPrintObject.cpp', 'nsPrintPreviewListener.cpp', ] +# These files cannot be built in unified mode because they force NSPR logging. +SOURCES += [ + 'nsPrintData.cpp', + 'nsPrintEngine.cpp', +] + FAIL_ON_WARNINGS = True FINAL_LIBRARY = 'xul' diff --git a/layout/printing/nsPrintData.cpp b/layout/printing/nsPrintData.cpp index e08e13cbd0ac..d9339fccefff 100644 --- a/layout/printing/nsPrintData.cpp +++ b/layout/printing/nsPrintData.cpp @@ -14,6 +14,10 @@ //----------------------------------------------------- // PR LOGGING +#ifdef MOZ_LOGGING +#define FORCE_PR_LOG /* Allow logging in the release build */ +#endif + #include "prlog.h" #ifdef PR_LOGGING diff --git a/layout/printing/nsPrintEngine.cpp b/layout/printing/nsPrintEngine.cpp index 4c4a83964569..463efc031737 100644 --- a/layout/printing/nsPrintEngine.cpp +++ b/layout/printing/nsPrintEngine.cpp @@ -127,6 +127,10 @@ using namespace mozilla::dom; //----------------------------------------------------- // PR LOGGING +#ifdef MOZ_LOGGING +#define FORCE_PR_LOG /* Allow logging in the release build */ +#endif + #include "prlog.h" #ifdef PR_LOGGING diff --git a/layout/style/FontFaceSet.cpp b/layout/style/FontFaceSet.cpp index 2702fec90759..0a0410ea11fe 100644 --- a/layout/style/FontFaceSet.cpp +++ b/layout/style/FontFaceSet.cpp @@ -6,6 +6,9 @@ #include "FontFaceSet.h" +#ifdef MOZ_LOGGING +#define FORCE_PR_LOG /* Allow logging in the release build */ +#endif /* MOZ_LOGGING */ #include "prlog.h" #include "mozilla/css/Loader.h" diff --git a/layout/style/Loader.cpp b/layout/style/Loader.cpp index 5cf983df3db2..4e82b4e83b0a 100644 --- a/layout/style/Loader.cpp +++ b/layout/style/Loader.cpp @@ -254,6 +254,9 @@ private: void FireLoadEvent(nsIThreadInternal* aThread); }; +#ifdef MOZ_LOGGING +// #define FORCE_PR_LOG /* Allow logging in the release build */ +#endif /* MOZ_LOGGING */ #include "prlog.h" #ifdef PR_LOGGING diff --git a/layout/style/moz.build b/layout/style/moz.build index 170128d376c3..66b9557a28ef 100644 --- a/layout/style/moz.build +++ b/layout/style/moz.build @@ -117,7 +117,6 @@ UNIFIED_SOURCES += [ 'nsDOMCSSRect.cpp', 'nsDOMCSSRGBColor.cpp', 'nsDOMCSSValueList.cpp', - 'nsFontFaceLoader.cpp', 'nsHTMLCSSStyleSheet.cpp', 'nsHTMLStyleSheet.cpp', 'nsLayoutStylesheetCache.cpp', @@ -138,11 +137,13 @@ UNIFIED_SOURCES += [ 'SVGAttrAnimationRuleProcessor.cpp', ] -# FontFaceSet.cpp needs to be built separately because it redefines LOG. # nsCSSRuleProcessor.cpp needs to be built separately because it uses plarena.h. +# FontFaceSet.cpp and nsFontFaceLoader.cpp need to be built separately because +# they force NSPR logging. SOURCES += [ 'FontFaceSet.cpp', 'nsCSSRuleProcessor.cpp', + 'nsFontFaceLoader.cpp', ] FAIL_ON_WARNINGS = True diff --git a/layout/style/nsFontFaceLoader.cpp b/layout/style/nsFontFaceLoader.cpp index 77535b9ebf87..608647139bee 100644 --- a/layout/style/nsFontFaceLoader.cpp +++ b/layout/style/nsFontFaceLoader.cpp @@ -6,6 +6,9 @@ /* code for loading in @font-face defined font data */ +#ifdef MOZ_LOGGING +#define FORCE_PR_LOG /* Allow logging in the release build */ +#endif /* MOZ_LOGGING */ #include "prlog.h" #include "nsFontFaceLoader.h" diff --git a/media/mtransport/build/moz.build b/media/mtransport/build/moz.build index 57ecc27c6f6a..fb7d240639b8 100644 --- a/media/mtransport/build/moz.build +++ b/media/mtransport/build/moz.build @@ -27,9 +27,7 @@ EXPORTS.mtransport += [ include('../objs.mozbuild') -# These files cannot be built in unified mode because of the redefinition of -# getLogModule, UNIMPLEMENTED, nr_socket_long_term_violation_time, -# nr_socket_short_term_violation_time. +# These files cannot be built in unified mode because they force NSPR logging. SOURCES += mtransport_cppsrcs FAIL_ON_WARNINGS = True diff --git a/media/mtransport/logging.h b/media/mtransport/logging.h index c03907a70055..a9557e16ded4 100644 --- a/media/mtransport/logging.h +++ b/media/mtransport/logging.h @@ -9,6 +9,15 @@ #ifndef logging_h__ #define logging_h__ +#if defined(PR_LOG) +#error "Must #include logging.h before any IPDL-generated files or other files that #include prlog.h." +#endif + +// Enforce logging under production builds for MOZ_MTLOG friends. +#ifndef PR_LOGGING +#define FORCE_PR_LOG 1 +#endif + #include #include diff --git a/media/mtransport/standalone/moz.build b/media/mtransport/standalone/moz.build index 5678dfb978cc..e9f28d5507e4 100644 --- a/media/mtransport/standalone/moz.build +++ b/media/mtransport/standalone/moz.build @@ -6,9 +6,7 @@ include('../objs.mozbuild') -# These files cannot be built in unified mode because of the redefinition of -# getLogModule, UNIMPLEMENTED, nr_socket_long_term_violation_time, -# nr_socket_short_term_violation_time. +# These files cannot be built in unified mode because they force NSPR logging. SOURCES += mtransport_cppsrcs Library('mtransport_s') diff --git a/media/webrtc/moz.build b/media/webrtc/moz.build index 06f6a83763ea..d2ca2c92a636 100644 --- a/media/webrtc/moz.build +++ b/media/webrtc/moz.build @@ -51,54 +51,153 @@ if CONFIG['MOZ_WEBRTC_SIGNALING']: build_for_test=0 ) GYP_DIRS['signaling'].sandbox_vars['FINAL_LIBRARY'] = 'xul' - # Excluded because of name clash in the logTag variable signaling_non_unified_sources = [ + 'signaling/src/sipcc/core/gsm/fim.c', # Because of name clash in the logTag variable + 'signaling/src/sipcc/core/gsm/gsm_sdp.c', # Because of name clash in the logTag variable + 'signaling/src/sipcc/core/gsm/lsm.c', # Because of name clash in the logTag variable + 'signaling/src/sipcc/core/sdp/sdp_base64.c', # Because of name clash with the macro PADDING + ] + # These files cannot be built in unified mode because they force NSPR logging. + signaling_non_unified_sources_2 = [ + 'signaling/src/callcontrol/CallControlManagerImpl.cpp', + 'signaling/src/common/browser_logging/CSFLog.cpp', 'signaling/src/media-conduit/AudioConduit.cpp', 'signaling/src/media-conduit/CodecStatistics.cpp', 'signaling/src/media-conduit/VideoConduit.cpp', + 'signaling/src/media-conduit/WebrtcOMXH264VideoCodec.cpp', 'signaling/src/media/CSFAudioControlWrapper.cpp', 'signaling/src/media/CSFVideoControlWrapper.cpp', 'signaling/src/media/VcmSIPCCBinding.cpp', + 'signaling/src/mediapipeline/MediaPipeline.cpp', + 'signaling/src/mediapipeline/MediaPipelineFilter.cpp', + 'signaling/src/mediapipeline/SrtpFlow.cpp', + 'signaling/src/peerconnection/MediaStreamList.cpp', 'signaling/src/peerconnection/PeerConnectionCtx.cpp', 'signaling/src/peerconnection/PeerConnectionImpl.cpp', 'signaling/src/peerconnection/PeerConnectionMedia.cpp', 'signaling/src/peerconnection/WebrtcGlobalInformation.cpp', + 'signaling/src/sipcc/core/ccapp/call_logger.c', + 'signaling/src/sipcc/core/ccapp/capability_set.c', + 'signaling/src/sipcc/core/ccapp/cc_call_feature.c', + 'signaling/src/sipcc/core/ccapp/cc_config.c', + 'signaling/src/sipcc/core/ccapp/cc_device_feature.c', + 'signaling/src/sipcc/core/ccapp/cc_device_manager.c', + 'signaling/src/sipcc/core/ccapp/cc_info.c', + 'signaling/src/sipcc/core/ccapp/cc_service.c', + 'signaling/src/sipcc/core/ccapp/ccapi_call.c', + 'signaling/src/sipcc/core/ccapp/ccapi_call_info.c', + 'signaling/src/sipcc/core/ccapp/ccapi_config.c', + 'signaling/src/sipcc/core/ccapp/ccapi_device.c', 'signaling/src/sipcc/core/ccapp/ccapi_device_info.c', - 'signaling/src/sipcc/core/gsm/fim.c', - 'signaling/src/sipcc/core/gsm/gsm_sdp.c', - 'signaling/src/sipcc/core/gsm/lsm.c', + 'signaling/src/sipcc/core/ccapp/ccapi_feature_info.c', + 'signaling/src/sipcc/core/ccapp/ccapi_line_info.c', + 'signaling/src/sipcc/core/ccapp/ccapi_service.c', + 'signaling/src/sipcc/core/ccapp/ccapi_snapshot.c', + 'signaling/src/sipcc/core/ccapp/ccapp_task.c', + 'signaling/src/sipcc/core/ccapp/ccprovider.c', + 'signaling/src/sipcc/core/ccapp/conf_roster.c', + 'signaling/src/sipcc/core/common/cfgfile_utils.c', + 'signaling/src/sipcc/core/common/config_api.c', + 'signaling/src/sipcc/core/common/config_parser.c', + 'signaling/src/sipcc/core/common/init.c', + 'signaling/src/sipcc/core/common/logger.c', + 'signaling/src/sipcc/core/common/misc.c', + 'signaling/src/sipcc/core/common/plat.c', + 'signaling/src/sipcc/core/common/platform_api.c', + 'signaling/src/sipcc/core/common/prot_configmgr.c', + 'signaling/src/sipcc/core/common/resource_manager.c', + 'signaling/src/sipcc/core/common/subscription_handler.c', + 'signaling/src/sipcc/core/common/ui.c', + 'signaling/src/sipcc/core/gsm/ccapi.c', + 'signaling/src/sipcc/core/gsm/ccapi_strings.c', + 'signaling/src/sipcc/core/gsm/dcsm.c', + 'signaling/src/sipcc/core/gsm/fsm.c', + 'signaling/src/sipcc/core/gsm/fsmb2bcnf.c', + 'signaling/src/sipcc/core/gsm/fsmcac.c', + 'signaling/src/sipcc/core/gsm/fsmcnf.c', + 'signaling/src/sipcc/core/gsm/fsmdef.c', + 'signaling/src/sipcc/core/gsm/fsmxfr.c', + 'signaling/src/sipcc/core/gsm/gsm.c', + 'signaling/src/sipcc/core/gsm/gsm_sdp_crypto.c', + 'signaling/src/sipcc/core/gsm/media_cap_tbl.c', + 'signaling/src/sipcc/core/gsm/sm.c', + 'signaling/src/sipcc/core/gsm/subapi.c', + 'signaling/src/sipcc/core/sdp/ccsdp.c', 'signaling/src/sipcc/core/sdp/sdp_access.c', 'signaling/src/sipcc/core/sdp/sdp_attr.c', 'signaling/src/sipcc/core/sdp/sdp_attr_access.c', 'signaling/src/sipcc/core/sdp/sdp_config.c', 'signaling/src/sipcc/core/sdp/sdp_main.c', + 'signaling/src/sipcc/core/sdp/sdp_services_unix.c', 'signaling/src/sipcc/core/sdp/sdp_token.c', 'signaling/src/sipcc/core/sdp/sdp_utils.c', + 'signaling/src/sipcc/core/sipstack/ccsip_callinfo.c', + 'signaling/src/sipcc/core/sipstack/ccsip_cc.c', + 'signaling/src/sipcc/core/sipstack/ccsip_common_util.c', + 'signaling/src/sipcc/core/sipstack/ccsip_core.c', + 'signaling/src/sipcc/core/sipstack/ccsip_debug.c', + 'signaling/src/sipcc/core/sipstack/ccsip_info.c', + 'signaling/src/sipcc/core/sipstack/ccsip_messaging.c', + 'signaling/src/sipcc/core/sipstack/ccsip_platform.c', + 'signaling/src/sipcc/core/sipstack/ccsip_platform_tcp.c', + 'signaling/src/sipcc/core/sipstack/ccsip_platform_timers.c', + 'signaling/src/sipcc/core/sipstack/ccsip_platform_tls.c', + 'signaling/src/sipcc/core/sipstack/ccsip_platform_udp.c', + 'signaling/src/sipcc/core/sipstack/ccsip_pmh.c', + 'signaling/src/sipcc/core/sipstack/ccsip_publish.c', + 'signaling/src/sipcc/core/sipstack/ccsip_register.c', + 'signaling/src/sipcc/core/sipstack/ccsip_reldev.c', + 'signaling/src/sipcc/core/sipstack/ccsip_sdp.c', + 'signaling/src/sipcc/core/sipstack/ccsip_spi_utils.c', + 'signaling/src/sipcc/core/sipstack/ccsip_subsmanager.c', + 'signaling/src/sipcc/core/sipstack/ccsip_task.c', + 'signaling/src/sipcc/core/sipstack/httpish.c', + 'signaling/src/sipcc/core/sipstack/sip_common_regmgr.c', + 'signaling/src/sipcc/core/sipstack/sip_common_transport.c', + 'signaling/src/sipcc/core/sipstack/sip_csps_transport.c', + 'signaling/src/sipcc/core/sipstack/sip_interface_regmgr.c', + 'signaling/src/sipcc/core/sipstack/sip_platform_task.c', + 'signaling/src/sipcc/core/sipstack/sip_platform_win32_task.c', + 'signaling/src/sipcc/core/src-common/configapp.c', + 'signaling/src/sipcc/core/src-common/dialplan.c', + 'signaling/src/sipcc/core/src-common/dialplanint.c', + 'signaling/src/sipcc/core/src-common/digcalc.c', + 'signaling/src/sipcc/core/src-common/kpml_common_util.c', + 'signaling/src/sipcc/core/src-common/kpmlmap.c', + 'signaling/src/sipcc/core/src-common/misc_apps_task.c', + 'signaling/src/sipcc/core/src-common/pres_sub_not_handler.c', + 'signaling/src/sipcc/core/src-common/publish_int.c', + 'signaling/src/sipcc/core/src-common/string_lib.c', + 'signaling/src/sipcc/core/src-common/util_ios_queue.c', + 'signaling/src/sipcc/cpr/android/cpr_android_init.c', + 'signaling/src/sipcc/cpr/android/cpr_android_stdio.c', + 'signaling/src/sipcc/cpr/android/cpr_android_timers_using_select.c', + 'signaling/src/sipcc/cpr/darwin/cpr_darwin_init.c', + 'signaling/src/sipcc/cpr/darwin/cpr_darwin_stdio.c', + 'signaling/src/sipcc/cpr/darwin/cpr_darwin_timers_using_select.c', + 'signaling/src/sipcc/cpr/linux/cpr_linux_init.c', + 'signaling/src/sipcc/cpr/linux/cpr_linux_stdio.c', + 'signaling/src/sipcc/cpr/linux/cpr_linux_timers_using_select.c', + 'signaling/src/sipcc/cpr/win32/cpr_win_stdio.c', + 'signaling/src/sipcc/cpr/win32/cpr_win_timers.c', + 'signaling/src/sipcc/plat/common/dns_utils.c', + 'signaling/src/sipcc/plat/csf2g/reset_api.c', + 'signaling/src/sipcc/plat/win32/dns_utils.c', + 'signaling/src/sipcc/plat/win32/mystub.c', + 'signaling/src/sipcc/plat/win32/plat_api_stub.c', + 'signaling/src/sipcc/plat/win32/plat_api_win.c', 'signaling/src/softphonewrapper/CC_SIPCCCall.cpp', 'signaling/src/softphonewrapper/CC_SIPCCCallInfo.cpp', + 'signaling/src/softphonewrapper/CC_SIPCCCallServerInfo.cpp', + 'signaling/src/softphonewrapper/CC_SIPCCDevice.cpp', + 'signaling/src/softphonewrapper/CC_SIPCCDeviceInfo.cpp', + 'signaling/src/softphonewrapper/CC_SIPCCFeatureInfo.cpp', + 'signaling/src/softphonewrapper/CC_SIPCCLine.cpp', + 'signaling/src/softphonewrapper/CC_SIPCCLineInfo.cpp', 'signaling/src/softphonewrapper/CC_SIPCCService.cpp', 'signaling/src/softphonewrapper/ccapi_plat_api_impl.cpp', ] - # Excluded for various symbol conflicts - signaling_non_unified_sources_2 = [ - 'signaling/src/mediapipeline/MediaPipelineFilter.cpp', - 'signaling/src/mediapipeline/SrtpFlow.cpp', - 'signaling/src/sipcc/core/ccapp/ccapi_call_info.c', - 'signaling/src/sipcc/core/ccapp/ccprovider.c', - 'signaling/src/sipcc/core/common/platform_api.c', - 'signaling/src/sipcc/core/common/ui.c', - 'signaling/src/sipcc/core/gsm/ccapi_strings.c', - 'signaling/src/sipcc/core/gsm/fsm.c', - 'signaling/src/sipcc/core/gsm/fsmcac.c', - 'signaling/src/sipcc/core/gsm/fsmdef.c', - 'signaling/src/sipcc/core/sdp/sdp_base64.c', # Because of name clash with the macro PADDING - 'signaling/src/sipcc/core/sipstack/ccsip_cc.c', - 'signaling/src/sipcc/core/sipstack/sip_common_transport.c', - 'signaling/src/sipcc/core/sipstack/sip_platform_task.c', - 'signaling/src/sipcc/core/src-common/string_lib.c', - ] - GYP_DIRS['signaling'].non_unified_sources += signaling_non_unified_sources GYP_DIRS['signaling'].non_unified_sources += signaling_non_unified_sources_2 diff --git a/media/webrtc/signaling/src/common/browser_logging/CSFLog.h b/media/webrtc/signaling/src/common/browser_logging/CSFLog.h index 5db2f6b8978c..adf62019e4a9 100644 --- a/media/webrtc/signaling/src/common/browser_logging/CSFLog.h +++ b/media/webrtc/signaling/src/common/browser_logging/CSFLog.h @@ -5,6 +5,16 @@ #ifndef CSFLOG_H #define CSFLOG_H +// In order for FORCE_PR_LOG below to work, we have to define it before the +// first time prlog is #included. +#if defined(PR_LOG) +#error "Must #include CSFLog.h before before any IPDL-generated files or other files that #include prlog.h." +#endif + +#if defined(MOZ_LOGGING) +#define FORCE_PR_LOG +#endif + #include #include "prlog.h" diff --git a/netwerk/base/src/moz.build b/netwerk/base/src/moz.build index ebc0b3add70f..0fb2fc3a97c1 100644 --- a/netwerk/base/src/moz.build +++ b/netwerk/base/src/moz.build @@ -28,7 +28,6 @@ UNIFIED_SOURCES += [ 'EventTokenBucket.cpp', 'LoadContextInfo.cpp', 'NetworkActivityMonitor.cpp', - 'nsAsyncRedirectVerifyHelper.cpp', 'nsAsyncStreamCopier.cpp', 'nsAuthInformationHolder.cpp', 'nsBase64Encoder.cpp', @@ -60,8 +59,6 @@ UNIFIED_SOURCES += [ 'nsSimpleNestedURI.cpp', 'nsSimpleStreamListener.cpp', 'nsSimpleURI.cpp', - 'nsSocketTransport2.cpp', - 'nsSocketTransportService2.cpp', 'nsStandardURL.cpp', 'nsStreamListenerTee.cpp', 'nsStreamListenerWrapper.cpp', @@ -83,6 +80,13 @@ UNIFIED_SOURCES += [ 'TLSServerSocket.cpp', ] +# These files cannot be built in unified mode because they force NSPR logging. +SOURCES += [ + 'nsAsyncRedirectVerifyHelper.cpp', + 'nsSocketTransport2.cpp', + 'nsSocketTransportService2.cpp', +] + if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows': SOURCES += [ 'nsAutodialWin.cpp', diff --git a/netwerk/base/src/nsAsyncRedirectVerifyHelper.cpp b/netwerk/base/src/nsAsyncRedirectVerifyHelper.cpp index 3cec758ab587..b48ec6284d8d 100644 --- a/netwerk/base/src/nsAsyncRedirectVerifyHelper.cpp +++ b/netwerk/base/src/nsAsyncRedirectVerifyHelper.cpp @@ -3,6 +3,10 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#ifdef MOZ_LOGGING +#define FORCE_PR_LOG +#endif + #include "prlog.h" #include "nsAsyncRedirectVerifyHelper.h" #include "nsThreadUtils.h" diff --git a/netwerk/base/src/nsSocketTransport2.cpp b/netwerk/base/src/nsSocketTransport2.cpp index 20d8ac686ac4..19233f554e0e 100644 --- a/netwerk/base/src/nsSocketTransport2.cpp +++ b/netwerk/base/src/nsSocketTransport2.cpp @@ -4,6 +4,10 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#ifdef MOZ_LOGGING +#define FORCE_PR_LOG +#endif + #include "nsSocketTransport2.h" #include "mozilla/Attributes.h" diff --git a/netwerk/base/src/nsSocketTransportService2.cpp b/netwerk/base/src/nsSocketTransportService2.cpp index 1fd9e4053ba4..6c9ba3582b40 100644 --- a/netwerk/base/src/nsSocketTransportService2.cpp +++ b/netwerk/base/src/nsSocketTransportService2.cpp @@ -3,6 +3,10 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#ifdef MOZ_LOGGING +#define FORCE_PR_LOG +#endif + #include "nsSocketTransportService2.h" #include "nsSocketTransport2.h" #include "nsError.h" diff --git a/netwerk/cache/moz.build b/netwerk/cache/moz.build index f5d8c4db6d67..1726b81a0156 100644 --- a/netwerk/cache/moz.build +++ b/netwerk/cache/moz.build @@ -21,7 +21,8 @@ EXPORTS += [ 'nsDeleteDir.h' ] -UNIFIED_SOURCES += [ +# These files cannot be built in unified mode because they force NSPR logging. +SOURCES += [ 'nsApplicationCacheService.cpp', 'nsCache.cpp', 'nsCacheEntry.cpp', diff --git a/netwerk/cache/nsCache.h b/netwerk/cache/nsCache.h index 1c733dd7f1aa..c6c8a00aabee 100644 --- a/netwerk/cache/nsCache.h +++ b/netwerk/cache/nsCache.h @@ -11,6 +11,14 @@ #ifndef _nsCache_h_ #define _nsCache_h_ +#if defined(MOZ_LOGGING) +#define FORCE_PR_LOG +#endif + +#if defined(PR_LOG) +#error "If nsCache.h #included it must come before any files that #include prlog.h" +#endif + #include "prlog.h" #include "nsISupports.h" #include "nsIFile.h" diff --git a/netwerk/cache2/CacheLog.h b/netwerk/cache2/CacheLog.h index b6046b1ebab2..68b7887d0772 100644 --- a/netwerk/cache2/CacheLog.h +++ b/netwerk/cache2/CacheLog.h @@ -5,6 +5,14 @@ #ifndef Cache2Log__h__ #define Cache2Log__h__ +#if defined(MOZ_LOGGING) +#define FORCE_PR_LOG +#endif + +#if defined(PR_LOG) +#error "If nsCache.h #included it must come before any files that #include prlog.h" +#endif + #include "prlog.h" namespace mozilla { diff --git a/netwerk/cookie/moz.build b/netwerk/cookie/moz.build index e6189081a77e..2dbd53dc92a9 100644 --- a/netwerk/cookie/moz.build +++ b/netwerk/cookie/moz.build @@ -28,7 +28,7 @@ if CONFIG['NECKO_COOKIES']: 'CookieServiceParent.cpp', 'nsCookie.cpp', ] - # nsCookieService.cpp can't be unified because of symbol conflicts + # nsCookieService.cpp can't be unified because it forces NSPR logging. SOURCES += [ 'nsCookieService.cpp', ] diff --git a/netwerk/cookie/nsCookieService.cpp b/netwerk/cookie/nsCookieService.cpp index ef53b64bea27..8362f0442752 100644 --- a/netwerk/cookie/nsCookieService.cpp +++ b/netwerk/cookie/nsCookieService.cpp @@ -8,6 +8,11 @@ #include "mozilla/DebugOnly.h" #include "mozilla/Likely.h" +#ifdef MOZ_LOGGING +// this next define has to appear before the include of prlog.h +#define FORCE_PR_LOG // Allow logging in the release build +#endif + #include "mozilla/net/CookieServiceChild.h" #include "mozilla/net/NeckoCommon.h" diff --git a/netwerk/dns/GetAddrInfo.cpp b/netwerk/dns/GetAddrInfo.cpp index c4aec0880503..12ac74fe0c35 100644 --- a/netwerk/dns/GetAddrInfo.cpp +++ b/netwerk/dns/GetAddrInfo.cpp @@ -4,6 +4,10 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#if defined(MOZ_LOGGING) +#define FORCE_PR_LOG +#endif + #include "GetAddrInfo.h" #include "mozilla/net/DNS.h" #include "prnetdb.h" diff --git a/netwerk/dns/moz.build b/netwerk/dns/moz.build index 292346462057..a106daebdefc 100644 --- a/netwerk/dns/moz.build +++ b/netwerk/dns/moz.build @@ -25,8 +25,9 @@ EXPORTS.mozilla.net += [ ] SOURCES += [ + 'GetAddrInfo.cpp', # Excluded from UNIFIED_SOURCES due to NSPR forced logging. 'nsEffectiveTLDService.cpp', # Excluded from UNIFIED_SOURCES due to special build flags. - 'nsHostResolver.cpp', # Redefines LOG + 'nsHostResolver.cpp', # Excluded from UNIFIED_SOURCES due to NSPR forced logging. ] UNIFIED_SOURCES += [ @@ -35,7 +36,6 @@ UNIFIED_SOURCES += [ 'DNSListenerProxy.cpp', 'DNSRequestChild.cpp', 'DNSRequestParent.cpp', - 'GetAddrInfo.cpp', 'nameprep.c', 'nsDNSService2.cpp', 'nsIDNService.cpp', diff --git a/netwerk/dns/nsHostResolver.cpp b/netwerk/dns/nsHostResolver.cpp index 7687503686e7..c38279263365 100644 --- a/netwerk/dns/nsHostResolver.cpp +++ b/netwerk/dns/nsHostResolver.cpp @@ -3,6 +3,10 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#if defined(MOZ_LOGGING) +#define FORCE_PR_LOG +#endif + #if defined(HAVE_RES_NINIT) #include #include diff --git a/netwerk/protocol/http/HttpLog.h b/netwerk/protocol/http/HttpLog.h index e750f9dc4cbc..a7a87a73efbc 100644 --- a/netwerk/protocol/http/HttpLog.h +++ b/netwerk/protocol/http/HttpLog.h @@ -18,6 +18,27 @@ * Yes, this is kludgy. *******************************************************************************/ + +// e10s mess: IPDL-generated headers include chromium files that both #include +// prlog.h, and #define LOG in conflict with this file. +// Solution: (as described in bug 545995) +// 1) ensure that this file is #included before any IPDL-generated files and +// anything else that #includes prlog.h, so that we can make sure prlog.h +// sees FORCE_PR_LOG +// 2) #include IPDL boilerplate, and then undef LOG so our LOG wins. +// 3) nsNetModule.cpp does its own crazy stuff with #including prlog.h +// multiple times; allow it to define ALLOW_LATE_HTTPLOG_H_INCLUDE to bypass +// check. +#if defined(PR_LOG) && !defined(ALLOW_LATE_HTTPLOG_H_INCLUDE) +#error "If HttpLog.h #included it must come before any IPDL-generated files or other files that #include prlog.h" +#endif + +// NeckoChild.h will include chromium, which will include prlog.h so define +// PR_FORCE before we do that. +#if defined(MOZ_LOGGING) +#define FORCE_PR_LOG +#endif + #include "mozilla/net/NeckoChild.h" // Get rid of Chromium's LOG definition diff --git a/netwerk/protocol/http/moz.build b/netwerk/protocol/http/moz.build index 936df93cbdd3..0b638e8bec2f 100644 --- a/netwerk/protocol/http/moz.build +++ b/netwerk/protocol/http/moz.build @@ -39,13 +39,10 @@ EXPORTS.mozilla.net += [ # ASpdySession.cpp and nsHttpAuthCache cannot be built in unified mode because # they use plarena.h. +# The rest of these files cannot be built in unified mode because they want to +# force NSPR logging. SOURCES += [ 'ASpdySession.cpp', - 'nsHttpAuthCache.cpp', - 'nsHttpChannelAuthProvider.cpp', # redefines GetAuthType -] - -UNIFIED_SOURCES += [ 'ConnectionDiagnostics.cpp', 'Http2Compression.cpp', 'Http2Push.cpp', @@ -58,9 +55,11 @@ UNIFIED_SOURCES += [ 'HttpInfo.cpp', 'nsHttp.cpp', 'nsHttpActivityDistributor.cpp', + 'nsHttpAuthCache.cpp', 'nsHttpAuthManager.cpp', 'nsHttpBasicAuth.cpp', 'nsHttpChannel.cpp', + 'nsHttpChannelAuthProvider.cpp', 'nsHttpChunkedDecoder.cpp', 'nsHttpConnection.cpp', 'nsHttpConnectionInfo.cpp', diff --git a/netwerk/protocol/rtsp/moz.build b/netwerk/protocol/rtsp/moz.build index 3af0e59d295c..e4c70036a0cf 100644 --- a/netwerk/protocol/rtsp/moz.build +++ b/netwerk/protocol/rtsp/moz.build @@ -14,7 +14,8 @@ EXPORTS.mozilla.net += [ 'RtspHandler.h', ] -UNIFIED_SOURCES += [ +# These files cannot be built in unified mode because they force NSPR logging. +SOURCES += [ 'controller/RtspController.cpp', 'controller/RtspControllerChild.cpp', 'controller/RtspControllerParent.cpp', diff --git a/netwerk/protocol/websocket/WebSocketLog.h b/netwerk/protocol/websocket/WebSocketLog.h index b0730acba130..9c70331d5184 100644 --- a/netwerk/protocol/websocket/WebSocketLog.h +++ b/netwerk/protocol/websocket/WebSocketLog.h @@ -7,6 +7,14 @@ #ifndef WebSocketLog_h #define WebSocketLog_h +#ifdef MOZ_LOGGING +#define FORCE_PR_LOG +#endif + +#if defined(PR_LOG) +#error "This file must be #included before any IPDL-generated files or other files that #include prlog.h" +#endif + #include "base/basictypes.h" #include "prlog.h" #include "mozilla/net/NeckoChild.h" diff --git a/netwerk/protocol/wyciwyg/nsWyciwyg.h b/netwerk/protocol/wyciwyg/nsWyciwyg.h index 60b3b4509151..689032f937c7 100644 --- a/netwerk/protocol/wyciwyg/nsWyciwyg.h +++ b/netwerk/protocol/wyciwyg/nsWyciwyg.h @@ -5,9 +5,24 @@ #ifndef nsWyciwyg_h__ #define nsWyciwyg_h__ -#include "mozilla/net/NeckoChild.h" +#if defined(MOZ_LOGGING) +#define FORCE_PR_LOG +#endif -// Get rid of chromium's LOG. +// e10s mess: IPDL-generatd headers include chromium which both #includes +// prlog.h, and #defines LOG in conflict with this file. +// Solution: (as described in bug 545995) +// 1) ensure that this file is #included before any IPDL-generated files and +// anything else that #includes prlog.h, so that we can make sure prlog.h +// sees FORCE_PR_LOG if needed. +// 2) #include IPDL boilerplate, and then undef LOG so our LOG wins. +// 3) nsNetModule.cpp does its own crazy stuff with #including prlog.h +// multiple times; allow it to define ALLOW_LATE_NSHTTP_H_INCLUDE to bypass +// check. +#if defined(PR_LOG) && !defined(ALLOW_LATE_NSHTTP_H_INCLUDE) +#error "If nsWyciwyg.h #included it must come before any IPDL-generated files or other files that #include prlog.h" +#endif +#include "mozilla/net/NeckoChild.h" #undef LOG #include "prlog.h" diff --git a/netwerk/sctp/datachannel/DataChannelLog.h b/netwerk/sctp/datachannel/DataChannelLog.h index 447a948b24d4..50c7b4e71f79 100644 --- a/netwerk/sctp/datachannel/DataChannelLog.h +++ b/netwerk/sctp/datachannel/DataChannelLog.h @@ -7,6 +7,14 @@ #ifndef DataChannelLog_h #define DataChannelLog_h +#ifdef MOZ_LOGGING +#define FORCE_PR_LOG +#endif + +#if defined(PR_LOG) +#error "This file must be #included before any IPDL-generated files or other files that #include prlog.h" +#endif + #include "base/basictypes.h" #include "prlog.h" diff --git a/netwerk/test/TestProtocols.cpp b/netwerk/test/TestProtocols.cpp index c5ed54dec9e1..3e147adecd58 100644 --- a/netwerk/test/TestProtocols.cpp +++ b/netwerk/test/TestProtocols.cpp @@ -15,6 +15,7 @@ #include "TestCommon.h" #include +#define FORCE_PR_LOG #include #ifdef WIN32 #include diff --git a/python/mozbuild/mozbuild/backend/recursivemake.py b/python/mozbuild/mozbuild/backend/recursivemake.py index 6bf9a7a70f6d..574100f15178 100644 --- a/python/mozbuild/mozbuild/backend/recursivemake.py +++ b/python/mozbuild/mozbuild/backend/recursivemake.py @@ -646,6 +646,11 @@ class RecursiveMakeBackend(CommonBackend): 'so it cannot be built in unified mode."\n' '#undef PL_ARENA_CONST_ALIGN_MASK\n' '#endif\n' + '#ifdef FORCE_PR_LOG\n' + '#error "%(cppfile)s forces NSPR logging, ' + 'so it cannot be built in unified mode."\n' + '#undef FORCE_PR_LOG\n' + '#endif\n' '#ifdef INITGUID\n' '#error "%(cppfile)s defines INITGUID, ' 'so it cannot be built in unified mode."\n' diff --git a/security/apps/AppSignatureVerification.cpp b/security/apps/AppSignatureVerification.cpp index 14210d426562..8b3623c52978 100644 --- a/security/apps/AppSignatureVerification.cpp +++ b/security/apps/AppSignatureVerification.cpp @@ -4,6 +4,10 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#ifdef MOZ_LOGGING +#define FORCE_PR_LOG 1 +#endif + #include "nsNSSCertificateDB.h" #include "pkix/pkix.h" diff --git a/security/apps/AppTrustDomain.cpp b/security/apps/AppTrustDomain.cpp index 0723aca1c6f5..da0361270546 100644 --- a/security/apps/AppTrustDomain.cpp +++ b/security/apps/AppTrustDomain.cpp @@ -4,6 +4,10 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#ifdef MOZ_LOGGING +#define FORCE_PR_LOG 1 +#endif + #include "AppTrustDomain.h" #include "certdb.h" #include "pkix/pkixnss.h" diff --git a/security/apps/moz.build b/security/apps/moz.build index 2827da80ccf6..9efda27c7174 100644 --- a/security/apps/moz.build +++ b/security/apps/moz.build @@ -4,7 +4,8 @@ # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. -UNIFIED_SOURCES += [ +# These cannot be built in unified mode because they force NSPR logging. +SOURCES += [ 'AppSignatureVerification.cpp', 'AppTrustDomain.cpp', ] diff --git a/security/manager/boot/src/moz.build b/security/manager/boot/src/moz.build index ddec498eb467..6120eed63835 100644 --- a/security/manager/boot/src/moz.build +++ b/security/manager/boot/src/moz.build @@ -12,13 +12,18 @@ UNIFIED_SOURCES += [ 'DataStorage.cpp', 'nsBOOTModule.cpp', 'nsEntropyCollector.cpp', - 'nsSecureBrowserUIImpl.cpp', 'nsSecurityHeaderParser.cpp', 'nsSecurityWarningDialogs.cpp', 'nsSiteSecurityService.cpp', 'PublicKeyPinningService.cpp', ] +# nsSecureBrowserUIImpl.cpp cannot be built in unified mode because it forces NSPR logging. +SOURCES += [ + 'nsSecureBrowserUIImpl.cpp', +] + + LOCAL_INCLUDES += [ '../../../pkix/include', ] diff --git a/security/manager/boot/src/nsSecureBrowserUIImpl.cpp b/security/manager/boot/src/nsSecureBrowserUIImpl.cpp index ed72f2870640..ce0cea47e692 100644 --- a/security/manager/boot/src/nsSecureBrowserUIImpl.cpp +++ b/security/manager/boot/src/nsSecureBrowserUIImpl.cpp @@ -3,6 +3,10 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#ifdef MOZ_LOGGING +#define FORCE_PR_LOG +#endif + #include "nspr.h" #include "prlog.h" diff --git a/security/manager/ssl/src/PSMContentListener.cpp b/security/manager/ssl/src/PSMContentListener.cpp index cd819805c221..5aaa46cd0f67 100644 --- a/security/manager/ssl/src/PSMContentListener.cpp +++ b/security/manager/ssl/src/PSMContentListener.cpp @@ -4,6 +4,10 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#ifdef MOZ_LOGGING +#define FORCE_PR_LOG 1 +#endif + #include "PSMContentListener.h" #include "nsIStreamListener.h" diff --git a/security/manager/ssl/src/nsCryptoHash.cpp b/security/manager/ssl/src/nsCryptoHash.cpp index 8dcba891311d..e49abb9b6caf 100644 --- a/security/manager/ssl/src/nsCryptoHash.cpp +++ b/security/manager/ssl/src/nsCryptoHash.cpp @@ -4,6 +4,10 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#ifdef MOZ_LOGGING +#define FORCE_PR_LOG 1 +#endif + #include #include "nsCryptoHash.h" diff --git a/security/manager/ssl/src/nsNSSComponent.cpp b/security/manager/ssl/src/nsNSSComponent.cpp index 8cab67bc180c..0f6b3596ef35 100644 --- a/security/manager/ssl/src/nsNSSComponent.cpp +++ b/security/manager/ssl/src/nsNSSComponent.cpp @@ -4,6 +4,10 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#ifdef MOZ_LOGGING +#define FORCE_PR_LOG 1 +#endif + #include "nsNSSComponent.h" #include "ExtendedValidation.h" diff --git a/uriloader/base/nsURILoader.h b/uriloader/base/nsURILoader.h index 0c3cb920abcf..929f9ad8791c 100644 --- a/uriloader/base/nsURILoader.h +++ b/uriloader/base/nsURILoader.h @@ -16,6 +16,10 @@ #include "nsIWeakReference.h" #include "mozilla/Attributes.h" +#ifdef MOZ_LOGGING +// Uncomment the next line to force logging on in release builds +// #define FORCE_PR_LOG +#endif #include "prlog.h" class nsDocumentOpenInfo; diff --git a/uriloader/exthandler/moz.build b/uriloader/exthandler/moz.build index 8e1d703e7f5d..bb53e1d476b6 100644 --- a/uriloader/exthandler/moz.build +++ b/uriloader/exthandler/moz.build @@ -51,22 +51,29 @@ EXPORTS.mozilla.dom += [ ] UNIFIED_SOURCES += [ - 'ExternalHelperAppChild.cpp', 'ExternalHelperAppParent.cpp', - 'nsExternalHelperAppService.cpp', - 'nsExternalProtocolHandler.cpp', 'nsLocalHandlerApp.cpp', 'nsMIMEInfoImpl.cpp', ] +# These files can't be built in unified mode because they force NSPR logging. +SOURCES += [ + 'ExternalHelperAppChild.cpp', + 'nsExternalHelperAppService.cpp', + 'nsExternalProtocolHandler.cpp', +] + if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa': UNIFIED_SOURCES += [ 'mac/nsLocalHandlerAppMac.mm', 'mac/nsMIMEInfoMac.mm', + ] + # These files can't be built in unified mode because they force NSPR logging. + SOURCES += [ 'mac/nsOSHelperAppService.mm', ] else: - # These files can't be built in unified mode because they redefine LOG. + # These files can't be built in unified mode because they force NSPR logging. SOURCES += [ osdir + '/nsOSHelperAppService.cpp', ] @@ -89,7 +96,8 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'qt': 'unix/nsMIMEInfoUnix.cpp', ] elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows': - UNIFIED_SOURCES += [ + # These files can't be built in unified mode because they force NSPR logging. + SOURCES += [ 'win/nsMIMEInfoWin.cpp', ] diff --git a/uriloader/exthandler/nsExternalHelperAppService.cpp b/uriloader/exthandler/nsExternalHelperAppService.cpp index 54408199974a..85475533bc99 100644 --- a/uriloader/exthandler/nsExternalHelperAppService.cpp +++ b/uriloader/exthandler/nsExternalHelperAppService.cpp @@ -4,6 +4,10 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#ifdef MOZ_LOGGING +#define FORCE_PR_LOG +#endif + #include "base/basictypes.h" /* This must occur *after* base/basictypes.h to avoid typedefs conflicts. */ diff --git a/uriloader/exthandler/nsExternalHelperAppService.h b/uriloader/exthandler/nsExternalHelperAppService.h index 114106a8c45a..8f3fec50b37f 100644 --- a/uriloader/exthandler/nsExternalHelperAppService.h +++ b/uriloader/exthandler/nsExternalHelperAppService.h @@ -6,6 +6,9 @@ #ifndef nsExternalHelperAppService_h__ #define nsExternalHelperAppService_h__ +#ifdef MOZ_LOGGING +#define FORCE_PR_LOG +#endif #include "prlog.h" #include "prtime.h" diff --git a/uriloader/prefetch/moz.build b/uriloader/prefetch/moz.build index 09702a783f8e..2a52a0c6a7ce 100644 --- a/uriloader/prefetch/moz.build +++ b/uriloader/prefetch/moz.build @@ -21,14 +21,18 @@ EXPORTS.mozilla.docshell += [ ] UNIFIED_SOURCES += [ - 'nsOfflineCacheUpdate.cpp', - 'nsOfflineCacheUpdateService.cpp', 'nsPrefetchService.cpp', 'OfflineCacheUpdateChild.cpp', 'OfflineCacheUpdateGlue.cpp', 'OfflineCacheUpdateParent.cpp', ] +# These files can't be built in unified mode because they force NSPR logging. +SOURCES += [ + 'nsOfflineCacheUpdate.cpp', + 'nsOfflineCacheUpdateService.cpp', +] + IPDL_SOURCES += [ 'POfflineCacheUpdate.ipdl', ] diff --git a/uriloader/prefetch/nsOfflineCacheUpdate.cpp b/uriloader/prefetch/nsOfflineCacheUpdate.cpp index efc704af89cb..305296309206 100644 --- a/uriloader/prefetch/nsOfflineCacheUpdate.cpp +++ b/uriloader/prefetch/nsOfflineCacheUpdate.cpp @@ -3,6 +3,10 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#if defined(MOZ_LOGGING) +#define FORCE_PR_LOG +#endif + #include "nsOfflineCacheUpdate.h" #include "nsCPrefetchService.h" diff --git a/uriloader/prefetch/nsOfflineCacheUpdateService.cpp b/uriloader/prefetch/nsOfflineCacheUpdateService.cpp index e18ebb494293..65494b5b5e65 100644 --- a/uriloader/prefetch/nsOfflineCacheUpdateService.cpp +++ b/uriloader/prefetch/nsOfflineCacheUpdateService.cpp @@ -3,6 +3,10 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#if defined(MOZ_LOGGING) +#define FORCE_PR_LOG +#endif + #include "OfflineCacheUpdateChild.h" #include "OfflineCacheUpdateParent.h" #include "nsXULAppAPI.h" diff --git a/widget/android/nsAppShell.cpp b/widget/android/nsAppShell.cpp index fe39eab45fd8..8108035f7ad0 100644 --- a/widget/android/nsAppShell.cpp +++ b/widget/android/nsAppShell.cpp @@ -51,6 +51,7 @@ #endif #ifdef MOZ_LOGGING +#define FORCE_PR_LOG #include "prlog.h" #endif diff --git a/widget/cocoa/TextInputHandler.mm b/widget/cocoa/TextInputHandler.mm index 3e0a8473db9b..bb7b295e2fac 100644 --- a/widget/cocoa/TextInputHandler.mm +++ b/widget/cocoa/TextInputHandler.mm @@ -8,6 +8,9 @@ #include "TextInputHandler.h" +#ifdef MOZ_LOGGING +#define FORCE_PR_LOG /* Allow logging in the release build */ +#endif // MOZ_LOGGING #include "prlog.h" #include "mozilla/MiscEvents.h" @@ -27,6 +30,11 @@ #include #endif // __LP64__ +#ifdef MOZ_LOGGING +#define FORCE_PR_LOG +#endif +#include "prlog.h" + #ifndef __LP64__ enum { // Currently focused ChildView (while this TSM document is active). diff --git a/widget/cocoa/moz.build b/widget/cocoa/moz.build index 3c42e6157104..cff627770feb 100644 --- a/widget/cocoa/moz.build +++ b/widget/cocoa/moz.build @@ -28,7 +28,6 @@ UNIFIED_SOURCES += [ 'nsColorPicker.mm', 'nsCursorManager.mm', 'nsDeviceContextSpecX.mm', - 'nsDragService.mm', 'nsFilePicker.mm', 'nsIdleServiceX.mm', 'nsLookAndFeel.mm', @@ -54,15 +53,16 @@ UNIFIED_SOURCES += [ 'nsWidgetFactory.mm', 'nsWindowMap.mm', 'OSXNotificationCenter.mm', - 'TextInputHandler.mm', 'VibrancyManager.mm', 'WidgetTraceEvent.mm', ] -# These files cannot be built in unified mode because they cause symbol conflicts +# These files cannot be built in unified mode because they force NSPR logging. SOURCES += [ 'nsChildView.mm', 'nsClipboard.mm', + 'nsDragService.mm', + 'TextInputHandler.mm', ] if CONFIG['TARGET_CPU'] == 'x86_64': diff --git a/widget/cocoa/nsChildView.mm b/widget/cocoa/nsChildView.mm index 94c1cbc521c6..fba9b1fb4583 100644 --- a/widget/cocoa/nsChildView.mm +++ b/widget/cocoa/nsChildView.mm @@ -5,6 +5,9 @@ #include "mozilla/ArrayUtils.h" +#ifdef MOZ_LOGGING +#define FORCE_PR_LOG +#endif #include "prlog.h" #include diff --git a/widget/cocoa/nsClipboard.mm b/widget/cocoa/nsClipboard.mm index b43b42f73e28..497534e1cd18 100644 --- a/widget/cocoa/nsClipboard.mm +++ b/widget/cocoa/nsClipboard.mm @@ -3,6 +3,9 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#ifdef MOZ_LOGGING +#define FORCE_PR_LOG +#endif #include "prlog.h" #include "gfxPlatform.h" diff --git a/widget/cocoa/nsDragService.mm b/widget/cocoa/nsDragService.mm index c3bef08e5d99..043a5cf95e80 100644 --- a/widget/cocoa/nsDragService.mm +++ b/widget/cocoa/nsDragService.mm @@ -3,6 +3,9 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#ifdef MOZ_LOGGING +#define FORCE_PR_LOG +#endif #include "prlog.h" #include "nsDragService.h" diff --git a/widget/gtk/moz.build b/widget/gtk/moz.build index 7a3cb7af2802..3a3e7476f3ff 100644 --- a/widget/gtk/moz.build +++ b/widget/gtk/moz.build @@ -16,11 +16,9 @@ EXPORTS += [ UNIFIED_SOURCES += [ 'mozcontainer.c', 'NativeKeyBindings.cpp', - 'nsAppShell.cpp', 'nsBidiKeyboard.cpp', 'nsColorPicker.cpp', 'nsFilePicker.cpp', - 'nsGtkIMModule.cpp', 'nsGtkKeyUtils.cpp', 'nsImageToPixbuf.cpp', 'nsLookAndFeel.cpp', @@ -29,13 +27,16 @@ UNIFIED_SOURCES += [ 'nsScreenManagerGtk.cpp', 'nsSound.cpp', 'nsToolkit.cpp', - 'nsWidgetFactory.cpp', 'WakeLockListener.cpp', 'WidgetTraceEvent.cpp', ] +# These files force-enable NSPR logging and thus cannot be built in unified mode SOURCES += [ - 'nsWindow.cpp', # conflicts with X11 headers + 'nsAppShell.cpp', + 'nsGtkIMModule.cpp', + 'nsWidgetFactory.cpp', + 'nsWindow.cpp', ] if CONFIG['MOZ_X11']: @@ -46,17 +47,23 @@ if CONFIG['MOZ_X11']: if CONFIG['NS_PRINTING']: UNIFIED_SOURCES += [ 'nsCUPSShim.cpp', - 'nsDeviceContextSpecG.cpp', 'nsPaperPS.cpp', 'nsPrintDialogGTK.cpp', 'nsPrintOptionsGTK.cpp', 'nsPrintSettingsGTK.cpp', 'nsPSPrinters.cpp', ] + # This file force-enables NSPR logging and thus cannot be built in unified mode + SOURCES += [ + 'nsDeviceContextSpecG.cpp', + ] if CONFIG['MOZ_X11']: UNIFIED_SOURCES += [ 'nsClipboard.cpp', + ] + # This file force-enables NSPR logging and thus cannot be built in unified mode + SOURCES += [ 'nsDragService.cpp', ] diff --git a/widget/gtk/nsDeviceContextSpecG.cpp b/widget/gtk/nsDeviceContextSpecG.cpp index b6efed3dfc2f..cbc5312a13a0 100644 --- a/widget/gtk/nsDeviceContextSpecG.cpp +++ b/widget/gtk/nsDeviceContextSpecG.cpp @@ -3,6 +3,9 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#ifdef MOZ_LOGGING +#define FORCE_PR_LOG 1 /* Allow logging in the release build */ +#endif /* MOZ_LOGGING */ #include "prlog.h" #include "plstr.h" diff --git a/widget/gtk/nsGtkIMModule.cpp b/widget/gtk/nsGtkIMModule.cpp index 0bbde954b455..3334e9380f3e 100644 --- a/widget/gtk/nsGtkIMModule.cpp +++ b/widget/gtk/nsGtkIMModule.cpp @@ -4,6 +4,9 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#ifdef MOZ_LOGGING +#define FORCE_PR_LOG /* Allow logging in the release build */ +#endif // MOZ_LOGGING #include "prlog.h" #include "prtime.h" diff --git a/widget/gtk/nsWindow.h b/widget/gtk/nsWindow.h index cd4bd9c60b15..10c88d307b9b 100644 --- a/widget/gtk/nsWindow.h +++ b/widget/gtk/nsWindow.h @@ -37,6 +37,9 @@ #undef LOG #ifdef MOZ_LOGGING +// make sure that logging is enabled before including prlog.h +#define FORCE_PR_LOG + #include "prlog.h" #include "nsTArray.h" diff --git a/widget/qt/nsAppShell.cpp b/widget/qt/nsAppShell.cpp index db835236a16b..4eebd7876c12 100644 --- a/widget/qt/nsAppShell.cpp +++ b/widget/qt/nsAppShell.cpp @@ -18,6 +18,7 @@ #include "nsQAppInstance.h" #ifdef MOZ_LOGGING +#define FORCE_PR_LOG #include "prlog.h" #endif diff --git a/widget/qt/nsDeviceContextSpecQt.cpp b/widget/qt/nsDeviceContextSpecQt.cpp index ea2fc0808891..12c93db11677 100644 --- a/widget/qt/nsDeviceContextSpecQt.cpp +++ b/widget/qt/nsDeviceContextSpecQt.cpp @@ -10,6 +10,9 @@ #define SET_PRINTER_FEATURES_VIA_PREFS 1 #define PRINTERFEATURES_PREF "print.tmp.printerfeatures" +#ifdef MOZ_LOGGING +#define FORCE_PR_LOG 1 /* Allow logging in the release build */ +#endif /* MOZ_LOGGING */ #include "prlog.h" #include "plstr.h" diff --git a/widget/qt/nsWindow.h b/widget/qt/nsWindow.h index 14510abcdda2..1977d6c4eb92 100644 --- a/widget/qt/nsWindow.h +++ b/widget/qt/nsWindow.h @@ -23,6 +23,9 @@ #ifdef MOZ_LOGGING +// make sure that logging is enabled before including prlog.h +#define FORCE_PR_LOG + #include "prlog.h" #include "nsTArray.h" diff --git a/widget/windows/KeyboardLayout.cpp b/widget/windows/KeyboardLayout.cpp index 6dd5b5a2f9e9..162e4beffc15 100644 --- a/widget/windows/KeyboardLayout.cpp +++ b/widget/windows/KeyboardLayout.cpp @@ -3,6 +3,9 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#ifdef MOZ_LOGGING +#define FORCE_PR_LOG /* Allow logging in the release build */ +#endif // MOZ_LOGGING #include "prlog.h" #include "mozilla/ArrayUtils.h" diff --git a/widget/windows/WinMouseScrollHandler.cpp b/widget/windows/WinMouseScrollHandler.cpp index ac8bd81d8fce..d9e4d5c61be0 100644 --- a/widget/windows/WinMouseScrollHandler.cpp +++ b/widget/windows/WinMouseScrollHandler.cpp @@ -6,6 +6,9 @@ #include "mozilla/DebugOnly.h" +#ifdef MOZ_LOGGING +#define FORCE_PR_LOG /* Allow logging in the release build */ +#endif // MOZ_LOGGING #include "prlog.h" #include "WinMouseScrollHandler.h" diff --git a/widget/windows/WinUtils.cpp b/widget/windows/WinUtils.cpp index 70e81bd90674..b14fd20da004 100644 --- a/widget/windows/WinUtils.cpp +++ b/widget/windows/WinUtils.cpp @@ -20,6 +20,9 @@ #include "nsIContentPolicy.h" #include "nsContentUtils.h" +#ifdef MOZ_LOGGING +#define FORCE_PR_LOG /* Allow logging in the release build */ +#endif // MOZ_LOGGING #include "prlog.h" #include "nsString.h" diff --git a/widget/windows/moz.build b/widget/windows/moz.build index 5d00d568d77c..bcd5aeb34c67 100644 --- a/widget/windows/moz.build +++ b/widget/windows/moz.build @@ -24,7 +24,6 @@ UNIFIED_SOURCES += [ 'GfxInfo.cpp', 'IEnumFE.cpp', 'JumpListItem.cpp', - 'KeyboardLayout.cpp', 'nsAppShell.cpp', 'nsClipboard.cpp', 'nsColorPicker.cpp', @@ -33,7 +32,6 @@ UNIFIED_SOURCES += [ 'nsDragService.cpp', 'nsIdleServiceWin.cpp', 'nsImageClipboard.cpp', - 'nsIMM32Handler.cpp', 'nsLookAndFeel.cpp', 'nsNativeDragSource.cpp', 'nsNativeDragTarget.cpp', @@ -55,8 +53,14 @@ UNIFIED_SOURCES += [ 'WidgetTraceEvent.cpp', 'WindowHook.cpp', 'WinIMEHandler.cpp', - 'WinMouseScrollHandler.cpp', 'WinTaskbar.cpp', +] + +# The following files cannot be built in unified mode because they force NSPR logging. +SOURCES += [ + 'KeyboardLayout.cpp', + 'nsIMM32Handler.cpp', + 'WinMouseScrollHandler.cpp', 'WinUtils.cpp', ] diff --git a/widget/windows/nsIMM32Handler.cpp b/widget/windows/nsIMM32Handler.cpp index d1dadb50dcd5..ca4b8001262a 100644 --- a/widget/windows/nsIMM32Handler.cpp +++ b/widget/windows/nsIMM32Handler.cpp @@ -4,6 +4,9 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#ifdef MOZ_LOGGING +#define FORCE_PR_LOG /* Allow logging in the release build */ +#endif // MOZ_LOGGING #include "prlog.h" #include "nsIMM32Handler.h" diff --git a/widget/windows/nsTextStore.cpp b/widget/windows/nsTextStore.cpp index 6300f52a3c8d..7edf0e34fec3 100644 --- a/widget/windows/nsTextStore.cpp +++ b/widget/windows/nsTextStore.cpp @@ -6,6 +6,9 @@ #include #include +#ifdef MOZ_LOGGING +#define FORCE_PR_LOG /* Allow logging in the release build */ +#endif // MOZ_LOGGING #include "prlog.h" #include "nscore.h" diff --git a/xpcom/components/moz.build b/xpcom/components/moz.build index 3018b66a5fdf..d337fd9f6b74 100644 --- a/xpcom/components/moz.build +++ b/xpcom/components/moz.build @@ -29,13 +29,12 @@ EXPORTS.mozilla += [ # nsCategoryManager.cpp and nsComponentManager.cpp cannot be built in # unified mode because they use thea PL_ARENA_CONST_ALIGN_MASK macro # with plarena.h. +# nsNativeModuleLoader.cpp cannot be built in unified mode because it +# forces NSPR logging. SOURCES += [ + 'ManifestParser.cpp', 'nsCategoryManager.cpp', 'nsComponentManager.cpp', -] - -UNIFIED_SOURCES += [ - 'ManifestParser.cpp', 'nsNativeModuleLoader.cpp', ] diff --git a/xpcom/components/nsNativeModuleLoader.cpp b/xpcom/components/nsNativeModuleLoader.cpp index 558b0322981e..39b8a2329d3c 100644 --- a/xpcom/components/nsNativeModuleLoader.cpp +++ b/xpcom/components/nsNativeModuleLoader.cpp @@ -14,6 +14,11 @@ * 04/20/2000 IBM Corp. Added PR_CALLBACK for Optlink use in OS2 */ +/* Allow logging in the release build */ +#ifdef MOZ_LOGGING +#define FORCE_PR_LOG +#endif + #include "nsNativeModuleLoader.h" #include "prlog.h" diff --git a/xpcom/threads/nsTimerImpl.h b/xpcom/threads/nsTimerImpl.h index fc1c539c6c55..97628a94bcce 100644 --- a/xpcom/threads/nsTimerImpl.h +++ b/xpcom/threads/nsTimerImpl.h @@ -7,6 +7,8 @@ #ifndef nsTimerImpl_h___ #define nsTimerImpl_h___ +//#define FORCE_PR_LOG /* Allow logging in the release build */ + #include "nsITimer.h" #include "nsIEventTarget.h" #include "nsIObserver.h"