Bug 942489 - Deunify more files that are caught by bug 941854; r=BenWa
authorEhsan Akhgari <ehsan@mozilla.com>
Sun, 24 Nov 2013 01:29:24 -0500
changeset 157264 9c7abb00b6973ff43cb39ef5938229a9ffcd8990
parent 157263 c7c9fae33603cdaab89c45562bf06dc7d74a7c59
child 157265 6876446129979f4508cc783c09e7a8d8f17e1e4d
push idunknown
push userunknown
push dateunknown
reviewersBenWa
bugs942489, 941854
milestone28.0a1
Bug 942489 - Deunify more files that are caught by bug 941854; r=BenWa
content/media/moz.build
docshell/base/moz.build
dom/base/moz.build
extensions/auth/moz.build
extensions/pref/autoconfig/src/moz.build
layout/base/moz.build
layout/base/nsStyleSheetService.cpp
layout/printing/moz.build
layout/style/moz.build
netwerk/base/src/moz.build
netwerk/dns/moz.build
netwerk/dns/nsHostResolver.cpp
xpcom/components/moz.build
--- a/content/media/moz.build
+++ b/content/media/moz.build
@@ -112,17 +112,16 @@ UNIFIED_SOURCES += [
     'AudioNodeStream.cpp',
     'AudioSegment.cpp',
     'AudioStream.cpp',
     'AudioStreamTrack.cpp',
     'BufferDecoder.cpp',
     'DOMMediaStream.cpp',
     'EncodedBufferCache.cpp',
     'FileBlockCache.cpp',
-    'Latency.cpp',
     'MediaCache.cpp',
     'MediaDecoder.cpp',
     'MediaDecoderReader.cpp',
     'MediaDecoderStateMachine.cpp',
     'MediaRecorder.cpp',
     'MediaResource.cpp',
     'MediaStreamGraph.cpp',
     'MediaStreamTrack.cpp',
@@ -139,18 +138,20 @@ UNIFIED_SOURCES += [
     'VideoPlaybackQuality.cpp',
     'VideoSegment.cpp',
     'VideoStreamTrack.cpp',
     'VideoUtils.cpp',
     'WebVTTListener.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
 
 if CONFIG['CPU_ARCH'] == 'arm' and CONFIG['BUILD_ARM_NEON']:
     SOURCES += [
         'AudioNodeEngineNEON.cpp',
     ]
--- a/docshell/base/moz.build
+++ b/docshell/base/moz.build
@@ -46,27 +46,31 @@ EXPORTS.mozilla += [
     'IHistory.h',
     'LoadContext.h',
 ]
 
 UNIFIED_SOURCES += [
     'LoadContext.cpp',
     'nsAboutRedirector.cpp',
     'nsDefaultURIFixup.cpp',
-    'nsDocShell.cpp',
     'nsDocShellEditorData.cpp',
     'nsDocShellEnumerator.cpp',
     'nsDocShellLoadInfo.cpp',
     'nsDocShellTransferableHooks.cpp',
     'nsDownloadHistory.cpp',
     'nsDSURIContentListener.cpp',
     'nsWebNavigationInfo.cpp',
     '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
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
 LOCAL_INCLUDES += [
--- a/dom/base/moz.build
+++ b/dom/base/moz.build
@@ -77,17 +77,16 @@ UNIFIED_SOURCES += [
     'nsContentPermissionHelper.cpp',
     'nsDOMClassInfo.cpp',
     'nsDOMNavigationTiming.cpp',
     'nsDOMScriptObjectFactory.cpp',
     'nsDOMWindowList.cpp',
     'nsFocusManager.cpp',
     'nsGlobalWindowCommands.cpp',
     'nsHistory.cpp',
-    'nsJSEnvironment.cpp',
     'nsJSTimeoutHandler.cpp',
     'nsJSUtils.cpp',
     'nsLocation.cpp',
     'nsMimeTypeArray.cpp',
     'nsPerformance.cpp',
     'nsQueryContentEventResult.cpp',
     'nsScreen.cpp',
     'nsScriptNameSpaceManager.cpp',
@@ -102,16 +101,18 @@ UNIFIED_SOURCES += [
 # these files couldn't be in UNIFIED_SOURCES for now for reasons given below:
 SOURCES += [
     # this file doesn't like windows.h
     'MessagePort.cpp',
     # this file doesn't like windows.h
     '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',
 ]
 
 EXTRA_COMPONENTS += [
     'ConsoleAPI.js',
     'ConsoleAPI.manifest',
     'SiteSpecificUserAgent.js',
--- a/extensions/auth/moz.build
+++ b/extensions/auth/moz.build
@@ -1,28 +1,24 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # 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',
-]
-
-# contains constants whose names conflict with constants in other files
-SOURCES += [
-    'nsHttpNegotiateAuth.cpp',
+    'nsHttpNegotiateAuth.cpp', # contains constants whose names conflict with constants in other files
 ]
 
 if CONFIG['OS_ARCH'] == 'WINNT':
     SOURCES += [
         'nsAuthSSPI.cpp',
     ]
     DEFINES['USE_SSPI'] = True
 else:
-    UNIFIED_SOURCES += [
-        'nsAuthSambaNTLM.cpp',
+    SOURCES += [
+        'nsAuthSambaNTLM.cpp', # forces NSPR logging
     ]
 
 FINAL_LIBRARY = 'xul'
--- a/extensions/pref/autoconfig/src/moz.build
+++ b/extensions/pref/autoconfig/src/moz.build
@@ -1,14 +1,15 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # 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',
     'nsReadConfig.cpp',
 ]
 
 FINAL_LIBRARY = 'xul'
--- a/layout/base/moz.build
+++ b/layout/base/moz.build
@@ -74,39 +74,41 @@ UNIFIED_SOURCES += [
     'nsCaret.cpp',
     'nsCounterManager.cpp',
     'nsCSSColorUtils.cpp',
     'nsCSSFrameConstructor.cpp',
     'nsCSSRendering.cpp',
     'nsCSSRenderingBorders.cpp',
     'nsDisplayList.cpp',
     'nsDisplayListInvalidation.cpp',
-    'nsDocumentViewer.cpp',
     'nsFrameManager.cpp',
     'nsFrameTraversal.cpp',
     'nsGenConList.cpp',
     'nsLayoutDebugger.cpp',
     'nsLayoutHistoryState.cpp',
     'nsLayoutUtils.cpp',
     'nsPresContext.cpp',
-    'nsPresShell.cpp',
     'nsQuoteList.cpp',
     'nsStyleChangeList.cpp',
     'nsStyleSheetService.cpp',
     'PaintTracker.cpp',
     'PositionedEventTargeting.cpp',
     'RestyleManager.cpp',
     'RestyleTracker.cpp',
     'StackArena.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',
 ]
 
 FAIL_ON_WARNINGS = True
 
 MSVC_ENABLE_PGO = True
 
 include('/ipc/chromium/chromium-config.mozbuild')
--- a/layout/base/nsStyleSheetService.cpp
+++ b/layout/base/nsStyleSheetService.cpp
@@ -175,17 +175,17 @@ nsStyleSheetService::LoadAndRegisterShee
     if (XRE_GetProcessType() == GeckoProcessType_Default) {
       nsTArray<dom::ContentParent*> children;
       dom::ContentParent::GetAll(children);
 
       if (children.IsEmpty()) {
         return rv;
       }
 
-      ipc::URIParams uri;
+      mozilla::ipc::URIParams uri;
       SerializeURI(aSheetURI, uri);
 
       for (uint32_t i = 0; i < children.Length(); i++) {
         unused << children[i]->SendLoadAndRegisterSheet(uri, aSheetType);
       }
     }
   }
   return rv;
@@ -263,17 +263,17 @@ nsStyleSheetService::UnregisterSheet(nsI
   if (XRE_GetProcessType() == GeckoProcessType_Default) {
     nsTArray<dom::ContentParent*> children;
     dom::ContentParent::GetAll(children);
 
     if (children.IsEmpty()) {
       return NS_OK;
     }
 
-    ipc::URIParams uri;
+    mozilla::ipc::URIParams uri;
     SerializeURI(aSheetURI, uri);
 
     for (uint32_t i = 0; i < children.Length(); i++) {
       unused << children[i]->SendUnregisterSheet(uri, aSheetType);
     }
   }
 
   return NS_OK;
--- a/layout/printing/moz.build
+++ b/layout/printing/moz.build
@@ -9,17 +9,21 @@ XPIDL_SOURCES += [
     'nsIPrintProgressParams.idl',
     'nsIPrintStatusFeedback.idl',
 ]
 
 XPIDL_MODULE = 'layout_printing'
 
 UNIFIED_SOURCES += [
     'nsPagePrintTimer.cpp',
+    'nsPrintObject.cpp',
+    'nsPrintPreviewListener.cpp',
+]
+
+# These files cannot be built in unified mode because they force NSPR logging.
+SOURCES += [
     'nsPrintData.cpp',
     'nsPrintEngine.cpp',
-    'nsPrintObject.cpp',
-    'nsPrintPreviewListener.cpp',
 ]
 
 FAIL_ON_WARNINGS = True
 
 FINAL_LIBRARY = 'gklayout'
--- a/layout/style/moz.build
+++ b/layout/style/moz.build
@@ -95,17 +95,16 @@ UNIFIED_SOURCES += [
     'nsCSSStyleSheet.cpp',
     'nsCSSValue.cpp',
     'nsDOMCSSAttrDeclaration.cpp',
     'nsDOMCSSDeclaration.cpp',
     'nsDOMCSSRect.cpp',
     'nsDOMCSSRGBColor.cpp',
     'nsDOMCSSValueList.cpp',
     'nsDOMMediaQueryList.cpp',
-    'nsFontFaceLoader.cpp',
     'nsHTMLCSSStyleSheet.cpp',
     'nsHTMLStyleSheet.cpp',
     'nsLayoutStylesheetCache.cpp',
     'nsMediaFeatures.cpp',
     'nsNthIndexCache.cpp',
     'nsROCSSPrimitiveValue.cpp',
     'nsRuleData.cpp',
     'nsRuleNode.cpp',
@@ -116,18 +115,20 @@ UNIFIED_SOURCES += [
     'nsStyleStruct.cpp',
     'nsStyleTransformMatrix.cpp',
     'nsStyleUtil.cpp',
     'nsTransitionManager.cpp',
     'StyleRule.cpp',
 ]
 
 # nsCSSRuleProcessor.cpp needs to be built separately because it uses plarena.h.
+# nsFontFaceLoader.cpp needs to be built separately because it forces NSPR logging.
 SOURCES += [
     'nsCSSRuleProcessor.cpp',
+    'nsFontFaceLoader.cpp',
 ]
 
 FAIL_ON_WARNINGS = True
 
 MSVC_ENABLE_PGO = True
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
--- a/netwerk/base/src/moz.build
+++ b/netwerk/base/src/moz.build
@@ -18,17 +18,16 @@ EXPORTS.mozilla.net += [
 
 UNIFIED_SOURCES += [
     'ArrayBufferInputStream.cpp',
     'BackgroundFileSaver.cpp',
     'Dashboard.cpp',
     'EventTokenBucket.cpp',
     'LoadContextInfo.cpp',
     'NetworkActivityMonitor.cpp',
-    'nsAsyncRedirectVerifyHelper.cpp',
     'nsAsyncStreamCopier.cpp',
     'nsAuthInformationHolder.cpp',
     'nsBase64Encoder.cpp',
     'nsBaseChannel.cpp',
     'nsBaseContentStream.cpp',
     'nsBufferedStreams.cpp',
     'nsChannelClassifier.cpp',
     'nsDirectoryIndexStream.cpp',
@@ -49,18 +48,16 @@ UNIFIED_SOURCES += [
     'nsProtocolProxyService.cpp',
     'nsProxyInfo.cpp',
     'nsRequestObserverProxy.cpp',
     'nsSerializationHelper.cpp',
     'nsServerSocket.cpp',
     'nsSimpleNestedURI.cpp',
     'nsSimpleStreamListener.cpp',
     'nsSimpleURI.cpp',
-    'nsSocketTransport2.cpp',
-    'nsSocketTransportService2.cpp',
     'nsStandardURL.cpp',
     'nsStreamListenerTee.cpp',
     'nsStreamListenerWrapper.cpp',
     'nsStreamLoader.cpp',
     'nsStreamTransportService.cpp',
     'nsSyncStreamListener.cpp',
     'nsTemporaryFileInputStream.cpp',
     'nsTransportUtils.cpp',
@@ -71,16 +68,23 @@ UNIFIED_SOURCES += [
     'nsURLParsers.cpp',
     'ProxyAutoConfig.cpp',
     'RedirectChannelRegistrar.cpp',
     'Seer.cpp',
     'StreamingProtocolService.cpp',
     'Tickler.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'] == 'os2':
     SOURCES += [
         'nsURLHelperOS2.cpp',
     ]
 elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
     SOURCES += [
         'nsAutodialWin.cpp',
         'nsNativeConnectionHelper.cpp',
--- a/netwerk/dns/moz.build
+++ b/netwerk/dns/moz.build
@@ -16,23 +16,23 @@ XPIDL_SOURCES += [
 XPIDL_MODULE = 'necko_dns'
 
 EXPORTS.mozilla.net += [
     'DNS.h',
 ]
 
 SOURCES += [
     'nsEffectiveTLDService.cpp', # Excluded from UNIFIED_SOURCES due to special build flags.
+    'nsHostResolver.cpp',        # Excluded from UNIFIED_SOURCES due to NSPR forced logging.
 ]
 
 UNIFIED_SOURCES += [
     'DNS.cpp',
     'nameprep.c',
     'nsDNSService2.cpp',
-    'nsHostResolver.cpp',
     'nsIDNService.cpp',
     'punycode.c',
     'race.c',
 ]
 
 FAIL_ON_WARNINGS = True
 
 MSVC_ENABLE_PGO = True
--- a/netwerk/dns/nsHostResolver.cpp
+++ b/netwerk/dns/nsHostResolver.cpp
@@ -26,17 +26,16 @@
 #include "prerror.h"
 #include "prtime.h"
 #include "prlog.h"
 #include "pldhash.h"
 #include "plstr.h"
 #include "nsURLHelper.h"
 #include "nsThreadUtils.h"
 
-#include "mozilla/DebugOnly.h"
 #include "mozilla/HashFunctions.h"
 #include "mozilla/TimeStamp.h"
 #include "mozilla/Telemetry.h"
 #include "mozilla/VisualEventTracer.h"
 
 using namespace mozilla;
 using namespace mozilla::net;
 
@@ -304,17 +303,17 @@ HostDB_MoveEntry(PLDHashTable *table,
 
 static void
 HostDB_ClearEntry(PLDHashTable *table,
                   PLDHashEntryHdr *entry)
 {
     nsHostDBEnt *he = static_cast<nsHostDBEnt*>(entry);
     MOZ_ASSERT(he, "nsHostDBEnt is null!");
 
-    DebugOnly<nsHostRecord*> hr = he->rec;
+    nsHostRecord *hr = he->rec;
     MOZ_ASSERT(hr, "nsHostDBEnt has null host record!");
 
     LOG(("Clearing cache db entry for host [%s].\n", hr->host));
 #if defined(DEBUG) && defined(PR_LOGGING)
     {
         MutexAutoLock lock(hr->addr_info_lock);
         if (!hr->addr_info) {
             LOG(("No address info for host [%s].\n", hr->host));
--- a/xpcom/components/moz.build
+++ b/xpcom/components/moz.build
@@ -21,23 +21,23 @@ EXPORTS += [
 ]
 
 EXPORTS.mozilla += [
     'Module.h',
     'ModuleLoader.h',
     'ModuleUtils.h',
 ]
 
-# These two files cannot be built in unified mode because they use the
-# PL_ARENA_CONST_ALIGN_MASK macro with plarena.h.
+# nsCategoryManager.cpp and nsComponentManager.cpp cannot be built in
+# unified mode because they use thea PL_ARENA_CONST_ALIGN_MASK macro
+# with plarena.h.
+# nsNativeComponentLoader.cpp cannot be built in unified mode because it
+# forces NSPR logging.
 SOURCES += [
+    'ManifestParser.cpp',
     'nsCategoryManager.cpp',
     'nsComponentManager.cpp',
-]
-
-UNIFIED_SOURCES += [
-    'ManifestParser.cpp',
     'nsNativeComponentLoader.cpp',
 ]
 
 MSVC_ENABLE_PGO = True
 
 FINAL_LIBRARY = 'xpcom_core'