From 92452d76147e70960791f18a3db487ba9f73b446 Mon Sep 17 00:00:00 2001 From: Moonchild Date: Sun, 4 Sep 2022 11:50:24 +0000 Subject: Issue #80 - reinstated unified building for some large chunks of our code. This should reduce compile complexity saving time and reducing linker stress. --- dom/animation/moz.build | 7 ++-- dom/audiochannel/moz.build | 2 +- dom/bindings/moz.build | 2 +- dom/broadcastchannel/moz.build | 2 +- dom/cache/moz.build | 2 +- dom/console/moz.build | 2 +- dom/crypto/moz.build | 2 +- dom/encoding/moz.build | 2 +- dom/events/moz.build | 8 +++-- dom/filehandle/moz.build | 2 +- dom/filesystem/moz.build | 2 +- dom/geolocation/moz.build | 2 +- dom/grid/moz.build | 2 +- dom/html/moz.build | 8 +++-- dom/indexedDB/moz.build | 2 +- dom/ipc/moz.build | 13 +++++--- dom/json/moz.build | 4 ++- dom/jsurl/moz.build | 2 +- dom/mathml/moz.build | 2 +- dom/media/flac/moz.build | 2 +- dom/media/fmp4/moz.build | 7 ++-- dom/media/imagecapture/moz.build | 2 +- dom/media/mediasink/moz.build | 2 +- dom/media/mediasource/moz.build | 2 +- dom/media/moz.build | 8 +++-- dom/media/mp3/moz.build | 2 +- dom/media/ogg/moz.build | 2 +- dom/media/platforms/ffmpeg/ffmpeg57/moz.build | 2 +- dom/media/platforms/ffmpeg/ffmpeg58/moz.build | 2 +- dom/media/platforms/ffmpeg/ffmpeg59/moz.build | 2 +- dom/media/platforms/ffmpeg/ffvpx/moz.build | 2 +- dom/media/platforms/ffmpeg/libav53/moz.build | 2 +- dom/media/platforms/ffmpeg/libav54/moz.build | 2 +- dom/media/platforms/ffmpeg/libav55/moz.build | 2 +- dom/media/platforms/moz.build | 8 ++--- dom/media/platforms/omx/moz.build | 2 +- dom/media/standalone/moz.build | 2 +- dom/media/systemservices/moz.build | 5 ++- dom/media/wave/moz.build | 2 +- dom/media/webm/moz.build | 2 +- dom/media/webrtc/moz.build | 11 +++--- dom/media/webspeech/synth/pico/moz.build | 2 +- dom/media/webspeech/synth/speechd/moz.build | 2 +- dom/media/webspeech/synth/windows/moz.build | 2 +- dom/messagechannel/moz.build | 2 +- dom/network/moz.build | 2 +- dom/notification/moz.build | 2 +- dom/offline/moz.build | 13 +++++--- dom/performance/moz.build | 2 +- dom/permission/moz.build | 2 +- dom/plugins/base/moz.build | 17 ++++++---- dom/plugins/ipc/moz.build | 19 +++++++---- dom/power/moz.build | 2 +- dom/push/moz.build | 2 +- dom/quota/moz.build | 2 +- dom/security/moz.build | 7 ++-- dom/security/nsCSPParser.cpp | 44 ------------------------ dom/security/nsCSPUtils.cpp | 27 --------------- dom/security/nsCSPUtils.h | 48 +++++++++++++++++++++++++++ dom/smil/moz.build | 2 +- dom/storage/moz.build | 2 +- dom/svg/moz.build | 2 +- dom/system/moz.build | 2 +- dom/time/moz.build | 2 +- dom/u2f/moz.build | 2 +- dom/url/moz.build | 2 +- dom/workers/moz.build | 2 +- dom/worklet/moz.build | 2 +- dom/xbl/moz.build | 2 +- dom/xhr/moz.build | 2 +- dom/xml/moz.build | 2 +- dom/xslt/base/moz.build | 2 +- dom/xslt/xml/moz.build | 2 +- dom/xslt/xpath/moz.build | 2 +- dom/xslt/xslt/moz.build | 2 +- dom/xul/moz.build | 2 +- dom/xul/templates/moz.build | 2 +- editor/composer/moz.build | 2 +- editor/libeditor/moz.build | 2 +- gfx/graphite2/src/moz.build | 6 ++-- gfx/harfbuzz/src/moz.build | 19 ++++++----- gfx/ipc/moz.build | 4 +-- gfx/ots/src/moz.build | 2 +- gfx/skia/generate_mozbuild.py | 4 +-- gfx/skia/moz.build | 14 ++++---- gfx/src/moz.build | 8 +++-- gfx/ycbcr/moz.build | 2 +- js/src/editline/moz.build | 2 +- js/src/shell/moz.build | 2 +- layout/build/moz.build | 2 +- layout/forms/moz.build | 2 +- layout/inspector/moz.build | 2 +- layout/ipc/moz.build | 5 ++- layout/mathml/moz.build | 2 +- layout/tools/layout-debug/src/moz.build | 2 +- netwerk/base/moz.build | 2 +- netwerk/cache/moz.build | 2 +- netwerk/cache/nsApplicationCacheService.cpp | 2 -- netwerk/cache/nsDiskCacheDeviceSQL.cpp | 3 -- netwerk/cache/nsDiskCacheDeviceSQL.h | 4 +++ netwerk/cache2/moz.build | 8 +++-- netwerk/cookie/moz.build | 5 ++- netwerk/dns/moz.build | 7 ++-- netwerk/ipc/moz.build | 2 +- netwerk/protocol/data/moz.build | 2 +- netwerk/protocol/device/moz.build | 2 +- netwerk/protocol/file/moz.build | 2 +- netwerk/protocol/ftp/moz.build | 2 +- netwerk/protocol/http/moz.build | 19 ++++++++--- netwerk/protocol/res/moz.build | 2 +- netwerk/protocol/viewsource/moz.build | 2 +- netwerk/protocol/wyciwyg/moz.build | 2 +- netwerk/socket/moz.build | 4 +-- netwerk/srtp/src/moz.build | 2 +- netwerk/streamconv/converters/moz.build | 6 ++-- netwerk/wifi/moz.build | 15 +++++---- 116 files changed, 293 insertions(+), 258 deletions(-) diff --git a/dom/animation/moz.build b/dom/animation/moz.build index f09314fb43..5b905be1b9 100644 --- a/dom/animation/moz.build +++ b/dom/animation/moz.build @@ -36,11 +36,6 @@ EXPORTS.mozilla += [ ] UNIFIED_SOURCES += [ - 'KeyframeEffect.cpp', - 'KeyframeEffectReadOnly.cpp', -] - -SOURCES += [ 'Animation.cpp', 'AnimationEffectReadOnly.cpp', 'AnimationEffectTiming.cpp', @@ -54,7 +49,9 @@ SOURCES += [ 'DocumentTimeline.cpp', 'EffectCompositor.cpp', 'EffectSet.cpp', + 'KeyframeEffect.cpp', 'KeyframeEffectParams.cpp', + 'KeyframeEffectReadOnly.cpp', 'KeyframeUtils.cpp', 'PendingAnimationTracker.cpp', 'TimingParams.cpp', diff --git a/dom/audiochannel/moz.build b/dom/audiochannel/moz.build index 9b3d85b02e..dcba1f8bf1 100644 --- a/dom/audiochannel/moz.build +++ b/dom/audiochannel/moz.build @@ -15,7 +15,7 @@ EXPORTS += [ 'AudioChannelService.h', ] -SOURCES += [ +UNIFIED_SOURCES += [ 'AudioChannelAgent.cpp', 'AudioChannelService.cpp', ] diff --git a/dom/bindings/moz.build b/dom/bindings/moz.build index 6200c3f383..9afaf4fd45 100644 --- a/dom/bindings/moz.build +++ b/dom/bindings/moz.build @@ -84,7 +84,7 @@ LOCAL_INCLUDES += [ '/media/webrtc/signaling/src/peerconnection', ] -SOURCES += [ +UNIFIED_SOURCES += [ 'BindingUtils.cpp', 'CallbackInterface.cpp', 'CallbackObject.cpp', diff --git a/dom/broadcastchannel/moz.build b/dom/broadcastchannel/moz.build index 20da44b404..e0f8cc2a21 100644 --- a/dom/broadcastchannel/moz.build +++ b/dom/broadcastchannel/moz.build @@ -7,7 +7,7 @@ EXPORTS.mozilla.dom += [ 'BroadcastChannel.h', ] -SOURCES += [ +UNIFIED_SOURCES += [ 'BroadcastChannel.cpp', 'BroadcastChannelChild.cpp', 'BroadcastChannelParent.cpp', diff --git a/dom/cache/moz.build b/dom/cache/moz.build index ed4f7ad5ee..e8183bd6fa 100644 --- a/dom/cache/moz.build +++ b/dom/cache/moz.build @@ -37,7 +37,7 @@ EXPORTS.mozilla.dom.cache += [ 'TypeUtils.h', ] -SOURCES += [ +UNIFIED_SOURCES += [ 'Action.cpp', 'ActorChild.cpp', 'AutoUtils.cpp', diff --git a/dom/console/moz.build b/dom/console/moz.build index 540a6b0302..d18b089626 100644 --- a/dom/console/moz.build +++ b/dom/console/moz.build @@ -21,7 +21,7 @@ EXPORTS.mozilla.dom += [ 'Console.h', ] -SOURCES += [ +UNIFIED_SOURCES += [ 'Console.cpp', 'ConsoleReportCollector.cpp', ] diff --git a/dom/crypto/moz.build b/dom/crypto/moz.build index 8ba3047bb2..f07332d98c 100644 --- a/dom/crypto/moz.build +++ b/dom/crypto/moz.build @@ -12,7 +12,7 @@ EXPORTS.mozilla.dom += [ 'WebCryptoThreadPool.h' ] -SOURCES += [ +UNIFIED_SOURCES += [ 'CryptoBuffer.cpp', 'CryptoKey.cpp', 'KeyAlgorithmProxy.cpp', diff --git a/dom/encoding/moz.build b/dom/encoding/moz.build index 2b4bc6dd1f..bba6dccf1d 100644 --- a/dom/encoding/moz.build +++ b/dom/encoding/moz.build @@ -10,7 +10,7 @@ EXPORTS.mozilla.dom += [ 'TextEncoder.h', ] -SOURCES += [ +UNIFIED_SOURCES += [ 'EncodingUtils.cpp', 'FallbackEncoding.cpp', 'TextDecoder.cpp', diff --git a/dom/events/moz.build b/dom/events/moz.build index d651167bd9..fcb59a2975 100644 --- a/dom/events/moz.build +++ b/dom/events/moz.build @@ -73,7 +73,7 @@ EXPORTS.mozilla.dom += [ 'XULCommandEvent.h', ] -SOURCES += [ +UNIFIED_SOURCES += [ 'AnimationEvent.cpp', 'AsyncEventDispatcher.cpp', 'BeforeAfterKeyboardEvent.cpp', @@ -95,7 +95,6 @@ SOURCES += [ 'EventDispatcher.cpp', 'EventListenerManager.cpp', 'EventListenerService.cpp', - 'EventStateManager.cpp', 'EventTarget.cpp', 'FocusEvent.cpp', 'ImageCaptureError.cpp', @@ -125,6 +124,11 @@ SOURCES += [ 'XULCommandEvent.cpp', ] +# nsEventStateManager.cpp should be built separately because of Mac OS X headers. +SOURCES += [ + 'EventStateManager.cpp', +] + include('/ipc/chromium/chromium-config.mozbuild') FINAL_LIBRARY = 'xul' diff --git a/dom/filehandle/moz.build b/dom/filehandle/moz.build index 1c0b5593f7..295990af8c 100644 --- a/dom/filehandle/moz.build +++ b/dom/filehandle/moz.build @@ -17,7 +17,7 @@ EXPORTS.mozilla.dom += [ 'MutableFileBase.h', ] -SOURCES += [ +UNIFIED_SOURCES += [ 'ActorsChild.cpp', 'ActorsParent.cpp', 'FileHandleBase.cpp', diff --git a/dom/filesystem/moz.build b/dom/filesystem/moz.build index 29997c2f6c..741b691914 100644 --- a/dom/filesystem/moz.build +++ b/dom/filesystem/moz.build @@ -18,7 +18,7 @@ EXPORTS.mozilla.dom += [ 'OSFileSystem.h', ] -SOURCES += [ +UNIFIED_SOURCES += [ 'Directory.cpp', 'FileSystemBase.cpp', 'FileSystemRequestParent.cpp', diff --git a/dom/geolocation/moz.build b/dom/geolocation/moz.build index 441349e5f9..54a344ab3a 100644 --- a/dom/geolocation/moz.build +++ b/dom/geolocation/moz.build @@ -12,7 +12,7 @@ SOURCES += [ 'nsGeolocation.cpp', ] -SOURCES += [ +UNIFIED_SOURCES += [ 'MLSFallback.cpp', 'nsGeoPosition.cpp', ] diff --git a/dom/grid/moz.build b/dom/grid/moz.build index 686f42ac1c..289db8519c 100644 --- a/dom/grid/moz.build +++ b/dom/grid/moz.build @@ -15,7 +15,7 @@ EXPORTS.mozilla.dom += [ 'GridTracks.h', ] -SOURCES += [ +UNIFIED_SOURCES += [ 'Grid.cpp', 'GridArea.cpp', 'GridDimension.cpp', diff --git a/dom/html/moz.build b/dom/html/moz.build index 9cf22144a8..8233f886c3 100644 --- a/dom/html/moz.build +++ b/dom/html/moz.build @@ -120,7 +120,7 @@ EXPORTS.mozilla.dom += [ 'ValidityState.h', ] -SOURCES += [ +UNIFIED_SOURCES += [ 'HTMLAllCollection.cpp', 'HTMLAnchorElement.cpp', 'HTMLAreaElement.cpp', @@ -203,7 +203,6 @@ SOURCES += [ 'nsIConstraintValidation.cpp', 'nsRadioVisitor.cpp', 'nsTextEditorState.cpp', - 'PluginDocument.cpp', 'RadioNodeList.cpp', 'TextTrackManager.cpp', 'TimeRanges.cpp', @@ -211,6 +210,11 @@ SOURCES += [ 'VideoDocument.cpp', ] +SOURCES += [ + # Includes npapi.h. + 'PluginDocument.cpp', +] + EXTRA_COMPONENTS += [ 'htmlMenuBuilder.js', 'htmlMenuBuilder.manifest' diff --git a/dom/indexedDB/moz.build b/dom/indexedDB/moz.build index 2f0f92c982..2d71e6c510 100644 --- a/dom/indexedDB/moz.build +++ b/dom/indexedDB/moz.build @@ -44,7 +44,7 @@ EXPORTS.mozilla.dom.indexedDB += [ 'SerializationHelpers.h', ] -SOURCES += [ +UNIFIED_SOURCES += [ 'ActorsChild.cpp', 'FileInfo.cpp', 'FileSnapshot.cpp', diff --git a/dom/ipc/moz.build b/dom/ipc/moz.build index 7ebd02e156..217d786231 100644 --- a/dom/ipc/moz.build +++ b/dom/ipc/moz.build @@ -43,13 +43,11 @@ EXPORTS.mozilla += [ 'ProcessPriorityManager.h', ] -SOURCES += [ +UNIFIED_SOURCES += [ 'AppProcessChecker.cpp', - 'Blob.cpp', 'ColorPickerParent.cpp', 'ContentBridgeChild.cpp', 'ContentBridgeParent.cpp', - 'ContentChild.cpp', 'ContentParent.cpp', 'ContentProcess.cpp', 'ContentProcessManager.cpp', @@ -58,7 +56,6 @@ SOURCES += [ 'nsIContentParent.cpp', 'PermissionMessageUtils.cpp', 'PreallocatedProcessManager.cpp', - 'ProcessHangMonitor.cpp', 'ProcessPriorityManager.cpp', 'ScreenManagerParent.cpp', 'StructuredCloneData.cpp', @@ -68,6 +65,14 @@ SOURCES += [ 'TabParent.cpp', ] +# Blob.cpp cannot be compiled in unified mode because it triggers a fatal gcc warning. +# ContentChild.cpp cannot be compiled in unified mode on linux due to Time conflict +SOURCES += [ + 'Blob.cpp', + 'ContentChild.cpp', + 'ProcessHangMonitor.cpp', +] + IPDL_SOURCES += [ 'BlobTypes.ipdlh', 'DOMTypes.ipdlh', diff --git a/dom/json/moz.build b/dom/json/moz.build index d69f6af8e8..457c7fef97 100644 --- a/dom/json/moz.build +++ b/dom/json/moz.build @@ -5,7 +5,9 @@ EXPORTS += ['nsJSON.h'] -SOURCES += ['nsJSON.cpp'] +UNIFIED_SOURCES += [ + 'nsJSON.cpp', +] LOCAL_INCLUDES += ['/dom/base'] diff --git a/dom/jsurl/moz.build b/dom/jsurl/moz.build index f5a6337d8f..ac348f2b38 100644 --- a/dom/jsurl/moz.build +++ b/dom/jsurl/moz.build @@ -7,7 +7,7 @@ EXPORTS += [ 'nsJSProtocolHandler.h', ] -SOURCES += [ +UNIFIED_SOURCES += [ 'nsJSProtocolHandler.cpp', ] diff --git a/dom/mathml/moz.build b/dom/mathml/moz.build index 6a3fb14bc9..fbc1b7accf 100644 --- a/dom/mathml/moz.build +++ b/dom/mathml/moz.build @@ -3,7 +3,7 @@ # 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/. -SOURCES += [ +UNIFIED_SOURCES += [ 'nsMathMLElement.cpp', 'nsMathMLElementFactory.cpp', ] diff --git a/dom/media/flac/moz.build b/dom/media/flac/moz.build index 21054fde87..c522d8b9f8 100644 --- a/dom/media/flac/moz.build +++ b/dom/media/flac/moz.build @@ -9,7 +9,7 @@ EXPORTS += [ 'FlacFrameParser.h', ] -SOURCES += [ +UNIFIED_SOURCES += [ 'FlacDecoder.cpp', 'FlacDemuxer.cpp', 'FlacFrameParser.cpp', diff --git a/dom/media/fmp4/moz.build b/dom/media/fmp4/moz.build index 375c6effe7..69e10fc783 100644 --- a/dom/media/fmp4/moz.build +++ b/dom/media/fmp4/moz.build @@ -9,10 +9,13 @@ EXPORTS += [ 'MP4Stream.h', ] -SOURCES += [ +UNIFIED_SOURCES += [ 'MP4Decoder.cpp', - 'MP4Demuxer.cpp', 'MP4Stream.cpp', ] +SOURCES += [ + 'MP4Demuxer.cpp', +] + FINAL_LIBRARY = 'xul' diff --git a/dom/media/imagecapture/moz.build b/dom/media/imagecapture/moz.build index 55f6fcfc36..7f3759bf71 100644 --- a/dom/media/imagecapture/moz.build +++ b/dom/media/imagecapture/moz.build @@ -7,7 +7,7 @@ EXPORTS.mozilla.dom += [ 'ImageCapture.h' ] -SOURCES += [ +UNIFIED_SOURCES += [ 'CaptureTask.cpp', 'ImageCapture.cpp', ] diff --git a/dom/media/mediasink/moz.build b/dom/media/mediasink/moz.build index ce6ed95be2..0aafa0599f 100644 --- a/dom/media/mediasink/moz.build +++ b/dom/media/mediasink/moz.build @@ -3,7 +3,7 @@ # 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/. -SOURCES += [ +UNIFIED_SOURCES += [ 'AudioSinkWrapper.cpp', 'DecodedAudioDataSink.cpp', 'DecodedStream.cpp', diff --git a/dom/media/mediasource/moz.build b/dom/media/mediasource/moz.build index 775090cb21..be0d7156b5 100644 --- a/dom/media/mediasource/moz.build +++ b/dom/media/mediasource/moz.build @@ -20,7 +20,7 @@ EXPORTS.mozilla.dom += [ 'SourceBufferList.h', ] -SOURCES += [ +UNIFIED_SOURCES += [ 'ContainerParser.cpp', 'MediaSource.cpp', 'MediaSourceDecoder.cpp', diff --git a/dom/media/moz.build b/dom/media/moz.build index 54920359c9..c6e4fcdfb6 100644 --- a/dom/media/moz.build +++ b/dom/media/moz.build @@ -183,7 +183,7 @@ EXPORTS.mozilla.dom += [ 'VideoTrackList.h', ] -SOURCES += [ +UNIFIED_SOURCES += [ 'AccurateSeekTask.cpp', 'ADTSDecoder.cpp', 'ADTSDemuxer.cpp', @@ -200,7 +200,6 @@ SOURCES += [ 'CanvasCaptureMediaStream.cpp', 'CubebUtils.cpp', 'DecoderDoctorDiagnostics.cpp', - 'DecoderTraits.cpp', 'DOMMediaStream.cpp', 'EncodedBufferCache.cpp', 'FileBlockCache.cpp', @@ -256,6 +255,11 @@ SOURCES += [ if CONFIG['OS_TARGET'] == 'WINNT': SOURCES += [ 'ThreadPoolCOMListener.cpp' ] +# DecoderTraits.cpp needs to be built separately because of Mac OS X headers. +SOURCES += [ + 'DecoderTraits.cpp', +] + # Some codec-related code uses multi-character constants, which GCC and clang # warn about. Suppress turning this warning into an error. if CONFIG['GNU_CC'] or CONFIG['CLANG_CL']: diff --git a/dom/media/mp3/moz.build b/dom/media/mp3/moz.build index 349cd6b671..0c9f8cfd4e 100644 --- a/dom/media/mp3/moz.build +++ b/dom/media/mp3/moz.build @@ -8,7 +8,7 @@ EXPORTS += [ 'MP3Demuxer.h', ] -SOURCES += [ +UNIFIED_SOURCES += [ 'MP3Decoder.cpp', 'MP3Demuxer.cpp', ] diff --git a/dom/media/ogg/moz.build b/dom/media/ogg/moz.build index 13a8d1ddc3..dc6f248669 100644 --- a/dom/media/ogg/moz.build +++ b/dom/media/ogg/moz.build @@ -12,7 +12,7 @@ EXPORTS += [ 'OpusParser.h', ] -SOURCES += [ +UNIFIED_SOURCES += [ 'OggCodecState.cpp', 'OggCodecStore.cpp', 'OggDecoder.cpp', diff --git a/dom/media/platforms/ffmpeg/ffmpeg57/moz.build b/dom/media/platforms/ffmpeg/ffmpeg57/moz.build index 00ca9828ad..e9c443a8ea 100644 --- a/dom/media/platforms/ffmpeg/ffmpeg57/moz.build +++ b/dom/media/platforms/ffmpeg/ffmpeg57/moz.build @@ -3,7 +3,7 @@ # 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/. -SOURCES += [ +UNIFIED_SOURCES += [ '../FFmpegAudioDecoder.cpp', '../FFmpegDataDecoder.cpp', '../FFmpegDecoderModule.cpp', diff --git a/dom/media/platforms/ffmpeg/ffmpeg58/moz.build b/dom/media/platforms/ffmpeg/ffmpeg58/moz.build index 00ca9828ad..e9c443a8ea 100644 --- a/dom/media/platforms/ffmpeg/ffmpeg58/moz.build +++ b/dom/media/platforms/ffmpeg/ffmpeg58/moz.build @@ -3,7 +3,7 @@ # 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/. -SOURCES += [ +UNIFIED_SOURCES += [ '../FFmpegAudioDecoder.cpp', '../FFmpegDataDecoder.cpp', '../FFmpegDecoderModule.cpp', diff --git a/dom/media/platforms/ffmpeg/ffmpeg59/moz.build b/dom/media/platforms/ffmpeg/ffmpeg59/moz.build index 00ca9828ad..e9c443a8ea 100644 --- a/dom/media/platforms/ffmpeg/ffmpeg59/moz.build +++ b/dom/media/platforms/ffmpeg/ffmpeg59/moz.build @@ -3,7 +3,7 @@ # 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/. -SOURCES += [ +UNIFIED_SOURCES += [ '../FFmpegAudioDecoder.cpp', '../FFmpegDataDecoder.cpp', '../FFmpegDecoderModule.cpp', diff --git a/dom/media/platforms/ffmpeg/ffvpx/moz.build b/dom/media/platforms/ffmpeg/ffvpx/moz.build index 073d769f89..11650982ab 100644 --- a/dom/media/platforms/ffmpeg/ffvpx/moz.build +++ b/dom/media/platforms/ffmpeg/ffvpx/moz.build @@ -8,7 +8,7 @@ EXPORTS += [ 'FFVPXRuntimeLinker.h', ] -SOURCES += [ +UNIFIED_SOURCES += [ '../FFmpegAudioDecoder.cpp', '../FFmpegDataDecoder.cpp', '../FFmpegDecoderModule.cpp', diff --git a/dom/media/platforms/ffmpeg/libav53/moz.build b/dom/media/platforms/ffmpeg/libav53/moz.build index 0ed3423e19..f3ed1a505c 100644 --- a/dom/media/platforms/ffmpeg/libav53/moz.build +++ b/dom/media/platforms/ffmpeg/libav53/moz.build @@ -3,7 +3,7 @@ # 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/. -SOURCES += [ +UNIFIED_SOURCES += [ '../FFmpegAudioDecoder.cpp', '../FFmpegDataDecoder.cpp', '../FFmpegDecoderModule.cpp', diff --git a/dom/media/platforms/ffmpeg/libav54/moz.build b/dom/media/platforms/ffmpeg/libav54/moz.build index 0ed3423e19..f3ed1a505c 100644 --- a/dom/media/platforms/ffmpeg/libav54/moz.build +++ b/dom/media/platforms/ffmpeg/libav54/moz.build @@ -3,7 +3,7 @@ # 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/. -SOURCES += [ +UNIFIED_SOURCES += [ '../FFmpegAudioDecoder.cpp', '../FFmpegDataDecoder.cpp', '../FFmpegDecoderModule.cpp', diff --git a/dom/media/platforms/ffmpeg/libav55/moz.build b/dom/media/platforms/ffmpeg/libav55/moz.build index 00ca9828ad..e9c443a8ea 100644 --- a/dom/media/platforms/ffmpeg/libav55/moz.build +++ b/dom/media/platforms/ffmpeg/libav55/moz.build @@ -3,7 +3,7 @@ # 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/. -SOURCES += [ +UNIFIED_SOURCES += [ '../FFmpegAudioDecoder.cpp', '../FFmpegDataDecoder.cpp', '../FFmpegDecoderModule.cpp', diff --git a/dom/media/platforms/moz.build b/dom/media/platforms/moz.build index a32476133d..6312787ae2 100644 --- a/dom/media/platforms/moz.build +++ b/dom/media/platforms/moz.build @@ -15,7 +15,7 @@ EXPORTS += [ 'wrappers/H264Converter.h' ] -SOURCES += [ +UNIFIED_SOURCES += [ 'agnostic/AgnosticDecoderModule.cpp', 'agnostic/BlankDecoderModule.cpp', 'agnostic/OpusDecoder.cpp', @@ -41,7 +41,7 @@ if CONFIG['MOZ_WMF']: if CONFIG['MOZ_FFVPX'] or CONFIG['MOZ_FFMPEG']: # common code to either FFmpeg or FFVPX - SOURCES += [ + UNIFIED_SOURCES += [ 'ffmpeg/FFmpegLibWrapper.cpp', ] @@ -59,7 +59,7 @@ if CONFIG['MOZ_AV1']: EXPORTS += [ 'agnostic/AOMDecoder.h', ] - SOURCES += [ + UNIFIED_SOURCES += [ 'agnostic/AOMDecoder.cpp', ] @@ -67,7 +67,7 @@ if CONFIG['MOZ_APPLEMEDIA']: EXPORTS += [ 'apple/AppleDecoderModule.h', ] - SOURCES += [ + UNIFIED_SOURCES += [ 'apple/AppleATDecoder.cpp', 'apple/AppleCMLinker.cpp', 'apple/AppleDecoderModule.cpp', diff --git a/dom/media/platforms/omx/moz.build b/dom/media/platforms/omx/moz.build index c69cff7802..1102d8ab02 100644 --- a/dom/media/platforms/omx/moz.build +++ b/dom/media/platforms/omx/moz.build @@ -7,7 +7,7 @@ EXPORTS += [ 'OmxDecoderModule.h', ] -SOURCES += [ +UNIFIED_SOURCES += [ 'OmxDataDecoder.cpp', 'OmxDecoderModule.cpp', 'OmxPlatformLayer.cpp', diff --git a/dom/media/standalone/moz.build b/dom/media/standalone/moz.build index 7ef15adaa9..90e0e5d30b 100644 --- a/dom/media/standalone/moz.build +++ b/dom/media/standalone/moz.build @@ -6,7 +6,7 @@ if CONFIG['OS_TARGET'] != 'WINNT': Library('media_standalone') -SOURCES += [ +UNIFIED_SOURCES += [ '../AudioChannelFormat.cpp', '../AudioSegment.cpp', '../SimpleImageBuffer.cpp', diff --git a/dom/media/systemservices/moz.build b/dom/media/systemservices/moz.build index 402a6988c0..ce94408d2c 100644 --- a/dom/media/systemservices/moz.build +++ b/dom/media/systemservices/moz.build @@ -11,7 +11,7 @@ if CONFIG['MOZ_WEBRTC']: 'LoadManagerFactory.h', 'LoadMonitor.h', ] - SOURCES += [ + UNIFIED_SOURCES += [ 'CamerasChild.cpp', 'CamerasParent.cpp', 'LoadManager.cpp', @@ -57,8 +57,7 @@ EXPORTS.mozilla.media += ['CamerasTypes.h', 'MediaTaskUtils.h', 'MediaUtils.h', ] - -SOURCES += [ +UNIFIED_SOURCES += [ 'MediaChild.cpp', 'MediaParent.cpp', 'MediaSystemResourceClient.cpp', diff --git a/dom/media/wave/moz.build b/dom/media/wave/moz.build index 9c39205701..2f61895859 100644 --- a/dom/media/wave/moz.build +++ b/dom/media/wave/moz.build @@ -8,7 +8,7 @@ EXPORTS += [ 'WaveDemuxer.h', ] -SOURCES += [ +UNIFIED_SOURCES += [ 'WaveDecoder.cpp', 'WaveDemuxer.cpp', ] diff --git a/dom/media/webm/moz.build b/dom/media/webm/moz.build index dc9f30668c..e9387e8c98 100644 --- a/dom/media/webm/moz.build +++ b/dom/media/webm/moz.build @@ -10,7 +10,7 @@ EXPORTS += [ 'WebMDemuxer.h', ] -SOURCES += [ +UNIFIED_SOURCES += [ 'WebMBufferedParser.cpp', 'WebMDecoder.cpp', 'WebMDemuxer.cpp', diff --git a/dom/media/webrtc/moz.build b/dom/media/webrtc/moz.build index 4c53406e0a..9f5dc661ae 100644 --- a/dom/media/webrtc/moz.build +++ b/dom/media/webrtc/moz.build @@ -30,14 +30,15 @@ if CONFIG['MOZ_WEBRTC']: UNIFIED_SOURCES += [ 'MediaEngineCameraVideoSource.cpp', 'MediaEngineRemoteVideoSource.cpp', - ] - SOURCES += [ 'MediaEngineTabVideoSource.cpp', - 'MediaEngineWebRTC.cpp', 'MediaEngineWebRTCAudio.cpp', 'RTCCertificate.cpp', 'RTCIdentityProviderRegistrar.cpp', ] + # MediaEngineWebRTC.cpp needs to be built separately. + SOURCES += [ + 'MediaEngineWebRTC.cpp', + ] LOCAL_INCLUDES += [ '/dom/base', '/media/libyuv/include', @@ -51,10 +52,8 @@ XPIDL_SOURCES += [ ] UNIFIED_SOURCES += [ - 'MediaTrackConstraints.cpp', -] -SOURCES += [ 'MediaEngineDefault.cpp', + 'MediaTrackConstraints.cpp', 'PeerIdentity.cpp', ] diff --git a/dom/media/webspeech/synth/pico/moz.build b/dom/media/webspeech/synth/pico/moz.build index a889f891d7..30b29e9402 100644 --- a/dom/media/webspeech/synth/pico/moz.build +++ b/dom/media/webspeech/synth/pico/moz.build @@ -3,7 +3,7 @@ # 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/. -SOURCES += [ +UNIFIED_SOURCES += [ 'nsPicoService.cpp', 'PicoModule.cpp' ] diff --git a/dom/media/webspeech/synth/speechd/moz.build b/dom/media/webspeech/synth/speechd/moz.build index 9cea481fbd..4fb97db370 100644 --- a/dom/media/webspeech/synth/speechd/moz.build +++ b/dom/media/webspeech/synth/speechd/moz.build @@ -3,7 +3,7 @@ # 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/. -SOURCES += [ +UNIFIED_SOURCES += [ 'SpeechDispatcherModule.cpp', 'SpeechDispatcherService.cpp' ] diff --git a/dom/media/webspeech/synth/windows/moz.build b/dom/media/webspeech/synth/windows/moz.build index 9d8bb3ac61..d49a5a0cb1 100644 --- a/dom/media/webspeech/synth/windows/moz.build +++ b/dom/media/webspeech/synth/windows/moz.build @@ -3,7 +3,7 @@ # 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/. -SOURCES += [ +UNIFIED_SOURCES += [ 'SapiModule.cpp', 'SapiService.cpp' ] diff --git a/dom/messagechannel/moz.build b/dom/messagechannel/moz.build index adeca86259..62251e138f 100644 --- a/dom/messagechannel/moz.build +++ b/dom/messagechannel/moz.build @@ -12,7 +12,7 @@ EXPORTS.mozilla.dom += [ 'MessagePortParent.h', ] -SOURCES += [ +UNIFIED_SOURCES += [ 'MessageChannel.cpp', 'MessagePort.cpp', 'MessagePortChild.cpp', diff --git a/dom/network/moz.build b/dom/network/moz.build index cc60ac7905..7701b19603 100644 --- a/dom/network/moz.build +++ b/dom/network/moz.build @@ -26,7 +26,7 @@ EXPORTS.mozilla.dom.network += [ 'UDPSocketParent.h', ] -SOURCES += [ +UNIFIED_SOURCES += [ 'Connection.cpp', 'TCPServerSocket.cpp', 'TCPServerSocketChild.cpp', diff --git a/dom/notification/moz.build b/dom/notification/moz.build index b5bbd23ab9..9f7de5e04c 100644 --- a/dom/notification/moz.build +++ b/dom/notification/moz.build @@ -16,7 +16,7 @@ EXPORTS.mozilla.dom += [ 'NotificationEvent.h', ] -SOURCES += [ +UNIFIED_SOURCES += [ 'DesktopNotification.cpp', 'Notification.cpp', 'NotificationEvent.cpp', diff --git a/dom/offline/moz.build b/dom/offline/moz.build index b35f27bc9e..6a4bac1197 100644 --- a/dom/offline/moz.build +++ b/dom/offline/moz.build @@ -3,10 +3,15 @@ # 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/. -EXPORTS += ['nsDOMOfflineResourceList.h'] +EXPORTS += [ + 'nsDOMOfflineResourceList.h', +] +UNIFIED_SOURCES += [ + 'nsDOMOfflineResourceList.cpp', +] -SOURCES += ['nsDOMOfflineResourceList.cpp'] - -LOCAL_INCLUDES += ['/dom/base'] +LOCAL_INCLUDES += [ + '/dom/base', +] FINAL_LIBRARY = 'xul' diff --git a/dom/performance/moz.build b/dom/performance/moz.build index 276d4625f2..a4dc63fc12 100644 --- a/dom/performance/moz.build +++ b/dom/performance/moz.build @@ -17,7 +17,7 @@ EXPORTS.mozilla.dom += [ 'PerformanceTiming.h', ] -SOURCES += [ +UNIFIED_SOURCES += [ 'Performance.cpp', 'PerformanceEntry.cpp', 'PerformanceMainThread.cpp', diff --git a/dom/permission/moz.build b/dom/permission/moz.build index 0da3594373..400474ff66 100644 --- a/dom/permission/moz.build +++ b/dom/permission/moz.build @@ -8,7 +8,7 @@ EXPORTS.mozilla.dom += [ 'PermissionStatus.h', ] -SOURCES += [ +UNIFIED_SOURCES += [ 'PermissionObserver.cpp', 'Permissions.cpp', 'PermissionStatus.cpp', diff --git a/dom/plugins/base/moz.build b/dom/plugins/base/moz.build index 08f87d56a3..1b6658c283 100644 --- a/dom/plugins/base/moz.build +++ b/dom/plugins/base/moz.build @@ -37,12 +37,10 @@ EXPORTS.mozilla += [ 'PluginPRLibrary.h', ] -SOURCES += [ +UNIFIED_SOURCES += [ 'nsJSNPRuntime.cpp', - 'nsNPAPIPlugin.cpp', 'nsNPAPIPluginInstance.cpp', 'nsNPAPIPluginStreamListener.cpp', - 'nsPluginHost.cpp', 'nsPluginInstanceOwner.cpp', 'nsPluginModule.cpp', 'nsPluginStreamListenerPeer.cpp', @@ -50,19 +48,24 @@ SOURCES += [ 'PluginPRLibrary.cpp', ] +SOURCES += [ + 'nsNPAPIPlugin.cpp', # Conflict with X11 headers + 'nsPluginHost.cpp', # Conflict with NS_NPAPIPLUGIN_CALLBACK +] + if CONFIG['OS_ARCH'] == 'WINNT': - SOURCES += [ + UNIFIED_SOURCES += [ 'nsPluginDirServiceProvider.cpp', 'nsPluginNativeWindowWin.cpp', 'nsPluginsDirWin.cpp', ] elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa': - SOURCES += [ + UNIFIED_SOURCES += [ 'nsPluginNativeWindow.cpp', 'nsPluginsDirDarwin.cpp', ] else: - SOURCES += [ + UNIFIED_SOURCES += [ 'nsPluginsDirUnix.cpp', ] if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']: @@ -71,7 +74,7 @@ else: 'nsPluginNativeWindowGtk.cpp', ] else: - SOURCES += [ + UNIFIED_SOURCES += [ 'nsPluginNativeWindow.cpp', ] diff --git a/dom/plugins/ipc/moz.build b/dom/plugins/ipc/moz.build index 9190d19272..ee86fe6597 100644 --- a/dom/plugins/ipc/moz.build +++ b/dom/plugins/ipc/moz.build @@ -47,11 +47,13 @@ if CONFIG['OS_ARCH'] == 'WINNT': EXPORTS.mozilla.plugins += [ 'PluginSurfaceParent.h', ] - SOURCES += [ - 'MiniShmParent.cpp', + UNIFIED_SOURCES += [ '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', @@ -63,17 +65,15 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa': 'PluginInterposeOSX.h', ] -SOURCES += [ +UNIFIED_SOURCES += [ 'BrowserStreamChild.cpp', 'BrowserStreamParent.cpp', 'ChildAsyncCall.cpp', 'ChildTimer.cpp', 'PluginAsyncSurrogate.cpp', 'PluginBackgroundDestroyer.cpp', - 'PluginInstanceChild.cpp', 'PluginInstanceParent.cpp', 'PluginMessageUtils.cpp', - 'PluginModuleChild.cpp', 'PluginModuleParent.cpp', 'PluginProcessChild.cpp', 'PluginProcessParent.cpp', @@ -82,18 +82,23 @@ SOURCES += [ 'PluginScriptableObjectParent.cpp', 'PluginStreamChild.cpp', 'PluginStreamParent.cpp', +] + +SOURCES += [ + 'PluginInstanceChild.cpp', # 'PluginThreadCallback' : ambiguous symbol + 'PluginModuleChild.cpp', # Redefinition of mozilla::WindowsDllInterceptor sUser32Intercept 'PluginWidgetChild.cpp', 'PluginWidgetParent.cpp', ] if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa': - SOURCES += [ + UNIFIED_SOURCES += [ 'PluginInterposeOSX.mm', 'PluginUtilsOSX.mm', ] if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows': - SOURCES += [ + UNIFIED_SOURCES += [ 'D3D11SurfaceHolder.cpp', 'PluginUtilsWin.cpp' ] diff --git a/dom/power/moz.build b/dom/power/moz.build index 90f2ccbcf2..b08ebd87e6 100644 --- a/dom/power/moz.build +++ b/dom/power/moz.build @@ -20,7 +20,7 @@ EXPORTS.mozilla.dom.power += [ 'Types.h', ] -SOURCES += [ +UNIFIED_SOURCES += [ 'PowerManager.cpp', 'PowerManagerService.cpp', 'WakeLock.cpp', diff --git a/dom/push/moz.build b/dom/push/moz.build index 055f97d480..781e84c60e 100644 --- a/dom/push/moz.build +++ b/dom/push/moz.build @@ -33,7 +33,7 @@ EXPORTS.mozilla.dom += [ 'PushUtil.h', ] -SOURCES += [ +UNIFIED_SOURCES += [ 'PushManager.cpp', 'PushNotifier.cpp', 'PushSubscription.cpp', diff --git a/dom/quota/moz.build b/dom/quota/moz.build index 97d961cb1b..db9a4d4e61 100644 --- a/dom/quota/moz.build +++ b/dom/quota/moz.build @@ -30,7 +30,7 @@ EXPORTS.mozilla.dom.quota += [ 'UsageInfo.h', ] -SOURCES += [ +UNIFIED_SOURCES += [ 'ActorsChild.cpp', 'ActorsParent.cpp', 'FileStreams.cpp', diff --git a/dom/security/moz.build b/dom/security/moz.build index a106216dc8..3f690ea498 100644 --- a/dom/security/moz.build +++ b/dom/security/moz.build @@ -23,15 +23,12 @@ EXPORTS += [ ] UNIFIED_SOURCES += [ - 'nsCSPContext.cpp', - 'nsCSPUtils.cpp', -] - -SOURCES += [ 'ContentVerifier.cpp', 'nsContentSecurityManager.cpp', + 'nsCSPContext.cpp', 'nsCSPParser.cpp', 'nsCSPService.cpp', + 'nsCSPUtils.cpp', 'nsMixedContentBlocker.cpp', 'SRICheck.cpp', 'SRIMetadata.cpp', diff --git a/dom/security/nsCSPParser.cpp b/dom/security/nsCSPParser.cpp index 12dcb9dc42..1012efe878 100644 --- a/dom/security/nsCSPParser.cpp +++ b/dom/security/nsCSPParser.cpp @@ -31,29 +31,6 @@ GetCspParserLog() #define CSPPARSERLOG(args) MOZ_LOG(GetCspParserLog(), mozilla::LogLevel::Debug, args) #define CSPPARSERLOGENABLED() MOZ_LOG_TEST(GetCspParserLog(), mozilla::LogLevel::Debug) -static const char16_t COLON = ':'; -static const char16_t SEMICOLON = ';'; -static const char16_t SLASH = '/'; -static const char16_t PLUS = '+'; -static const char16_t DASH = '-'; -static const char16_t DOT = '.'; -static const char16_t UNDERLINE = '_'; -static const char16_t TILDE = '~'; -static const char16_t WILDCARD = '*'; -static const char16_t SINGLEQUOTE = '\''; -static const char16_t OPEN_CURL = '{'; -static const char16_t CLOSE_CURL = '}'; -static const char16_t NUMBER_SIGN = '#'; -static const char16_t QUESTIONMARK = '?'; -static const char16_t PERCENT_SIGN = '%'; -static const char16_t EXCLAMATION = '!'; -static const char16_t DOLLAR = '$'; -static const char16_t AMPERSAND = '&'; -static const char16_t OPENBRACE = '('; -static const char16_t CLOSINGBRACE = ')'; -static const char16_t EQUALS = '='; -static const char16_t ATSYMBOL = '@'; - static const uint32_t kSubHostPathCharacterCutoff = 512; static const char *const kHashSourceValidFns [] = { "sha256", "sha384", "sha512" }; @@ -158,27 +135,6 @@ nsCSPParser::~nsCSPParser() CSPPARSERLOG(("nsCSPParser::~nsCSPParser")); } -static bool -isCharacterToken(char16_t aSymbol) -{ - return (aSymbol >= 'a' && aSymbol <= 'z') || - (aSymbol >= 'A' && aSymbol <= 'Z'); -} - -static bool -isNumberToken(char16_t aSymbol) -{ - return (aSymbol >= '0' && aSymbol <= '9'); -} - -static bool -isValidHexDig(char16_t aHexDig) -{ - return (isNumberToken(aHexDig) || - (aHexDig >= 'A' && aHexDig <= 'F') || - (aHexDig >= 'a' && aHexDig <= 'f')); -} - void nsCSPParser::resetCurChar(const nsAString& aToken) { diff --git a/dom/security/nsCSPUtils.cpp b/dom/security/nsCSPUtils.cpp index 5f0bac1cd8..9459c65cf0 100644 --- a/dom/security/nsCSPUtils.cpp +++ b/dom/security/nsCSPUtils.cpp @@ -16,10 +16,6 @@ #include "nsIURL.h" #include "nsReadableUtils.h" #include "nsSandboxFlags.h" -#include "nsString.h" -#include "mozilla/Logging.h" - -using namespace mozilla; #define DEFAULT_PORT -1 @@ -33,29 +29,6 @@ GetCspUtilsLog() #define CSPUTILSLOG(args) MOZ_LOG(GetCspUtilsLog(), mozilla::LogLevel::Debug, args) #define CSPUTILSLOGENABLED() MOZ_LOG_TEST(GetCspUtilsLog(), mozilla::LogLevel::Debug) -static const char16_t PERCENT_SIGN = '%'; - -static bool -isCharacterToken(char16_t aSymbol) -{ - return (aSymbol >= 'a' && aSymbol <= 'z') || - (aSymbol >= 'A' && aSymbol <= 'Z'); -} - -static bool -isNumberToken(char16_t aSymbol) -{ - return (aSymbol >= '0' && aSymbol <= '9'); -} - -static bool -isValidHexDig(char16_t aHexDig) -{ - return (isNumberToken(aHexDig) || - (aHexDig >= 'A' && aHexDig <= 'F') || - (aHexDig >= 'a' && aHexDig <= 'f')); -} - void CSP_PercentDecodeStr(const nsAString& aEncStr, nsAString& outDecStr) { diff --git a/dom/security/nsCSPUtils.h b/dom/security/nsCSPUtils.h index 84dcbb7fcc..b06f9d3c84 100644 --- a/dom/security/nsCSPUtils.h +++ b/dom/security/nsCSPUtils.h @@ -15,6 +15,54 @@ #include "nsUnicharUtils.h" #include "mozilla/Logging.h" +// ======= Defines and helper functions ======= + +static const char16_t COLON = ':'; +static const char16_t SEMICOLON = ';'; +static const char16_t SLASH = '/'; +static const char16_t PLUS = '+'; +static const char16_t DASH = '-'; +static const char16_t DOT = '.'; +static const char16_t UNDERLINE = '_'; +static const char16_t TILDE = '~'; +static const char16_t WILDCARD = '*'; +static const char16_t SINGLEQUOTE = '\''; +static const char16_t OPEN_CURL = '{'; +static const char16_t CLOSE_CURL = '}'; +static const char16_t NUMBER_SIGN = '#'; +static const char16_t QUESTIONMARK = '?'; +static const char16_t PERCENT_SIGN = '%'; +static const char16_t EXCLAMATION = '!'; +static const char16_t DOLLAR = '$'; +static const char16_t AMPERSAND = '&'; +static const char16_t OPENBRACE = '('; +static const char16_t CLOSINGBRACE = ')'; +static const char16_t EQUALS = '='; +static const char16_t ATSYMBOL = '@'; + +static bool +isCharacterToken(char16_t aSymbol) +{ + return (aSymbol >= 'a' && aSymbol <= 'z') || + (aSymbol >= 'A' && aSymbol <= 'Z'); +} + +static bool +isNumberToken(char16_t aSymbol) +{ + return (aSymbol >= '0' && aSymbol <= '9'); +} + +static bool +isValidHexDig(char16_t aHexDig) +{ + return (isNumberToken(aHexDig) || + (aHexDig >= 'A' && aHexDig <= 'F') || + (aHexDig >= 'a' && aHexDig <= 'f')); +} + +// ============================================ + namespace mozilla { namespace dom { struct CSP; diff --git a/dom/smil/moz.build b/dom/smil/moz.build index 333adf560e..645e8e01eb 100644 --- a/dom/smil/moz.build +++ b/dom/smil/moz.build @@ -34,7 +34,7 @@ EXPORTS.mozilla.dom += [ 'TimeEvent.h', ] -SOURCES += [ +UNIFIED_SOURCES += [ 'nsSMILAnimationController.cpp', 'nsSMILAnimationFunction.cpp', 'nsSMILCompositor.cpp', diff --git a/dom/storage/moz.build b/dom/storage/moz.build index 6a8934c8ea..841779c8ff 100644 --- a/dom/storage/moz.build +++ b/dom/storage/moz.build @@ -8,7 +8,7 @@ EXPORTS.mozilla.dom += [ 'DOMStorageIPC.h', ] -SOURCES += [ +UNIFIED_SOURCES += [ 'DOMStorage.cpp', 'DOMStorageCache.cpp', 'DOMStorageDBThread.cpp', diff --git a/dom/svg/moz.build b/dom/svg/moz.build index 7c05513e30..3af1b8094c 100644 --- a/dom/svg/moz.build +++ b/dom/svg/moz.build @@ -102,7 +102,7 @@ EXPORTS.mozilla.dom += [ 'SVGZoomEvent.h', ] -SOURCES += [ +UNIFIED_SOURCES += [ 'DOMSVGAnimatedLengthList.cpp', 'DOMSVGAnimatedNumberList.cpp', 'DOMSVGLength.cpp', diff --git a/dom/system/moz.build b/dom/system/moz.build index 7e42761e5e..035a9fb30b 100644 --- a/dom/system/moz.build +++ b/dom/system/moz.build @@ -27,7 +27,7 @@ EXPORTS.mozilla += [ 'OSFileConstants.h', ] -SOURCES += [ +UNIFIED_SOURCES += [ 'nsDeviceSensors.cpp', 'OSFileConstants.cpp', ] diff --git a/dom/time/moz.build b/dom/time/moz.build index e40187c9de..e9ab58dc28 100644 --- a/dom/time/moz.build +++ b/dom/time/moz.build @@ -14,7 +14,7 @@ EXPORTS.mozilla.dom.time += [ 'TimeService.h', ] -SOURCES += [ +UNIFIED_SOURCES += [ 'DateCacheCleaner.cpp', 'TimeChangeObserver.cpp', 'TimeManager.cpp', diff --git a/dom/u2f/moz.build b/dom/u2f/moz.build index 92edac66d1..cd54b4bef8 100644 --- a/dom/u2f/moz.build +++ b/dom/u2f/moz.build @@ -9,7 +9,7 @@ EXPORTS.mozilla.dom += [ 'USBToken.h', ] -SOURCES += [ +UNIFIED_SOURCES += [ 'NSSU2FTokenRemote.cpp', 'U2F.cpp', 'USBToken.cpp', diff --git a/dom/url/moz.build b/dom/url/moz.build index 7571f4d5e6..bbc21f812b 100644 --- a/dom/url/moz.build +++ b/dom/url/moz.build @@ -8,7 +8,7 @@ EXPORTS.mozilla.dom += [ 'URLSearchParams.h', ] -SOURCES += [ +UNIFIED_SOURCES += [ 'URL.cpp', 'URLSearchParams.cpp', ] diff --git a/dom/workers/moz.build b/dom/workers/moz.build index 5c4093f40f..5421d65a8d 100644 --- a/dom/workers/moz.build +++ b/dom/workers/moz.build @@ -46,7 +46,7 @@ XPIDL_SOURCES += [ 'nsIWorkerDebuggerManager.idl', ] -SOURCES += [ +UNIFIED_SOURCES += [ 'ChromeWorkerScope.cpp', 'FileReaderSync.cpp', 'Principal.cpp', diff --git a/dom/worklet/moz.build b/dom/worklet/moz.build index de29159fd8..ab95c56e10 100644 --- a/dom/worklet/moz.build +++ b/dom/worklet/moz.build @@ -8,7 +8,7 @@ EXPORTS.mozilla.dom += [ 'WorkletGlobalScope.h', ] -SOURCES += [ +UNIFIED_SOURCES += [ 'Worklet.cpp', 'WorkletGlobalScope.cpp', ] diff --git a/dom/xbl/moz.build b/dom/xbl/moz.build index 24a9f003e3..a85abc4658 100644 --- a/dom/xbl/moz.build +++ b/dom/xbl/moz.build @@ -15,7 +15,7 @@ EXPORTS.mozilla.dom += [ 'XBLChildrenElement.h', ] -SOURCES += [ +UNIFIED_SOURCES += [ 'nsBindingManager.cpp', 'nsXBLBinding.cpp', 'nsXBLContentSink.cpp', diff --git a/dom/xhr/moz.build b/dom/xhr/moz.build index 0eb01eabc5..1250800b78 100644 --- a/dom/xhr/moz.build +++ b/dom/xhr/moz.build @@ -17,7 +17,7 @@ EXPORTS.mozilla.dom += [ 'XMLHttpRequestUpload.h', ] -SOURCES += [ +UNIFIED_SOURCES += [ 'XMLHttpRequest.cpp', 'XMLHttpRequestEventTarget.cpp', 'XMLHttpRequestMainThread.cpp', diff --git a/dom/xml/moz.build b/dom/xml/moz.build index e40e18e49b..81e29a6b9e 100644 --- a/dom/xml/moz.build +++ b/dom/xml/moz.build @@ -19,7 +19,7 @@ EXPORTS.mozilla.dom += [ 'XMLStylesheetProcessingInstruction.h', ] -SOURCES += [ +UNIFIED_SOURCES += [ 'CDATASection.cpp', 'nsXMLContentSink.cpp', 'nsXMLElement.cpp', diff --git a/dom/xslt/base/moz.build b/dom/xslt/base/moz.build index 64908a1c16..8286dd3882 100644 --- a/dom/xslt/base/moz.build +++ b/dom/xslt/base/moz.build @@ -3,7 +3,7 @@ # 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/. -SOURCES += [ +UNIFIED_SOURCES += [ 'txDouble.cpp', 'txExpandedName.cpp', 'txExpandedNameMap.cpp', diff --git a/dom/xslt/xml/moz.build b/dom/xslt/xml/moz.build index ff085df13f..cdd16dc1e3 100644 --- a/dom/xslt/xml/moz.build +++ b/dom/xslt/xml/moz.build @@ -3,7 +3,7 @@ # 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/. -SOURCES += [ +UNIFIED_SOURCES += [ 'txXMLParser.cpp', 'txXMLUtils.cpp', ] diff --git a/dom/xslt/xpath/moz.build b/dom/xslt/xpath/moz.build index a987b25089..635ff7d8e9 100644 --- a/dom/xslt/xpath/moz.build +++ b/dom/xslt/xpath/moz.build @@ -9,7 +9,7 @@ EXPORTS.mozilla.dom += [ 'XPathResult.h', ] -SOURCES += [ +UNIFIED_SOURCES += [ 'txBooleanExpr.cpp', 'txBooleanResult.cpp', 'txCoreFunctionCall.cpp', diff --git a/dom/xslt/xslt/moz.build b/dom/xslt/xslt/moz.build index 760a09087c..3a26c169c1 100644 --- a/dom/xslt/xslt/moz.build +++ b/dom/xslt/xslt/moz.build @@ -7,7 +7,7 @@ EXPORTS.mozilla.dom += [ 'txMozillaXSLTProcessor.h' ] -SOURCES += [ +UNIFIED_SOURCES += [ 'txBufferingHandler.cpp', 'txCurrentFunctionCall.cpp', 'txDocumentFunctionCall.cpp', diff --git a/dom/xul/moz.build b/dom/xul/moz.build index 6bee058846..c2e0fc8262 100644 --- a/dom/xul/moz.build +++ b/dom/xul/moz.build @@ -34,7 +34,7 @@ XPIDL_SOURCES += [ XPIDL_MODULE = 'xul' -SOURCES += [ +UNIFIED_SOURCES += [ 'nsXULControllers.cpp', ] diff --git a/dom/xul/templates/moz.build b/dom/xul/templates/moz.build index 54811df446..250614e924 100644 --- a/dom/xul/templates/moz.build +++ b/dom/xul/templates/moz.build @@ -16,7 +16,7 @@ XPIDL_SOURCES += [ XPIDL_MODULE = 'xultmpl' -SOURCES += [ +UNIFIED_SOURCES += [ 'nsContentSupportMap.cpp', 'nsContentTestNode.cpp', 'nsInstantiationNode.cpp', diff --git a/editor/composer/moz.build b/editor/composer/moz.build index 8da0e1f329..eb72e14be2 100644 --- a/editor/composer/moz.build +++ b/editor/composer/moz.build @@ -13,7 +13,7 @@ XPIDL_SOURCES += [ XPIDL_MODULE = 'composer' -SOURCES += [ +UNIFIED_SOURCES += [ 'nsComposerCommands.cpp', 'nsComposerCommandsUpdater.cpp', 'nsComposerController.cpp', diff --git a/editor/libeditor/moz.build b/editor/libeditor/moz.build index cc4e309e6a..a999782a3a 100644 --- a/editor/libeditor/moz.build +++ b/editor/libeditor/moz.build @@ -29,7 +29,7 @@ EXPORTS.mozilla += [ 'TextEditRules.h', ] -SOURCES += [ +UNIFIED_SOURCES += [ 'ChangeAttributeTransaction.cpp', 'ChangeStyleTransaction.cpp', 'CompositionTransaction.cpp', diff --git a/gfx/graphite2/src/moz.build b/gfx/graphite2/src/moz.build index ecf396e2b0..2e517449a1 100644 --- a/gfx/graphite2/src/moz.build +++ b/gfx/graphite2/src/moz.build @@ -12,16 +12,16 @@ EXPORTS.graphite2 += [ ] if CONFIG['GNU_CC']: - SOURCES += [ + UNIFIED_SOURCES += [ 'direct_machine.cpp' ] else: - SOURCES += [ + UNIFIED_SOURCES += [ 'call_machine.cpp' ] # This should contain all of the _SOURCES from files.mk, except *_machine.cpp -SOURCES += [ +UNIFIED_SOURCES += [ 'CachedFace.cpp', 'CmapCache.cpp', 'Code.cpp', diff --git a/gfx/harfbuzz/src/moz.build b/gfx/harfbuzz/src/moz.build index 00abf656c0..92dbedb016 100644 --- a/gfx/harfbuzz/src/moz.build +++ b/gfx/harfbuzz/src/moz.build @@ -25,32 +25,35 @@ EXPORTS.harfbuzz += [ ] SOURCES += [ - 'hb-blob.cc', + 'hb-blob.cc', # error: use of undeclared identifier 'snprintf' (FreeBSD) + 'hb-common.cc', # error: use of undeclared identifier 'strdup' + 'hb-ot-math.cc', # conflict with hb-ot-layout.cc + 'hb-ot-shape-complex-hangul.cc', # error: redefinition of enumerator 'NONE' + 'hb-ot-shape-complex-indic.cc', # error: redefinition of enumerator 'INIT' + 'hb-ot-shape-complex-use.cc', # error: redefinition of 'basic_features' + 'hb-ot-shape.cc', # error: functions that differ only in their return type cannot be overloaded + 'hb-shape-plan.cc', # error: redefinition of 'hb_ot_shaper_face_data_ensure' +] + +UNIFIED_SOURCES += [ 'hb-buffer.cc', - 'hb-common.cc', 'hb-face.cc', 'hb-fallback-shape.cc', 'hb-font.cc', 'hb-ot-layout.cc', 'hb-ot-map.cc', - 'hb-ot-math.cc', 'hb-ot-shape-complex-arabic.cc', 'hb-ot-shape-complex-default.cc', - 'hb-ot-shape-complex-hangul.cc', 'hb-ot-shape-complex-hebrew.cc', 'hb-ot-shape-complex-indic-table.cc', - 'hb-ot-shape-complex-indic.cc', 'hb-ot-shape-complex-myanmar.cc', 'hb-ot-shape-complex-thai.cc', 'hb-ot-shape-complex-tibetan.cc', 'hb-ot-shape-complex-use-table.cc', - 'hb-ot-shape-complex-use.cc', 'hb-ot-shape-fallback.cc', 'hb-ot-shape-normalize.cc', - 'hb-ot-shape.cc', 'hb-ot-tag.cc', 'hb-set.cc', - 'hb-shape-plan.cc', 'hb-shape.cc', 'hb-shaper.cc', 'hb-unicode.cc', diff --git a/gfx/ipc/moz.build b/gfx/ipc/moz.build index 312fabcf66..43cdff703f 100644 --- a/gfx/ipc/moz.build +++ b/gfx/ipc/moz.build @@ -36,12 +36,12 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows': 'SharedDIBSurface.h', 'SharedDIBWin.h', ] - SOURCES += [ + UNIFIED_SOURCES += [ 'SharedDIBSurface.cpp', 'SharedDIBWin.cpp', ] -SOURCES += [ +UNIFIED_SOURCES += [ 'CompositorSession.cpp', 'CompositorWidgetVsyncObserver.cpp', 'D3DMessageUtils.cpp', diff --git a/gfx/ots/src/moz.build b/gfx/ots/src/moz.build index 909a2092e8..b5c7ceca9e 100644 --- a/gfx/ots/src/moz.build +++ b/gfx/ots/src/moz.build @@ -8,7 +8,7 @@ EXPORTS += [ '../include/ots-memory-stream.h', ] -SOURCES += [ +UNIFIED_SOURCES += [ 'avar.cc', 'cff.cc', 'cff_charstring.cc', diff --git a/gfx/skia/generate_mozbuild.py b/gfx/skia/generate_mozbuild.py index a15fd40861..33594bd32c 100755 --- a/gfx/skia/generate_mozbuild.py +++ b/gfx/skia/generate_mozbuild.py @@ -75,7 +75,7 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] in { if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows': DEFINES['UNICODE'] = True DEFINES['_UNICODE'] = True - SOURCES += [ + UNIFIED_SOURCES += [ 'skia/src/fonts/SkFontMgr_indirect.cpp', 'skia/src/fonts/SkRemotableFontMgr.cpp', ] @@ -407,7 +407,7 @@ def write_sources(f, values, indent): else: sources['unified'].add(item) - write_list(f, "SOURCES", sources['unified'], indent) + write_list(f, "UNIFIED_SOURCES", sources['unified'], indent) write_list(f, "SOURCES", sources['nonunified'], indent) def write_list(f, name, values, indent): diff --git a/gfx/skia/moz.build b/gfx/skia/moz.build index 75a66dd28e..61d8c8570d 100644 --- a/gfx/skia/moz.build +++ b/gfx/skia/moz.build @@ -22,7 +22,7 @@ if CONFIG['MOZ_OPTIMIZE']: elif CONFIG['GNU_CC']: skia_opt_flags += ['-O2'] -SOURCES += [ +UNIFIED_SOURCES += [ 'skia/src/core/SkAAClip.cpp', 'skia/src/core/SkAlphaRuns.cpp', 'skia/src/core/SkAnnotation.cpp', @@ -308,7 +308,7 @@ SOURCES['skia/src/core/SkSpriteBlitter4f.cpp'].flags += skia_opt_flags SOURCES['skia/src/core/SkSpriteBlitter_ARGB32.cpp'].flags += skia_opt_flags SOURCES['skia/src/core/SkSpriteBlitter_RGB16.cpp'].flags += skia_opt_flags if CONFIG['MOZ_ENABLE_SKIA_PDF']: - SOURCES += [ + UNIFIED_SOURCES += [ 'skia/src/core/SkMD5.cpp', 'skia/src/pdf/SkDeflate.cpp', 'skia/src/pdf/SkJpegInfo.cpp', @@ -332,7 +332,7 @@ if CONFIG['MOZ_ENABLE_SKIA_PDF']: 'skia/src/pdf/SkPDFFont.cpp', ] if CONFIG['MOZ_ENABLE_SKIA_GPU']: - SOURCES += [ + UNIFIED_SOURCES += [ 'skia/src/effects/gradients/SkTwoPointConicalGradient_gpu.cpp', 'skia/src/gpu/batches/GrAnalyticRectBatch.cpp', 'skia/src/gpu/batches/GrAtlasTextBatch.cpp', @@ -517,7 +517,7 @@ if CONFIG['MOZ_ENABLE_SKIA_GPU']: 'skia/src/image/SkImage_Gpu.cpp', ] if CONFIG['MOZ_WIDGET_TOOLKIT'] in {'cocoa', 'uikit'}: - SOURCES += [ + UNIFIED_SOURCES += [ 'skia/src/ports/SkDebug_stdio.cpp', 'skia/src/ports/SkOSFile_posix.cpp', 'skia/src/ports/SkOSLibrary_posix.cpp', @@ -530,7 +530,7 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] in {'cocoa', 'uikit'}: 'skia/src/ports/SkFontHost_mac.cpp', ] if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']: - SOURCES += [ + UNIFIED_SOURCES += [ 'skia/src/ports/SkDebug_stdio.cpp', 'skia/src/ports/SkOSFile_posix.cpp', 'skia/src/ports/SkOSLibrary_posix.cpp', @@ -562,7 +562,7 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows': 'skia/src/utils/win/SkIStream.cpp', ] if CONFIG['INTEL_ARCHITECTURE']: - SOURCES += [ + UNIFIED_SOURCES += [ 'skia/src/opts/opts_check_x86.cpp', ] SOURCES += [ @@ -586,7 +586,7 @@ if CONFIG['INTEL_ARCHITECTURE']: SOURCES['skia/src/opts/SkOpts_sse42.cpp'].flags += skia_opt_flags SOURCES['skia/src/opts/SkOpts_ssse3.cpp'].flags += skia_opt_flags elif CONFIG['CPU_ARCH'] in ('arm', 'aarch64') and CONFIG['GNU_CC']: - SOURCES += [ + UNIFIED_SOURCES += [ 'skia/src/core/SkUtilsArm.cpp', ] SOURCES += [ diff --git a/gfx/src/moz.build b/gfx/src/moz.build index 993d4bde2c..2029a10a10 100644 --- a/gfx/src/moz.build +++ b/gfx/src/moz.build @@ -55,12 +55,11 @@ if CONFIG['MOZ_X11']: 'X11Util.cpp', ] -SOURCES += [ +UNIFIED_SOURCES += [ 'DriverCrashGuard.cpp', 'FilterSupport.cpp', 'gfxTelemetry.cpp', 'nsColor.cpp', - 'nsDeviceContext.cpp', 'nsFont.cpp', 'nsFontMetrics.cpp', 'nsRect.cpp', @@ -72,6 +71,11 @@ SOURCES += [ 'TiledRegion.cpp', ] +# nsDeviceContext.cpp cannot be built in unified mode because it pulls in OS X system headers. +SOURCES += [ + 'nsDeviceContext.cpp', +] + include('/ipc/chromium/chromium-config.mozbuild') LOCAL_INCLUDES += [ diff --git a/gfx/ycbcr/moz.build b/gfx/ycbcr/moz.build index 7e04c96ed1..0c8eb7b83c 100644 --- a/gfx/ycbcr/moz.build +++ b/gfx/ycbcr/moz.build @@ -7,7 +7,7 @@ EXPORTS += [ 'YCbCrUtils.h', ] -SOURCES += [ +UNIFIED_SOURCES += [ 'scale_yuv_argb.cpp', 'ycbcr_to_rgb565.cpp', 'YCbCrUtils.cpp', diff --git a/js/src/editline/moz.build b/js/src/editline/moz.build index 1213854c1a..420c98df2e 100644 --- a/js/src/editline/moz.build +++ b/js/src/editline/moz.build @@ -5,7 +5,7 @@ Library('editline') -SOURCES += [ +UNIFIED_SOURCES += [ 'editline.c', 'sysunix.c', ] diff --git a/js/src/shell/moz.build b/js/src/shell/moz.build index 93812da74a..97893b310c 100644 --- a/js/src/shell/moz.build +++ b/js/src/shell/moz.build @@ -11,7 +11,7 @@ if CONFIG['JS_SHELL_NAME']: USE_LIBS += ['editline'] USE_LIBS += ['static:js'] -SOURCES += [ +UNIFIED_SOURCES += [ 'js.cpp', 'jsoptparse.cpp', 'jsshell.cpp', diff --git a/layout/build/moz.build b/layout/build/moz.build index d7996af8d9..bb746969ab 100644 --- a/layout/build/moz.build +++ b/layout/build/moz.build @@ -9,7 +9,7 @@ EXPORTS += [ 'nsLayoutStatics.h', ] -SOURCES += [ +UNIFIED_SOURCES += [ 'nsContentDLF.cpp', 'nsLayoutModule.cpp', 'nsLayoutStatics.cpp', diff --git a/layout/forms/moz.build b/layout/forms/moz.build index d3765c5f36..f68c7291ae 100644 --- a/layout/forms/moz.build +++ b/layout/forms/moz.build @@ -17,7 +17,7 @@ EXPORTS += [ 'nsITextControlFrame.h', ] -SOURCES += [ +UNIFIED_SOURCES += [ 'nsButtonFrameRenderer.cpp', 'nsColorControlFrame.cpp', 'nsComboboxControlFrame.cpp', diff --git a/layout/inspector/moz.build b/layout/inspector/moz.build index 0fed1f1b01..44b856a289 100644 --- a/layout/inspector/moz.build +++ b/layout/inspector/moz.build @@ -25,7 +25,7 @@ EXPORTS += [ 'nsFontFaceList.h', ] -SOURCES += [ +UNIFIED_SOURCES += [ 'inCSSValueSearch.cpp', 'inDeepTreeWalker.cpp', 'inDOMUtils.cpp', diff --git a/layout/ipc/moz.build b/layout/ipc/moz.build index 2711432fdb..20e717a07e 100644 --- a/layout/ipc/moz.build +++ b/layout/ipc/moz.build @@ -13,9 +13,12 @@ EXPORTS.mozilla.layout += [ 'VsyncParent.h', ] -SOURCES += [ +UNIFIED_SOURCES += [ 'RenderFrameChild.cpp', 'RenderFrameParent.cpp', +] + +SOURCES += [ 'VsyncChild.cpp', 'VsyncParent.cpp', ] diff --git a/layout/mathml/moz.build b/layout/mathml/moz.build index e058257853..6ba8dcdeb8 100644 --- a/layout/mathml/moz.build +++ b/layout/mathml/moz.build @@ -15,7 +15,7 @@ if CONFIG['ENABLE_TESTS']: 'tests/chrome.ini', ] -SOURCES += [ +UNIFIED_SOURCES += [ 'nsMathMLChar.cpp', 'nsMathMLContainerFrame.cpp', 'nsMathMLFrame.cpp', diff --git a/layout/tools/layout-debug/src/moz.build b/layout/tools/layout-debug/src/moz.build index 8cc33aae4f..55199f6521 100644 --- a/layout/tools/layout-debug/src/moz.build +++ b/layout/tools/layout-debug/src/moz.build @@ -14,7 +14,7 @@ EXPORTS += [ 'nsLayoutDebugCIID.h', ] -SOURCES += [ +UNIFIED_SOURCES += [ 'nsDebugFactory.cpp', 'nsLayoutDebugCLH.cpp', 'nsLayoutDebuggingTools.cpp', diff --git a/netwerk/base/moz.build b/netwerk/base/moz.build index 1659299f7b..78482d87fa 100644 --- a/netwerk/base/moz.build +++ b/netwerk/base/moz.build @@ -181,7 +181,7 @@ EXPORTS.mozilla.net += [ 'ReferrerPolicy.h', ] -SOURCES += [ +UNIFIED_SOURCES += [ 'ArrayBufferInputStream.cpp', 'BackgroundFileSaver.cpp', 'CaptivePortalService.cpp', diff --git a/netwerk/cache/moz.build b/netwerk/cache/moz.build index 32dddc1bab..03810fc288 100644 --- a/netwerk/cache/moz.build +++ b/netwerk/cache/moz.build @@ -20,7 +20,7 @@ EXPORTS += [ 'nsDeleteDir.h' ] -SOURCES += [ +UNIFIED_SOURCES += [ 'nsApplicationCacheService.cpp', 'nsCache.cpp', 'nsCacheEntry.cpp', diff --git a/netwerk/cache/nsApplicationCacheService.cpp b/netwerk/cache/nsApplicationCacheService.cpp index 17012518d4..c512b91695 100644 --- a/netwerk/cache/nsApplicationCacheService.cpp +++ b/netwerk/cache/nsApplicationCacheService.cpp @@ -16,8 +16,6 @@ using namespace mozilla; -static NS_DEFINE_CID(kCacheServiceCID, NS_CACHESERVICE_CID); - //----------------------------------------------------------------------------- // nsApplicationCacheService //----------------------------------------------------------------------------- diff --git a/netwerk/cache/nsDiskCacheDeviceSQL.cpp b/netwerk/cache/nsDiskCacheDeviceSQL.cpp index 297c0f362a..86ace05f7e 100644 --- a/netwerk/cache/nsDiskCacheDeviceSQL.cpp +++ b/netwerk/cache/nsDiskCacheDeviceSQL.cpp @@ -17,8 +17,6 @@ #include "nsCacheService.h" #include "nsApplicationCache.h" -#include "nsNetCID.h" -#include "nsNetUtil.h" #include "nsIURI.h" #include "nsAutoPtr.h" #include "nsEscape.h" @@ -55,7 +53,6 @@ using namespace mozilla::storage; using mozilla::NeckoOriginAttributes; static const char OFFLINE_CACHE_DEVICE_ID[] = { "offline" }; -static NS_DEFINE_CID(kCacheServiceCID, NS_CACHESERVICE_CID); #define LOG(args) CACHE_LOG_DEBUG(args) diff --git a/netwerk/cache/nsDiskCacheDeviceSQL.h b/netwerk/cache/nsDiskCacheDeviceSQL.h index fcde58d3d7..f6f8db2c7b 100644 --- a/netwerk/cache/nsDiskCacheDeviceSQL.h +++ b/netwerk/cache/nsDiskCacheDeviceSQL.h @@ -21,6 +21,10 @@ #include "nsWeakReference.h" #include "mozilla/Attributes.h" #include "mozilla/Mutex.h" +#include "nsNetCID.h" +#include "nsNetUtil.h" + +static NS_DEFINE_CID(kCacheServiceCID, NS_CACHESERVICE_CID); class nsIURI; class nsOfflineCacheDevice; diff --git a/netwerk/cache2/moz.build b/netwerk/cache2/moz.build index bc8dd0e426..90473a1d29 100644 --- a/netwerk/cache2/moz.build +++ b/netwerk/cache2/moz.build @@ -20,8 +20,7 @@ EXPORTS += [ 'CacheStorageService.h', ] -SOURCES += [ - 'AppCacheStorage.cpp', +UNIFIED_SOURCES += [ 'CacheEntry.cpp', 'CacheFile.cpp', 'CacheFileChunk.cpp', @@ -43,6 +42,11 @@ SOURCES += [ 'OldWrappers.cpp', ] +# AppCacheStorage.cpp cannot be built in unified mode because it uses plarena.h. +SOURCES += [ + 'AppCacheStorage.cpp', +] + LOCAL_INCLUDES += [ '/netwerk/base', '/netwerk/cache', diff --git a/netwerk/cookie/moz.build b/netwerk/cookie/moz.build index 2057950508..78e9333774 100644 --- a/netwerk/cookie/moz.build +++ b/netwerk/cookie/moz.build @@ -20,10 +20,13 @@ if CONFIG['NECKO_COOKIES']: 'CookieServiceChild.h', 'CookieServiceParent.h', ] - SOURCES += [ + UNIFIED_SOURCES += [ 'CookieServiceChild.cpp', 'CookieServiceParent.cpp', 'nsCookie.cpp', + ] + # nsCookieService.cpp can't be unified because of symbol conflicts + SOURCES += [ 'nsCookieService.cpp', ] LOCAL_INCLUDES += [ diff --git a/netwerk/dns/moz.build b/netwerk/dns/moz.build index 06ee6c8084..005b314f8d 100644 --- a/netwerk/dns/moz.build +++ b/netwerk/dns/moz.build @@ -28,6 +28,11 @@ EXPORTS.mozilla.net += [ ] SOURCES += [ + 'nsEffectiveTLDService.cpp', # Excluded from UNIFIED_SOURCES due to special build flags. + 'nsHostResolver.cpp', # Redefines LOG +] + +UNIFIED_SOURCES += [ 'ChildDNSService.cpp', 'DNS.cpp', 'DNSListenerProxy.cpp', @@ -35,8 +40,6 @@ SOURCES += [ 'DNSRequestParent.cpp', 'GetAddrInfo.cpp', 'nsDNSService2.cpp', - 'nsEffectiveTLDService.cpp', - 'nsHostResolver.cpp', 'nsIDNService.cpp', 'punycode.c', ] diff --git a/netwerk/ipc/moz.build b/netwerk/ipc/moz.build index 8571579f88..8d8bc7cb91 100644 --- a/netwerk/ipc/moz.build +++ b/netwerk/ipc/moz.build @@ -11,7 +11,7 @@ EXPORTS.mozilla.net += [ 'NeckoParent.h', ] -SOURCES += [ +UNIFIED_SOURCES += [ 'ChannelEventQueue.cpp', 'NeckoChild.cpp', 'NeckoCommon.cpp', diff --git a/netwerk/protocol/data/moz.build b/netwerk/protocol/data/moz.build index 0d5d27d429..54b76f8856 100644 --- a/netwerk/protocol/data/moz.build +++ b/netwerk/protocol/data/moz.build @@ -7,7 +7,7 @@ EXPORTS.mozilla.net += [ 'DataChannelParent.h', ] -SOURCES += [ +UNIFIED_SOURCES += [ 'DataChannelChild.cpp', 'DataChannelParent.cpp', 'nsDataChannel.cpp', diff --git a/netwerk/protocol/device/moz.build b/netwerk/protocol/device/moz.build index 2a52c9e5f0..37d6695bdb 100644 --- a/netwerk/protocol/device/moz.build +++ b/netwerk/protocol/device/moz.build @@ -3,7 +3,7 @@ # 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/. -SOURCES += [ +UNIFIED_SOURCES += [ 'nsDeviceChannel.cpp', 'nsDeviceProtocolHandler.cpp', ] diff --git a/netwerk/protocol/file/moz.build b/netwerk/protocol/file/moz.build index ebfb4bd690..c58c033af1 100644 --- a/netwerk/protocol/file/moz.build +++ b/netwerk/protocol/file/moz.build @@ -14,7 +14,7 @@ XPIDL_SOURCES += [ XPIDL_MODULE = 'necko_file' -SOURCES += [ +UNIFIED_SOURCES += [ 'nsFileChannel.cpp', 'nsFileProtocolHandler.cpp', ] diff --git a/netwerk/protocol/ftp/moz.build b/netwerk/protocol/ftp/moz.build index a192ab40ce..18c7f0fdb7 100644 --- a/netwerk/protocol/ftp/moz.build +++ b/netwerk/protocol/ftp/moz.build @@ -19,7 +19,7 @@ EXPORTS.mozilla.net += [ 'FTPChannelParent.h', ] -SOURCES += [ +UNIFIED_SOURCES += [ 'FTPChannelChild.cpp', 'FTPChannelParent.cpp', 'nsFTPChannel.cpp', diff --git a/netwerk/protocol/http/moz.build b/netwerk/protocol/http/moz.build index cf006a8c63..91fc897224 100644 --- a/netwerk/protocol/http/moz.build +++ b/netwerk/protocol/http/moz.build @@ -42,11 +42,18 @@ EXPORTS.mozilla.net += [ 'TimingStruct.h', ] +# ASpdySession.cpp and nsHttpAuthCache cannot be built in unified mode because +# they use plarena.h. SOURCES += [ - 'AltDataOutputStreamChild.cpp', - 'AltDataOutputStreamParent.cpp', 'AlternateServices.cpp', 'ASpdySession.cpp', + 'nsHttpAuthCache.cpp', + 'nsHttpChannelAuthProvider.cpp', # redefines GetAuthType +] + +UNIFIED_SOURCES += [ + 'AltDataOutputStreamChild.cpp', + 'AltDataOutputStreamParent.cpp', 'CacheControlParser.cpp', 'ConnectionDiagnostics.cpp', 'Http2Compression.cpp', @@ -62,17 +69,14 @@ SOURCES += [ 'nsCORSListenerProxy.cpp', 'nsHttp.cpp', 'nsHttpActivityDistributor.cpp', - 'nsHttpAuthCache.cpp', 'nsHttpAuthManager.cpp', 'nsHttpBasicAuth.cpp', 'nsHttpChannel.cpp', - 'nsHttpChannelAuthProvider.cpp', 'nsHttpChunkedDecoder.cpp', 'nsHttpConnection.cpp', 'nsHttpConnectionInfo.cpp', 'nsHttpConnectionMgr.cpp', 'nsHttpDigestAuth.cpp', - 'nsHttpHandler.cpp', 'nsHttpHeaderArray.cpp', 'nsHttpNTLMAuth.cpp', 'nsHttpPipeline.cpp', @@ -84,6 +88,11 @@ SOURCES += [ 'TunnelUtils.cpp', ] +# These files cannot be built in unified mode because of OS X headers. +SOURCES += [ + 'nsHttpHandler.cpp', +] + IPDL_SOURCES += [ 'PAltDataOutputStream.ipdl', 'PHttpChannel.ipdl', diff --git a/netwerk/protocol/res/moz.build b/netwerk/protocol/res/moz.build index 0d8f7e8ccb..79051cdb44 100644 --- a/netwerk/protocol/res/moz.build +++ b/netwerk/protocol/res/moz.build @@ -10,7 +10,7 @@ XPIDL_SOURCES += [ XPIDL_MODULE = 'necko_res' -SOURCES += [ +UNIFIED_SOURCES += [ 'ExtensionProtocolHandler.cpp', 'nsResProtocolHandler.cpp', 'SubstitutingProtocolHandler.cpp', diff --git a/netwerk/protocol/viewsource/moz.build b/netwerk/protocol/viewsource/moz.build index 3cd326f8ae..0422e3c60a 100644 --- a/netwerk/protocol/viewsource/moz.build +++ b/netwerk/protocol/viewsource/moz.build @@ -9,7 +9,7 @@ XPIDL_SOURCES += [ XPIDL_MODULE = 'necko_viewsource' -SOURCES += [ +UNIFIED_SOURCES += [ 'nsViewSourceChannel.cpp', 'nsViewSourceHandler.cpp', ] diff --git a/netwerk/protocol/wyciwyg/moz.build b/netwerk/protocol/wyciwyg/moz.build index 47f5f01374..a9a6bdb90b 100644 --- a/netwerk/protocol/wyciwyg/moz.build +++ b/netwerk/protocol/wyciwyg/moz.build @@ -14,7 +14,7 @@ EXPORTS.mozilla.net += [ 'WyciwygChannelParent.h', ] -SOURCES += [ +UNIFIED_SOURCES += [ 'nsWyciwyg.cpp', 'nsWyciwygChannel.cpp', 'nsWyciwygProtocolHandler.cpp', diff --git a/netwerk/socket/moz.build b/netwerk/socket/moz.build index c539a96dbb..6f7525f401 100644 --- a/netwerk/socket/moz.build +++ b/netwerk/socket/moz.build @@ -17,7 +17,7 @@ LOCAL_INCLUDES += [ '/netwerk/base', ] -SOURCES += [ +UNIFIED_SOURCES += [ 'nsSocketProviderService.cpp', 'nsSOCKSIOLayer.cpp', 'nsSOCKSSocketProvider.cpp', @@ -28,7 +28,7 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows': XPIDL_SOURCES += [ 'nsINamedPipeService.idl', ] - SOURCES += [ + UNIFIED_SOURCES += [ 'nsNamedPipeIOLayer.cpp', 'nsNamedPipeService.cpp' ] diff --git a/netwerk/srtp/src/moz.build b/netwerk/srtp/src/moz.build index 29bf0addae..4b5e4311a5 100644 --- a/netwerk/srtp/src/moz.build +++ b/netwerk/srtp/src/moz.build @@ -3,7 +3,7 @@ # 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/. -SOURCES += [ +UNIFIED_SOURCES += [ 'crypto/cipher/aes.c', 'crypto/cipher/aes_cbc.c', 'crypto/cipher/aes_icm.c', diff --git a/netwerk/streamconv/converters/moz.build b/netwerk/streamconv/converters/moz.build index 8630922404..22f544e4c4 100644 --- a/netwerk/streamconv/converters/moz.build +++ b/netwerk/streamconv/converters/moz.build @@ -9,7 +9,7 @@ XPIDL_SOURCES += [ XPIDL_MODULE = 'necko_http' -SOURCES += [ +UNIFIED_SOURCES += [ 'mozTXTToHTMLConv.cpp', 'nsDirIndex.cpp', 'nsDirIndexParser.cpp', @@ -21,13 +21,13 @@ SOURCES += [ ] if 'ftp' in CONFIG['NECKO_PROTOCOLS']: - SOURCES += [ + UNIFIED_SOURCES += [ 'nsFTPDirListingConv.cpp', 'ParseFTPList.cpp', ] if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'cocoa': - SOURCES += [ + UNIFIED_SOURCES += [ 'nsBinHexDecoder.cpp', ] diff --git a/netwerk/wifi/moz.build b/netwerk/wifi/moz.build index 9d38dcc447..fc30584a03 100644 --- a/netwerk/wifi/moz.build +++ b/netwerk/wifi/moz.build @@ -11,13 +11,16 @@ XPIDL_SOURCES += [ XPIDL_MODULE = 'necko_wifi' -SOURCES += [ +UNIFIED_SOURCES += [ 'nsWifiAccessPoint.cpp', +] + +UNIFIED_SOURCES += [ 'nsWifiMonitor.cpp', ] if CONFIG['OS_ARCH'] == 'Darwin': - SOURCES += [ + UNIFIED_SOURCES += [ 'nsWifiScannerMac.cpp', ] SOURCES += [ @@ -28,23 +31,23 @@ if CONFIG['OS_ARCH'] == 'Darwin': # to accept the warnings when targeting the newer SDKs. SOURCES['osx_corewlan.mm'].flags += ['-Wno-error=objc-method-access'] elif CONFIG['OS_ARCH'] in ('DragonFly', 'FreeBSD'): - SOURCES += [ + UNIFIED_SOURCES += [ 'nsWifiScannerFreeBSD.cpp', ] elif CONFIG['OS_ARCH'] == 'WINNT': - SOURCES += [ + UNIFIED_SOURCES += [ 'nsWifiScannerWin.cpp', 'win_wifiScanner.cpp', 'win_wlanLibrary.cpp', ] elif CONFIG['OS_ARCH'] == 'SunOS': CXXFLAGS += CONFIG['GLIB_CFLAGS'] - SOURCES += [ + UNIFIED_SOURCES += [ 'nsWifiScannerSolaris.cpp', ] if CONFIG['NECKO_WIFI_DBUS']: - SOURCES += [ + UNIFIED_SOURCES += [ 'nsWifiScannerDBus.cpp', ] CXXFLAGS += ['-Wno-error=shadow'] -- cgit v1.2.3