diff options
author | Moonchild <moonchild@palemoon.org> | 2020-04-24 23:49:40 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-24 23:49:40 +0200 |
commit | 7a9c933a2331fdc9ba214dcb81f8c39396885a9d (patch) | |
tree | de5e3c2b926c209c5f58cb8860d09d769a6fead7 | |
parent | 400e9018fd5b1b8e50ba5ea403ba98f9a658c076 (diff) | |
parent | 756162415bde12e60125f0b3a69e321c45956ae3 (diff) | |
download | UXP-7a9c933a2331fdc9ba214dcb81f8c39396885a9d.tar UXP-7a9c933a2331fdc9ba214dcb81f8c39396885a9d.tar.gz UXP-7a9c933a2331fdc9ba214dcb81f8c39396885a9d.tar.lz UXP-7a9c933a2331fdc9ba214dcb81f8c39396885a9d.tar.xz UXP-7a9c933a2331fdc9ba214dcb81f8c39396885a9d.zip |
Merge pull request #1522 from MoonchildProductions/deunify_dom
Deunify dom
122 files changed, 358 insertions, 157 deletions
diff --git a/dom/media/eme/MediaKeySystemAccess.cpp b/dom/media/eme/MediaKeySystemAccess.cpp index 4a5a7a30c..e4e86f4c5 100644 --- a/dom/media/eme/MediaKeySystemAccess.cpp +++ b/dom/media/eme/MediaKeySystemAccess.cpp @@ -36,9 +36,11 @@ #include "mozilla/ClearOnShutdown.h" #include "nsUnicharUtils.h" #include "mozilla/dom/MediaSource.h" +#include "DecoderTraits.h" #ifdef MOZ_WIDGET_ANDROID #include "FennecJNIWrappers.h" #endif + namespace mozilla { namespace dom { diff --git a/dom/media/platforms/apple/AppleCMLinker.cpp b/dom/media/platforms/apple/AppleCMLinker.cpp index 5227bf9e5..b1417b46a 100644 --- a/dom/media/platforms/apple/AppleCMLinker.cpp +++ b/dom/media/platforms/apple/AppleCMLinker.cpp @@ -7,7 +7,9 @@ #include <dlfcn.h> #include "AppleCMLinker.h" +#include "PlatformDecoderModule.h" #include "mozilla/ArrayUtils.h" +#include "mozilla/Logging.h" #include "nsDebug.h" #define LOG(...) MOZ_LOG(sPDMLog, mozilla::LogLevel::Debug, (__VA_ARGS__)) diff --git a/dom/media/platforms/apple/AppleVTDecoder.cpp b/dom/media/platforms/apple/AppleVTDecoder.cpp index 81638870a..93a480266 100644 --- a/dom/media/platforms/apple/AppleVTDecoder.cpp +++ b/dom/media/platforms/apple/AppleVTDecoder.cpp @@ -11,12 +11,15 @@ #include "AppleUtils.h" #include "AppleVTDecoder.h" #include "AppleVTLinker.h" +#include "MacIOSurfaceImage.h" #include "MediaData.h" #include "mozilla/ArrayUtils.h" #include "mp4_demuxer/H264.h" #include "nsAutoPtr.h" #include "nsThreadUtils.h" #include "mozilla/Logging.h" +#include "mozilla/SyncRunnable.h" +#include "mozilla/gfx/MacIOSurface.h" #include "VideoUtils.h" #include "gfxPlatform.h" @@ -360,7 +363,7 @@ AppleVTDecoder::OutputFrame(CVPixelBufferRef aImage, RefPtr<MacIOSurface> macSurface = new MacIOSurface(surface); - RefPtr<layers::Image> image = new MacIOSurfaceImage(macSurface); + RefPtr<layers::Image> image = new layers::MacIOSurfaceImage(macSurface); data = VideoData::CreateFromImage(info, diff --git a/dom/media/platforms/apple/AppleVTLinker.cpp b/dom/media/platforms/apple/AppleVTLinker.cpp index 51a8a0122..287de3ed3 100644 --- a/dom/media/platforms/apple/AppleVTLinker.cpp +++ b/dom/media/platforms/apple/AppleVTLinker.cpp @@ -7,7 +7,9 @@ #include <dlfcn.h> #include "AppleVTLinker.h" +#include "PlatformDecoderModule.h" #include "mozilla/ArrayUtils.h" +#include "mozilla/Logging.h" #include "nsDebug.h" #define LOG(...) MOZ_LOG(sPDMLog, mozilla::LogLevel::Debug, (__VA_ARGS__)) diff --git a/dom/media/standalone/moz.build b/dom/media/standalone/moz.build index 959703765..a3cc3545f 100644 --- a/dom/media/standalone/moz.build +++ b/dom/media/standalone/moz.build @@ -7,7 +7,7 @@ if CONFIG['OS_TARGET'] != 'WINNT': Library('media_standalone') -UNIFIED_SOURCES += [ +SOURCES += [ '../AudioChannelFormat.cpp', '../AudioSegment.cpp', '../SimpleImageBuffer.cpp', diff --git a/dom/media/systemservices/MediaParent.cpp b/dom/media/systemservices/MediaParent.cpp index 89a495f6a..16c399f37 100644 --- a/dom/media/systemservices/MediaParent.cpp +++ b/dom/media/systemservices/MediaParent.cpp @@ -23,6 +23,7 @@ #include "nsAppDirectoryServiceDefs.h" #include "nsISupportsImpl.h" #include "mozilla/Logging.h" +#include "mozilla/MediaManager.h" #undef LOG mozilla::LazyLogModule gMediaParentLog("MediaParent"); diff --git a/dom/media/systemservices/MediaSystemResourceManager.cpp b/dom/media/systemservices/MediaSystemResourceManager.cpp index 29db0ef3e..a66e946eb 100644 --- a/dom/media/systemservices/MediaSystemResourceManager.cpp +++ b/dom/media/systemservices/MediaSystemResourceManager.cpp @@ -7,6 +7,7 @@ #include "mozilla/TaskQueue.h" #include "gfxPrefs.h" +#include "MediaSystemResourceClient.h" #include "MediaSystemResourceManagerChild.h" #include "mozilla/layers/ImageBridgeChild.h" diff --git a/dom/media/systemservices/moz.build b/dom/media/systemservices/moz.build index 82a5c5e72..c582b7ba1 100644 --- a/dom/media/systemservices/moz.build +++ b/dom/media/systemservices/moz.build @@ -12,7 +12,7 @@ if CONFIG['MOZ_WEBRTC']: 'LoadManagerFactory.h', 'LoadMonitor.h', ] - UNIFIED_SOURCES += [ + SOURCES += [ 'CamerasChild.cpp', 'CamerasParent.cpp', 'LoadManager.cpp', @@ -24,6 +24,7 @@ if CONFIG['MOZ_WEBRTC']: '/media/webrtc/signaling', '/media/webrtc/trunk', ] + if CONFIG['OS_TARGET'] == 'WINNT': DEFINES['WEBRTC_WIN'] = True else: @@ -34,12 +35,12 @@ if CONFIG['OS_TARGET'] == 'Android': EXPORTS += [ 'OpenSLESProvider.h' ] - UNIFIED_SOURCES += [ + SOURCES += [ 'OpenSLESProvider.cpp', ] if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa': - UNIFIED_SOURCES += ['OSXRunLoopSingleton.cpp'] + SOURCES += ['OSXRunLoopSingleton.cpp'] EXPORTS += ['OSXRunLoopSingleton.h'] if CONFIG['_MSC_VER']: @@ -66,7 +67,8 @@ EXPORTS.mozilla.media += ['CamerasTypes.h', 'MediaTaskUtils.h', 'MediaUtils.h', ] -UNIFIED_SOURCES += [ + +SOURCES += [ 'MediaChild.cpp', 'MediaParent.cpp', 'MediaSystemResourceClient.cpp', @@ -76,11 +78,13 @@ UNIFIED_SOURCES += [ 'MediaSystemResourceService.cpp', 'MediaUtils.cpp', ] + IPDL_SOURCES += [ 'PCameras.ipdl', 'PMedia.ipdl', 'PMediaSystemResourceManager.ipdl', ] + # /dom/base needed for nsGlobalWindow.h in MediaChild.cpp LOCAL_INCLUDES += [ '/dom/base', diff --git a/dom/media/webaudio/AudioContext.cpp b/dom/media/webaudio/AudioContext.cpp index d58441309..75f57a630 100755 --- a/dom/media/webaudio/AudioContext.cpp +++ b/dom/media/webaudio/AudioContext.cpp @@ -22,6 +22,7 @@ #include "AudioChannelService.h" #include "AudioDestinationNode.h" #include "AudioListener.h" +#include "AudioNodeStream.h" #include "AudioStream.h" #include "BiquadFilterNode.h" #include "ChannelMergerNode.h" diff --git a/dom/media/webaudio/AudioDestinationNode.cpp b/dom/media/webaudio/AudioDestinationNode.cpp index 29a9de736..f23eb0377 100644 --- a/dom/media/webaudio/AudioDestinationNode.cpp +++ b/dom/media/webaudio/AudioDestinationNode.cpp @@ -7,6 +7,7 @@ #include "AudioDestinationNode.h" #include "AlignmentUtils.h" #include "AudioContext.h" +#include "mozilla/dom/AudioContextBinding.h" #include "mozilla/dom/AudioDestinationNodeBinding.h" #include "mozilla/dom/ScriptSettings.h" #include "mozilla/Services.h" diff --git a/dom/media/webaudio/AudioEventTimeline.h b/dom/media/webaudio/AudioEventTimeline.h index ae06ad4db..ba6da56a3 100644 --- a/dom/media/webaudio/AudioEventTimeline.h +++ b/dom/media/webaudio/AudioEventTimeline.h @@ -13,6 +13,7 @@ #include "mozilla/PodOperations.h" #include "MainThreadUtils.h" +#include "MediaStreamGraph.h" #include "nsTArray.h" #include "math.h" #include "WebAudioUtils.h" diff --git a/dom/media/webaudio/AudioNodeEngine.cpp b/dom/media/webaudio/AudioNodeEngine.cpp index 91170adb3..89eefef31 100644 --- a/dom/media/webaudio/AudioNodeEngine.cpp +++ b/dom/media/webaudio/AudioNodeEngine.cpp @@ -14,6 +14,7 @@ #include "AlignmentUtils.h" #include "AudioNodeEngineSSE2.h" #endif +#include "AudioBlock.h" namespace mozilla { diff --git a/dom/media/webaudio/AudioNodeStream.cpp b/dom/media/webaudio/AudioNodeStream.cpp index 0e5aa3fc7..ba002b70e 100644 --- a/dom/media/webaudio/AudioNodeStream.cpp +++ b/dom/media/webaudio/AudioNodeStream.cpp @@ -5,6 +5,7 @@ #include "AudioNodeStream.h" +#include "AlignmentUtils.h" #include "MediaStreamGraphImpl.h" #include "MediaStreamListener.h" #include "AudioNodeEngine.h" diff --git a/dom/media/webaudio/ConstantSourceNode.cpp b/dom/media/webaudio/ConstantSourceNode.cpp index b6884105c..8b9df7c89 100644 --- a/dom/media/webaudio/ConstantSourceNode.cpp +++ b/dom/media/webaudio/ConstantSourceNode.cpp @@ -7,6 +7,8 @@ #include "ConstantSourceNode.h" #include "AudioDestinationNode.h" +#include "AudioNodeEngine.h" +#include "AudioNodeStream.h" #include "nsContentUtils.h" namespace mozilla { diff --git a/dom/media/webaudio/DelayBuffer.h b/dom/media/webaudio/DelayBuffer.h index e55d0ba83..e6c9434bf 100644 --- a/dom/media/webaudio/DelayBuffer.h +++ b/dom/media/webaudio/DelayBuffer.h @@ -8,6 +8,7 @@ #define DelayBuffer_h_ #include "nsTArray.h" +#include "AudioBlock.h" #include "AudioSegment.h" #include "mozilla/dom/AudioNodeBinding.h" // for ChannelInterpretation diff --git a/dom/media/webaudio/IIRFilterNode.cpp b/dom/media/webaudio/IIRFilterNode.cpp index 3a69a94c8..9175cc4c9 100644 --- a/dom/media/webaudio/IIRFilterNode.cpp +++ b/dom/media/webaudio/IIRFilterNode.cpp @@ -5,7 +5,13 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "IIRFilterNode.h" +#include "AlignmentUtils.h" +#include "AudioBlock.h" #include "AudioNodeEngine.h" +#include "AudioNodeStream.h" +#include "AudioDestinationNode.h" +#include "PlayingRefChangeHandler.h" +#include "mozilla/dom/AudioDestinationNodeBinding.h" #include "blink/IIRFilter.h" diff --git a/dom/media/webaudio/MediaBufferDecoder.cpp b/dom/media/webaudio/MediaBufferDecoder.cpp index f3b75ca1a..f590d2f68 100644 --- a/dom/media/webaudio/MediaBufferDecoder.cpp +++ b/dom/media/webaudio/MediaBufferDecoder.cpp @@ -16,6 +16,7 @@ #include "DecoderTraits.h" #include "AudioContext.h" #include "AudioBuffer.h" +#include "AudioNodeEngine.h" #include "nsContentUtils.h" #include "nsIScriptObjectPrincipal.h" #include "nsIScriptError.h" diff --git a/dom/media/webaudio/MediaStreamAudioSourceNode.cpp b/dom/media/webaudio/MediaStreamAudioSourceNode.cpp index beedd5300..31b276a54 100644 --- a/dom/media/webaudio/MediaStreamAudioSourceNode.cpp +++ b/dom/media/webaudio/MediaStreamAudioSourceNode.cpp @@ -9,7 +9,9 @@ #include "AudioNodeEngine.h" #include "AudioNodeExternalInputStream.h" #include "AudioStreamTrack.h" +#include "nsContentUtils.h" #include "nsIDocument.h" +#include "nsIScriptError.h" #include "mozilla/CORSMode.h" namespace mozilla { diff --git a/dom/media/webaudio/WebAudioUtils.cpp b/dom/media/webaudio/WebAudioUtils.cpp index 6289f803b..aa0c7f9ea 100644 --- a/dom/media/webaudio/WebAudioUtils.cpp +++ b/dom/media/webaudio/WebAudioUtils.cpp @@ -5,6 +5,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "WebAudioUtils.h" +#include "AudioEventTimeline.h" #include "AudioNodeStream.h" #include "blink/HRTFDatabaseLoader.h" diff --git a/dom/media/webaudio/moz.build b/dom/media/webaudio/moz.build index d1a9f5680..c4bfcea60 100644 --- a/dom/media/webaudio/moz.build +++ b/dom/media/webaudio/moz.build @@ -75,7 +75,7 @@ EXPORTS.mozilla.dom += [ 'WaveShaperNode.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'AnalyserNode.cpp', 'AudioBlock.cpp', 'AudioBuffer.cpp', diff --git a/dom/media/webrtc/MediaEngineRemoteVideoSource.cpp b/dom/media/webrtc/MediaEngineRemoteVideoSource.cpp index 881d85b4a..e79d8249c 100644 --- a/dom/media/webrtc/MediaEngineRemoteVideoSource.cpp +++ b/dom/media/webrtc/MediaEngineRemoteVideoSource.cpp @@ -6,6 +6,7 @@ #include "MediaEngineRemoteVideoSource.h" #include "mozilla/RefPtr.h" +#include "Layers.h" #include "VideoUtils.h" #include "nsIPrefService.h" #include "MediaTrackConstraints.h" @@ -15,6 +16,8 @@ extern mozilla::LogModule* GetMediaManagerLog(); #define LOG(msg) MOZ_LOG(GetMediaManagerLog(), mozilla::LogLevel::Debug, msg) #define LOGFRAME(msg) MOZ_LOG(GetMediaManagerLog(), mozilla::LogLevel::Verbose, msg) +typedef mozilla::gfx::IntSize IntSize; + namespace mozilla { // These need a definition somewhere because template diff --git a/dom/media/webrtc/MediaEngineTabVideoSource.cpp b/dom/media/webrtc/MediaEngineTabVideoSource.cpp index d101bab1e..1ac24aae5 100644 --- a/dom/media/webrtc/MediaEngineTabVideoSource.cpp +++ b/dom/media/webrtc/MediaEngineTabVideoSource.cpp @@ -29,6 +29,7 @@ namespace mozilla { using namespace mozilla::gfx; +using namespace mozilla::dom; NS_IMPL_ISUPPORTS(MediaEngineTabVideoSource, nsIDOMEventListener, nsITimerCallback) diff --git a/dom/media/webrtc/MediaEngineWebRTCAudio.cpp b/dom/media/webrtc/MediaEngineWebRTCAudio.cpp index 1e2e13d01..0eda3aac1 100644 --- a/dom/media/webrtc/MediaEngineWebRTCAudio.cpp +++ b/dom/media/webrtc/MediaEngineWebRTCAudio.cpp @@ -9,6 +9,7 @@ #include "MediaTrackConstraints.h" #include "mtransport/runnable_utils.h" #include "nsAutoPtr.h" +#include "nsContentUtils.h" // scoped_ptr.h uses FF #ifdef FF diff --git a/dom/media/webrtc/MediaTrackConstraints.cpp b/dom/media/webrtc/MediaTrackConstraints.cpp index 6225b6d49..42582e3c2 100644 --- a/dom/media/webrtc/MediaTrackConstraints.cpp +++ b/dom/media/webrtc/MediaTrackConstraints.cpp @@ -5,6 +5,7 @@ #include "MediaTrackConstraints.h" #include "mozilla/dom/MediaStreamTrackBinding.h" +#include "mozilla/Unused.h" #include <limits> #include <algorithm> diff --git a/dom/media/webrtc/PeerIdentity.h b/dom/media/webrtc/PeerIdentity.h index bdfa1d2b3..1f3413bf6 100644 --- a/dom/media/webrtc/PeerIdentity.h +++ b/dom/media/webrtc/PeerIdentity.h @@ -13,6 +13,8 @@ #include "nsStringAPI.h" #endif +#include "mozilla/RefCounted.h" + template <class T> class nsCOMPtr; class nsIIDNService; diff --git a/dom/media/webrtc/moz.build b/dom/media/webrtc/moz.build index 66def8719..5b76e17cb 100644 --- a/dom/media/webrtc/moz.build +++ b/dom/media/webrtc/moz.build @@ -31,15 +31,14 @@ 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', @@ -53,8 +52,10 @@ XPIDL_SOURCES += [ ] UNIFIED_SOURCES += [ - 'MediaEngineDefault.cpp', 'MediaTrackConstraints.cpp', +] +SOURCES += [ + 'MediaEngineDefault.cpp', 'PeerIdentity.cpp', ] diff --git a/dom/media/webspeech/recognition/SpeechGrammarList.cpp b/dom/media/webspeech/recognition/SpeechGrammarList.cpp index d4883378f..925e591aa 100644 --- a/dom/media/webspeech/recognition/SpeechGrammarList.cpp +++ b/dom/media/webspeech/recognition/SpeechGrammarList.cpp @@ -10,6 +10,7 @@ #include "mozilla/ErrorResult.h" #include "nsCOMPtr.h" #include "nsXPCOMStrings.h" +#include "SpeechGrammar.h" #include "SpeechRecognition.h" namespace mozilla { diff --git a/dom/media/webspeech/recognition/SpeechGrammarList.h b/dom/media/webspeech/recognition/SpeechGrammarList.h index dbe7117fe..32c0ddbdd 100644 --- a/dom/media/webspeech/recognition/SpeechGrammarList.h +++ b/dom/media/webspeech/recognition/SpeechGrammarList.h @@ -9,6 +9,7 @@ #include "mozilla/Attributes.h" #include "nsCOMPtr.h" +#include "nsTArray.h" #include "nsCycleCollectionParticipant.h" #include "nsWrapperCache.h" diff --git a/dom/media/webspeech/recognition/SpeechRecognition.cpp b/dom/media/webspeech/recognition/SpeechRecognition.cpp index 48b1177b2..cd57f03ca 100644 --- a/dom/media/webspeech/recognition/SpeechRecognition.cpp +++ b/dom/media/webspeech/recognition/SpeechRecognition.cpp @@ -22,6 +22,7 @@ #include "AudioSegment.h" #include "endpointer.h" +#include "SpeechGrammar.h" #include "mozilla/dom/SpeechRecognitionEvent.h" #include "nsContentUtils.h" #include "nsIDocument.h" diff --git a/dom/media/webspeech/recognition/moz.build b/dom/media/webspeech/recognition/moz.build index 0a26021b0..c296cd40d 100644 --- a/dom/media/webspeech/recognition/moz.build +++ b/dom/media/webspeech/recognition/moz.build @@ -31,7 +31,7 @@ if CONFIG['MOZ_WEBSPEECH_POCKETSPHINX']: 'PocketSphinxSpeechRecognitionService.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'endpointer.cc', 'energy_endpointer.cc', 'energy_endpointer_params.cc', @@ -45,12 +45,12 @@ UNIFIED_SOURCES += [ ] if CONFIG['MOZ_WEBSPEECH_TEST_BACKEND']: - UNIFIED_SOURCES += [ + SOURCES += [ 'test/FakeSpeechRecognitionService.cpp', ] if CONFIG['MOZ_WEBSPEECH_POCKETSPHINX']: - UNIFIED_SOURCES += [ + SOURCES += [ 'PocketSphinxSpeechRecognitionService.cpp', ] diff --git a/dom/media/webspeech/synth/moz.build b/dom/media/webspeech/synth/moz.build index bb26515af..7b8c4cd31 100644 --- a/dom/media/webspeech/synth/moz.build +++ b/dom/media/webspeech/synth/moz.build @@ -26,7 +26,7 @@ if CONFIG['MOZ_WEBSPEECH']: 'SpeechSynthesisVoice.h', ] - UNIFIED_SOURCES += [ + SOURCES += [ 'ipc/SpeechSynthesisChild.cpp', 'ipc/SpeechSynthesisParent.cpp', 'nsSpeechTask.cpp', @@ -37,7 +37,7 @@ if CONFIG['MOZ_WEBSPEECH']: ] if CONFIG['MOZ_WEBSPEECH_TEST_BACKEND']: - UNIFIED_SOURCES += [ + SOURCES += [ 'test/FakeSynthModule.cpp', 'test/nsFakeSynthServices.cpp' ] diff --git a/dom/media/webspeech/synth/pico/moz.build b/dom/media/webspeech/synth/pico/moz.build index 01ef30450..8c360bc85 100644 --- a/dom/media/webspeech/synth/pico/moz.build +++ b/dom/media/webspeech/synth/pico/moz.build @@ -4,7 +4,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/. -UNIFIED_SOURCES += [ +SOURCES += [ 'nsPicoService.cpp', 'PicoModule.cpp' ] diff --git a/dom/media/webspeech/synth/speechd/moz.build b/dom/media/webspeech/synth/speechd/moz.build index 51d675c10..552ccf856 100644 --- a/dom/media/webspeech/synth/speechd/moz.build +++ b/dom/media/webspeech/synth/speechd/moz.build @@ -4,7 +4,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/. -UNIFIED_SOURCES += [ +SOURCES += [ 'SpeechDispatcherModule.cpp', 'SpeechDispatcherService.cpp' ] diff --git a/dom/media/webspeech/synth/windows/moz.build b/dom/media/webspeech/synth/windows/moz.build index f0ff9f2c9..2ab20c05a 100644 --- a/dom/media/webspeech/synth/windows/moz.build +++ b/dom/media/webspeech/synth/windows/moz.build @@ -4,7 +4,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/. -UNIFIED_SOURCES += [ +SOURCES += [ 'SapiModule.cpp', 'SapiService.cpp' ] diff --git a/dom/performance/PerformanceMainThread.cpp b/dom/performance/PerformanceMainThread.cpp index b95a91ea6..60eccf595 100644 --- a/dom/performance/PerformanceMainThread.cpp +++ b/dom/performance/PerformanceMainThread.cpp @@ -6,7 +6,12 @@ #include "PerformanceMainThread.h" #include "PerformanceNavigation.h" +#include "PerformanceNavigationTiming.h" +#include "PerformanceResourceTiming.h" +#include "PerformanceTiming.h" #include "nsICacheInfoChannel.h" +#include "nsITimedChannel.h" +#include "mozilla/dom/Event.h" namespace mozilla { namespace dom { diff --git a/dom/performance/PerformanceService.cpp b/dom/performance/PerformanceService.cpp index cf119af89..21d1aaa26 100644 --- a/dom/performance/PerformanceService.cpp +++ b/dom/performance/PerformanceService.cpp @@ -9,6 +9,7 @@ #include "mozilla/ClearOnShutdown.h" #include "mozilla/StaticMutex.h" #include "mozilla/StaticPtr.h" +#include "prtime.h" namespace mozilla { namespace dom { diff --git a/dom/performance/PerformanceTiming.cpp b/dom/performance/PerformanceTiming.cpp index 887a23938..f1d75ca03 100755 --- a/dom/performance/PerformanceTiming.cpp +++ b/dom/performance/PerformanceTiming.cpp @@ -6,6 +6,7 @@ #include "PerformanceTiming.h" #include "mozilla/dom/PerformanceTimingBinding.h" +#include "nsITimedChannel.h" namespace mozilla { namespace dom { diff --git a/dom/performance/moz.build b/dom/performance/moz.build index e1f96fec8..454f8f544 100644 --- a/dom/performance/moz.build +++ b/dom/performance/moz.build @@ -18,7 +18,7 @@ EXPORTS.mozilla.dom += [ 'PerformanceTiming.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'Performance.cpp', 'PerformanceEntry.cpp', 'PerformanceMainThread.cpp', diff --git a/dom/plugins/base/moz.build b/dom/plugins/base/moz.build index a159d6fc1..d63ca51ce 100644 --- a/dom/plugins/base/moz.build +++ b/dom/plugins/base/moz.build @@ -38,10 +38,12 @@ EXPORTS.mozilla += [ 'PluginPRLibrary.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'nsJSNPRuntime.cpp', + 'nsNPAPIPlugin.cpp', 'nsNPAPIPluginInstance.cpp', 'nsNPAPIPluginStreamListener.cpp', + 'nsPluginHost.cpp', 'nsPluginInstanceOwner.cpp', 'nsPluginModule.cpp', 'nsPluginStreamListenerPeer.cpp', @@ -49,24 +51,19 @@ UNIFIED_SOURCES += [ 'PluginPRLibrary.cpp', ] -SOURCES += [ - 'nsNPAPIPlugin.cpp', # Conflict with X11 headers - 'nsPluginHost.cpp', # Conflict with NS_NPAPIPLUGIN_CALLBACK -] - if CONFIG['OS_ARCH'] == 'WINNT': - UNIFIED_SOURCES += [ + SOURCES += [ 'nsPluginDirServiceProvider.cpp', 'nsPluginNativeWindowWin.cpp', 'nsPluginsDirWin.cpp', ] elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa': - UNIFIED_SOURCES += [ + SOURCES += [ 'nsPluginNativeWindow.cpp', 'nsPluginsDirDarwin.cpp', ] else: - UNIFIED_SOURCES += [ + SOURCES += [ 'nsPluginsDirUnix.cpp', ] if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']: @@ -75,7 +72,7 @@ else: 'nsPluginNativeWindowGtk.cpp', ] else: - UNIFIED_SOURCES += [ + SOURCES += [ 'nsPluginNativeWindow.cpp', ] diff --git a/dom/plugins/base/nsNPAPIPluginInstance.cpp b/dom/plugins/base/nsNPAPIPluginInstance.cpp index ce24b6296..7ee71c8f7 100644 --- a/dom/plugins/base/nsNPAPIPluginInstance.cpp +++ b/dom/plugins/base/nsNPAPIPluginInstance.cpp @@ -36,6 +36,7 @@ #include "nsILoadContext.h" #include "mozilla/dom/HTMLObjectElementBinding.h" #include "AudioChannelService.h" +#include "GeckoProfiler.h" using namespace mozilla; using namespace mozilla::dom; diff --git a/dom/plugins/base/nsNPAPIPluginStreamListener.cpp b/dom/plugins/base/nsNPAPIPluginStreamListener.cpp index 0f500a1ae..2b5f65ef4 100644 --- a/dom/plugins/base/nsNPAPIPluginStreamListener.cpp +++ b/dom/plugins/base/nsNPAPIPluginStreamListener.cpp @@ -9,11 +9,13 @@ #include "nsDirectoryServiceDefs.h" #include "nsDirectoryServiceUtils.h" #include "nsIFile.h" +#include "nsIHttpChannel.h" #include "nsNetUtil.h" #include "nsPluginHost.h" #include "nsNPAPIPlugin.h" #include "nsPluginLogging.h" #include "nsPluginStreamListenerPeer.h" +#include "GeckoProfiler.h" #include <stdint.h> #include <algorithm> diff --git a/dom/plugins/base/nsNPAPIPluginStreamListener.h b/dom/plugins/base/nsNPAPIPluginStreamListener.h index dd567f99b..cb9c616d0 100644 --- a/dom/plugins/base/nsNPAPIPluginStreamListener.h +++ b/dom/plugins/base/nsNPAPIPluginStreamListener.h @@ -10,6 +10,7 @@ #include "nsIHTTPHeaderListener.h" #include "nsIRequest.h" #include "nsITimer.h" +#include "nsCOMPtr.h" #include "nsCOMArray.h" #include "nsIOutputStream.h" #include "nsIPluginInstanceOwner.h" diff --git a/dom/plugins/base/nsPluginInstanceOwner.cpp b/dom/plugins/base/nsPluginInstanceOwner.cpp index 22c4783ca..0d4dc68cc 100644 --- a/dom/plugins/base/nsPluginInstanceOwner.cpp +++ b/dom/plugins/base/nsPluginInstanceOwner.cpp @@ -64,6 +64,7 @@ using mozilla::DefaultXDisplay; #include "mozilla/IMEStateManager.h" #include "mozilla/TextComposition.h" #include "mozilla/AutoRestore.h" +#include "mozilla/plugins/PluginAsyncSurrogate.h" #include "nsContentCID.h" #include "nsWidgetsCID.h" @@ -90,6 +91,7 @@ static NS_DEFINE_CID(kAppShellCID, NS_APPSHELL_CID); using namespace mozilla; using namespace mozilla::dom; using namespace mozilla::layers; +using namespace mozilla::plugins; static inline nsPoint AsNsPoint(const nsIntPoint &p) { return nsPoint(p.x, p.y); diff --git a/dom/plugins/base/nsPluginNativeWindowWin.cpp b/dom/plugins/base/nsPluginNativeWindowWin.cpp index 106dcaf77..82f851174 100644 --- a/dom/plugins/base/nsPluginNativeWindowWin.cpp +++ b/dom/plugins/base/nsPluginNativeWindowWin.cpp @@ -5,6 +5,7 @@ #include "mozilla/BasicEvents.h" #include "mozilla/DebugOnly.h" +#include "nsPluginHost.h" #include "windows.h" #include "windowsx.h" diff --git a/dom/plugins/base/nsPluginStreamListenerPeer.cpp b/dom/plugins/base/nsPluginStreamListenerPeer.cpp index 0476315d5..603f2408c 100644 --- a/dom/plugins/base/nsPluginStreamListenerPeer.cpp +++ b/dom/plugins/base/nsPluginStreamListenerPeer.cpp @@ -34,6 +34,7 @@ #include "nsPluginInstanceOwner.h" #include "nsDataHashtable.h" #include "nsNullPrincipal.h" +#include "prtime.h" #define BYTERANGE_REQUEST_CONTEXT 0x01020304 diff --git a/dom/plugins/base/nsPluginTags.cpp b/dom/plugins/base/nsPluginTags.cpp index 58b413388..5fd63f377 100644 --- a/dom/plugins/base/nsPluginTags.cpp +++ b/dom/plugins/base/nsPluginTags.cpp @@ -13,6 +13,7 @@ #include "nsIBlocklistService.h" #include "nsIUnicodeDecoder.h" #include "nsIPlatformCharset.h" +#include "nsIURI.h" #include "nsPluginLogging.h" #include "nsNPAPIPlugin.h" #include "nsCharSeparatedTokenizer.h" @@ -26,6 +27,7 @@ using mozilla::dom::EncodingUtils; using mozilla::dom::FakePluginTagInit; +using mozilla::dom::FakePluginMimeEntry; using namespace mozilla; // These legacy flags are used in the plugin registry. The states are now diff --git a/dom/plugins/ipc/D3D11SurfaceHolder.h b/dom/plugins/ipc/D3D11SurfaceHolder.h index 16cd2d182..2d2342347 100644 --- a/dom/plugins/ipc/D3D11SurfaceHolder.h +++ b/dom/plugins/ipc/D3D11SurfaceHolder.h @@ -6,6 +6,7 @@ #define _include_dom_plugins_ipc_D3D11SurfaceHolder_h__ #include "ipc/IPCMessageUtils.h" +#include "mozilla/gfx/2D.h" #include "mozilla/gfx/Point.h" #include "mozilla/gfx/Types.h" diff --git a/dom/plugins/ipc/PluginAsyncSurrogate.h b/dom/plugins/ipc/PluginAsyncSurrogate.h index 5b6315715..8e69a57a4 100644 --- a/dom/plugins/ipc/PluginAsyncSurrogate.h +++ b/dom/plugins/ipc/PluginAsyncSurrogate.h @@ -8,6 +8,7 @@ #define dom_plugins_ipc_PluginAsyncSurrogate_h #include "mozilla/UniquePtr.h" +#include "mozilla/WeakPtr.h" #include "npapi.h" #include "npfunctions.h" #include "npruntime.h" diff --git a/dom/plugins/ipc/PluginInstanceParent.cpp b/dom/plugins/ipc/PluginInstanceParent.cpp index 24b1410bc..523dc5c80 100644 --- a/dom/plugins/ipc/PluginInstanceParent.cpp +++ b/dom/plugins/ipc/PluginInstanceParent.cpp @@ -9,6 +9,8 @@ #include "mozilla/BasicEvents.h" #include "mozilla/Preferences.h" +#include "mozilla/D3DMessageUtils.h" +#include "D3D11SurfaceHolder.h" #include "PluginInstanceParent.h" #include "BrowserStreamParent.h" #include "PluginAsyncSurrogate.h" @@ -69,8 +71,10 @@ extern const wchar_t* kFlashFullscreenClass; #include <ApplicationServices/ApplicationServices.h> #endif // defined(XP_MACOSX) +using namespace mozilla; using namespace mozilla::plugins; using namespace mozilla::layers; +using namespace mozilla::gfx; using namespace mozilla::gl; void diff --git a/dom/plugins/ipc/PluginModuleParent.cpp b/dom/plugins/ipc/PluginModuleParent.cpp index 4a509676d..6ea205ef0 100755 --- a/dom/plugins/ipc/PluginModuleParent.cpp +++ b/dom/plugins/ipc/PluginModuleParent.cpp @@ -29,10 +29,14 @@ #include "nsNPAPIPlugin.h" #include "nsPrintfCString.h" #include "prsystem.h" +#include "PluginBackgroundDestroyer.h" #include "PluginQuirks.h" +#include "PluginStreamParent.h" +#include "StreamNotifyParent.h" #include "GeckoProfiler.h" #include "nsPluginTags.h" #include "nsUnicharUtils.h" +#include "mozilla/layers/ImageBridgeChild.h" #include "mozilla/layers/TextureClientRecycleAllocator.h" #ifdef XP_WIN @@ -56,6 +60,7 @@ using mozilla::ipc::MessageChannel; using mozilla::ipc::GeckoChildProcessHost; using namespace mozilla; +using namespace mozilla::layers; using namespace mozilla::plugins; using namespace mozilla::plugins::parent; diff --git a/dom/plugins/ipc/PluginQuirks.h b/dom/plugins/ipc/PluginQuirks.h index f0a6b6a30..66dc8fba6 100644 --- a/dom/plugins/ipc/PluginQuirks.h +++ b/dom/plugins/ipc/PluginQuirks.h @@ -7,6 +7,8 @@ #ifndef dom_plugins_PluginQuirks_h #define dom_plugins_PluginQuirks_h +#include "nsString.h" + namespace mozilla { namespace plugins { diff --git a/dom/plugins/ipc/PluginUtilsWin.h b/dom/plugins/ipc/PluginUtilsWin.h index 097ae5262..a1a7c2aa6 100644 --- a/dom/plugins/ipc/PluginUtilsWin.h +++ b/dom/plugins/ipc/PluginUtilsWin.h @@ -8,6 +8,7 @@ #define dom_plugins_PluginUtilsWin_h 1
#include "npapi.h"
+#include "PluginModuleParent.h"
namespace mozilla {
namespace plugins {
diff --git a/dom/plugins/ipc/hangui/moz.build b/dom/plugins/ipc/hangui/moz.build index 0b84cfb8f..52c2f1495 100644 --- a/dom/plugins/ipc/hangui/moz.build +++ b/dom/plugins/ipc/hangui/moz.build @@ -6,7 +6,7 @@ Program('plugin-hang-ui') -UNIFIED_SOURCES += [ +SOURCES += [ 'MiniShmChild.cpp', 'PluginHangUIChild.cpp', ] diff --git a/dom/plugins/ipc/interpose/moz.build b/dom/plugins/ipc/interpose/moz.build index 8bd8ee651..10171afd0 100644 --- a/dom/plugins/ipc/interpose/moz.build +++ b/dom/plugins/ipc/interpose/moz.build @@ -6,7 +6,7 @@ SharedLibrary('plugin_child_interpose') -UNIFIED_SOURCES += [ "%s.mm" % (LIBRARY_NAME) ] +SOURCES += [ "%s.mm" % (LIBRARY_NAME) ] OS_LIBS += ['-framework Carbon'] diff --git a/dom/plugins/ipc/moz.build b/dom/plugins/ipc/moz.build index 051d5a3b4..182a11562 100644 --- a/dom/plugins/ipc/moz.build +++ b/dom/plugins/ipc/moz.build @@ -48,13 +48,11 @@ if CONFIG['OS_ARCH'] == 'WINNT': EXPORTS.mozilla.plugins += [ 'PluginSurfaceParent.h', ] - UNIFIED_SOURCES += [ + SOURCES += [ + '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', @@ -66,15 +64,17 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa': 'PluginInterposeOSX.h', ] -UNIFIED_SOURCES += [ +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', @@ -83,23 +83,18 @@ UNIFIED_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': - UNIFIED_SOURCES += [ + SOURCES += [ 'PluginInterposeOSX.mm', 'PluginUtilsOSX.mm', ] if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows': - UNIFIED_SOURCES += [ + SOURCES += [ 'D3D11SurfaceHolder.cpp', 'PluginUtilsWin.cpp' ] diff --git a/dom/push/PushSubscriptionOptions.cpp b/dom/push/PushSubscriptionOptions.cpp index 39252e9e8..8f6ce5499 100644 --- a/dom/push/PushSubscriptionOptions.cpp +++ b/dom/push/PushSubscriptionOptions.cpp @@ -6,6 +6,7 @@ #include "mozilla/dom/PushSubscriptionOptionsBinding.h" #include "mozilla/HoldDropJSObjects.h" +#include "PushUtil.h" namespace mozilla { namespace dom { diff --git a/dom/push/PushUtil.cpp b/dom/push/PushUtil.cpp index 408b62048..1aba0e066 100644 --- a/dom/push/PushUtil.cpp +++ b/dom/push/PushUtil.cpp @@ -3,6 +3,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "mozilla/dom/PushUtil.h" +#include "mozilla/dom/UnionTypes.h" // for OwningArrayBufferViewOrArrayBuffer namespace mozilla { namespace dom { diff --git a/dom/push/PushUtil.h b/dom/push/PushUtil.h index 548ae2349..71a7af478 100644 --- a/dom/push/PushUtil.h +++ b/dom/push/PushUtil.h @@ -7,6 +7,7 @@ #include "nsTArray.h" +#include "mozilla/ErrorResult.h" #include "mozilla/dom/TypedArray.h" namespace mozilla { diff --git a/dom/push/moz.build b/dom/push/moz.build index d138b270c..ca72c5f5d 100644 --- a/dom/push/moz.build +++ b/dom/push/moz.build @@ -37,7 +37,7 @@ EXPORTS.mozilla.dom += [ 'PushUtil.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'PushManager.cpp', 'PushNotifier.cpp', 'PushSubscription.cpp', diff --git a/dom/quota/QuotaRequests.cpp b/dom/quota/QuotaRequests.cpp index 369bc790c..7d1c37731 100644 --- a/dom/quota/QuotaRequests.cpp +++ b/dom/quota/QuotaRequests.cpp @@ -8,6 +8,7 @@ #include "ActorsChild.h" #include "nsIQuotaCallbacks.h" +#include "nsIVariant.h" namespace mozilla { namespace dom { diff --git a/dom/quota/QuotaResults.h b/dom/quota/QuotaResults.h index 73fe6b790..246bfe9c9 100644 --- a/dom/quota/QuotaResults.h +++ b/dom/quota/QuotaResults.h @@ -8,6 +8,7 @@ #define mozilla_dom_quota_QuotaResults_h #include "nsIQuotaResults.h" +#include "nsString.h" namespace mozilla { namespace dom { diff --git a/dom/quota/StorageManager.cpp b/dom/quota/StorageManager.cpp index 4e9f0cf8c..3aad3c3e7 100644 --- a/dom/quota/StorageManager.cpp +++ b/dom/quota/StorageManager.cpp @@ -13,9 +13,12 @@ #include "mozilla/ErrorResult.h" #include "nsIQuotaCallbacks.h" #include "nsIQuotaRequests.h" +#include "nsIQuotaResults.h" #include "nsPIDOMWindow.h" +#include "QuotaManagerService.h" using namespace mozilla::dom::workers; +using namespace mozilla::dom::quota; namespace mozilla { namespace dom { diff --git a/dom/quota/StorageManager.h b/dom/quota/StorageManager.h index 162390f48..11dc01b6f 100644 --- a/dom/quota/StorageManager.h +++ b/dom/quota/StorageManager.h @@ -7,8 +7,10 @@ #ifndef mozilla_dom_StorageManager_h #define mozilla_dom_StorageManager_h +#include "mozilla/ErrorResult.h" #include "nsCOMPtr.h" #include "nsCycleCollectionParticipant.h" +#include "nsIGlobalObject.h" #include "nsISupports.h" #include "nsWrapperCache.h" diff --git a/dom/quota/moz.build b/dom/quota/moz.build index 66c4f4f45..182696569 100644 --- a/dom/quota/moz.build +++ b/dom/quota/moz.build @@ -31,7 +31,7 @@ EXPORTS.mozilla.dom.quota += [ 'UsageInfo.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'ActorsChild.cpp', 'ActorsParent.cpp', 'FileStreams.cpp', diff --git a/dom/security/SRICheck.h b/dom/security/SRICheck.h index 82929fe36..46de0532f 100644 --- a/dom/security/SRICheck.h +++ b/dom/security/SRICheck.h @@ -9,6 +9,7 @@ #include "nsCOMPtr.h" #include "nsICryptoHash.h" +#include "nsString.h" class nsIChannel; class nsIUnicharStreamLoader; diff --git a/dom/security/moz.build b/dom/security/moz.build index 00f7376a8..587e1e898 100644 --- a/dom/security/moz.build +++ b/dom/security/moz.build @@ -24,12 +24,15 @@ 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.h b/dom/security/nsCSPParser.h index d500a1c18..59f5d2d6d 100644 --- a/dom/security/nsCSPParser.h +++ b/dom/security/nsCSPParser.h @@ -7,6 +7,7 @@ #ifndef nsCSPParser_h___ #define nsCSPParser_h___ +#include "nsCSPContext.h" #include "nsCSPUtils.h" #include "nsIURI.h" #include "nsString.h" diff --git a/dom/security/nsCSPUtils.cpp b/dom/security/nsCSPUtils.cpp index 6d4f297d6..e9f218c14 100644 --- a/dom/security/nsCSPUtils.cpp +++ b/dom/security/nsCSPUtils.cpp @@ -17,6 +17,10 @@ #include "nsIURL.h" #include "nsReadableUtils.h" #include "nsSandboxFlags.h" +#include "nsString.h" +#include "mozilla/Logging.h" + +using namespace mozilla; #define DEFAULT_PORT -1 @@ -30,6 +34,29 @@ 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/nsContentSecurityManager.cpp b/dom/security/nsContentSecurityManager.cpp index 5c6701992..298dc810e 100644 --- a/dom/security/nsContentSecurityManager.cpp +++ b/dom/security/nsContentSecurityManager.cpp @@ -5,16 +5,26 @@ #include "nsIStreamListener.h" #include "nsILoadInfo.h" #include "nsIOService.h" +#include "nsIProtocolHandler.h" #include "nsContentUtils.h" #include "nsCORSListenerProxy.h" #include "nsIStreamListener.h" +#include "nsIScriptError.h" #include "nsCDefaultURIFixup.h" #include "nsIURIFixup.h" #include "nsIImageLoadingContent.h" +#include "nsNetUtil.h" +#include "mozilla/ArrayUtils.h" +#include "nsString.h" +#include "nsMimeTypes.h" +#include "nsContentPolicyUtils.h" +#include "nsCharSeparatedTokenizer.h" #include "mozilla/dom/Element.h" #include "mozilla/dom/TabChild.h" +using namespace mozilla; + NS_IMPL_ISUPPORTS(nsContentSecurityManager, nsIContentSecurityManager, nsIChannelEventSink) diff --git a/dom/security/nsMixedContentBlocker.cpp b/dom/security/nsMixedContentBlocker.cpp index 543429aff..85fb06d8d 100644 --- a/dom/security/nsMixedContentBlocker.cpp +++ b/dom/security/nsMixedContentBlocker.cpp @@ -20,6 +20,8 @@ #include "nsIContentViewer.h" #include "nsIChannel.h" #include "nsIHttpChannel.h" +#include "nsIProtocolHandler.h" +#include "nsIInterfaceRequestorUtils.h" #include "nsIParentChannel.h" #include "mozilla/Preferences.h" #include "nsIScriptObjectPrincipal.h" @@ -33,12 +35,12 @@ #include "nsAsyncRedirectVerifyHelper.h" #include "mozilla/LoadInfo.h" #include "nsISiteSecurityService.h" +#include "nsNetUtil.h" #include "mozilla/Logging.h" #include "mozilla/dom/ContentChild.h" #include "mozilla/ipc/URIUtils.h" - using namespace mozilla; enum nsMixedContentBlockerMessageType { diff --git a/dom/smil/moz.build b/dom/smil/moz.build index 5b37ce642..3c432898f 100644 --- a/dom/smil/moz.build +++ b/dom/smil/moz.build @@ -35,7 +35,7 @@ EXPORTS.mozilla.dom += [ 'TimeEvent.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'nsSMILAnimationController.cpp', 'nsSMILAnimationFunction.cpp', 'nsSMILCompositor.cpp', diff --git a/dom/smil/nsSMILAnimationFunction.cpp b/dom/smil/nsSMILAnimationFunction.cpp index 767181897..cd57054fb 100644 --- a/dom/smil/nsSMILAnimationFunction.cpp +++ b/dom/smil/nsSMILAnimationFunction.cpp @@ -24,6 +24,7 @@ #include <math.h> #include <algorithm> +using namespace mozilla; using namespace mozilla::dom; //---------------------------------------------------------------------- diff --git a/dom/smil/nsSMILCSSProperty.cpp b/dom/smil/nsSMILCSSProperty.cpp index e74512443..14e428c05 100644 --- a/dom/smil/nsSMILCSSProperty.cpp +++ b/dom/smil/nsSMILCSSProperty.cpp @@ -17,6 +17,7 @@ #include "nsIDOMElement.h" #include "nsIDocument.h" +using namespace mozilla; using namespace mozilla::dom; // Helper function diff --git a/dom/smil/nsSMILCSSValueType.cpp b/dom/smil/nsSMILCSSValueType.cpp index ed89e7710..2940c1367 100644 --- a/dom/smil/nsSMILCSSValueType.cpp +++ b/dom/smil/nsSMILCSSValueType.cpp @@ -18,6 +18,7 @@ #include "nsDebug.h" #include "nsStyleUtil.h" #include "nsIDocument.h" +#include "nsComputedDOMStyle.h" using namespace mozilla::dom; using mozilla::StyleAnimationValue; diff --git a/dom/smil/nsSMILCompositor.cpp b/dom/smil/nsSMILCompositor.cpp index fe7b2c828..e7bf60932 100644 --- a/dom/smil/nsSMILCompositor.cpp +++ b/dom/smil/nsSMILCompositor.cpp @@ -9,6 +9,9 @@ #include "nsCSSProps.h" #include "nsHashKeys.h" #include "nsSMILCSSProperty.h" +#include "mozilla/CSSEnabledState.h" + +using namespace mozilla; // PLDHashEntryHdr methods bool diff --git a/dom/smil/nsSMILInstanceTime.h b/dom/smil/nsSMILInstanceTime.h index d5a5807e3..4602c9127 100644 --- a/dom/smil/nsSMILInstanceTime.h +++ b/dom/smil/nsSMILInstanceTime.h @@ -8,6 +8,7 @@ #define NS_SMILINSTANCETIME_H_ #include "nsSMILTimeValue.h" +#include "nsISupports.h" class nsSMILInterval; class nsSMILTimeContainer; diff --git a/dom/smil/nsSMILTimeContainer.cpp b/dom/smil/nsSMILTimeContainer.cpp index 3df8a64ca..e3ebf5b09 100644 --- a/dom/smil/nsSMILTimeContainer.cpp +++ b/dom/smil/nsSMILTimeContainer.cpp @@ -11,6 +11,8 @@ #include "mozilla/AutoRestore.h" +using namespace mozilla; + nsSMILTimeContainer::nsSMILTimeContainer() : mParent(nullptr), diff --git a/dom/svg/SVGDocument.cpp b/dom/svg/SVGDocument.cpp index f992e52f5..8b677d2e3 100644 --- a/dom/svg/SVGDocument.cpp +++ b/dom/svg/SVGDocument.cpp @@ -21,6 +21,8 @@ #include "nsSVGElement.h" #include "mozilla/StyleSheet.h" #include "mozilla/StyleSheetInlines.h" +#include "nsContentUtils.h" +#include "nsLayoutUtils.h" using namespace mozilla::css; using namespace mozilla::dom; diff --git a/dom/svg/SVGElementFactory.cpp b/dom/svg/SVGElementFactory.cpp index d3e922ee5..fe9dcbcff 100644 --- a/dom/svg/SVGElementFactory.cpp +++ b/dom/svg/SVGElementFactory.cpp @@ -7,9 +7,7 @@ #include "SVGElementFactory.h" #include "nsGkAtoms.h" #include "nsIContent.h" -#include "mozilla/dom/NodeInfo.h" #include "mozilla/dom/Element.h" -#include "mozilla/dom/FromParser.h" using namespace mozilla; using namespace mozilla::dom; diff --git a/dom/svg/SVGElementFactory.h b/dom/svg/SVGElementFactory.h index 6d6fa1ca9..a3b643c72 100644 --- a/dom/svg/SVGElementFactory.h +++ b/dom/svg/SVGElementFactory.h @@ -7,6 +7,11 @@ #ifndef mozilla_dom_SVGElementFactory_h #define mozilla_dom_SVGElementFactory_h +#include "nsError.h" +#include "nsIContent.h" +#include "mozilla/dom/FromParser.h" +#include "mozilla/dom/NodeInfo.h" + class nsIAtom; namespace mozilla { diff --git a/dom/svg/SVGGraphicsElement.cpp b/dom/svg/SVGGraphicsElement.cpp index ba6306680..4b85c9abb 100644 --- a/dom/svg/SVGGraphicsElement.cpp +++ b/dom/svg/SVGGraphicsElement.cpp @@ -6,6 +6,8 @@ #include "mozilla/dom/SVGGraphicsElement.h" +#include "nsContentUtils.h" + namespace mozilla { namespace dom { diff --git a/dom/svg/SVGSymbolElement.cpp b/dom/svg/SVGSymbolElement.cpp index 42de96efd..a1b52bfab 100644 --- a/dom/svg/SVGSymbolElement.cpp +++ b/dom/svg/SVGSymbolElement.cpp @@ -7,6 +7,8 @@ #include "mozilla/dom/SVGSymbolElement.h" #include "mozilla/dom/SVGSymbolElementBinding.h" +#include "nsContentUtils.h" + NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT(Symbol) namespace mozilla { diff --git a/dom/svg/SVGTests.cpp b/dom/svg/SVGTests.cpp index 963ac27e4..03b205f67 100644 --- a/dom/svg/SVGTests.cpp +++ b/dom/svg/SVGTests.cpp @@ -11,6 +11,7 @@ #include "nsCharSeparatedTokenizer.h" #include "nsStyleUtil.h" #include "mozilla/Preferences.h" +#include "nsIContentInlines.h" namespace mozilla { namespace dom { diff --git a/dom/svg/moz.build b/dom/svg/moz.build index 08cf1d78d..56f5133d9 100644 --- a/dom/svg/moz.build +++ b/dom/svg/moz.build @@ -103,7 +103,7 @@ EXPORTS.mozilla.dom += [ 'SVGZoomEvent.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'DOMSVGAnimatedLengthList.cpp', 'DOMSVGAnimatedNumberList.cpp', 'DOMSVGLength.cpp', diff --git a/dom/system/moz.build b/dom/system/moz.build index fc8cf533b..cb0818b34 100644 --- a/dom/system/moz.build +++ b/dom/system/moz.build @@ -30,7 +30,7 @@ EXPORTS.mozilla += [ 'OSFileConstants.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'nsDeviceSensors.cpp', 'OSFileConstants.cpp', ] diff --git a/dom/workers/ServiceWorkerCommon.h b/dom/workers/ServiceWorkerCommon.h index 1c272c125..d7e2ec21b 100644 --- a/dom/workers/ServiceWorkerCommon.h +++ b/dom/workers/ServiceWorkerCommon.h @@ -7,6 +7,8 @@ #ifndef mozilla_dom_ServiceWorkerCommon_h #define mozilla_dom_ServiceWorkerCommon_h +#include "mozilla/TypedEnumBits.h" + namespace mozilla { namespace dom { diff --git a/dom/workers/ServiceWorkerEvents.cpp b/dom/workers/ServiceWorkerEvents.cpp index 8b375c635..a8b69bc48 100644 --- a/dom/workers/ServiceWorkerEvents.cpp +++ b/dom/workers/ServiceWorkerEvents.cpp @@ -28,6 +28,7 @@ #include "ServiceWorkerManager.h" #include "mozilla/ErrorResult.h" +#include "mozilla/Move.h" #include "mozilla/Preferences.h" #include "mozilla/dom/BodyUtil.h" #include "mozilla/dom/DOMException.h" @@ -50,6 +51,7 @@ #include "WorkerPrivate.h" #include "xpcpublic.h" +using namespace mozilla; using namespace mozilla::dom; using namespace mozilla::dom::workers; diff --git a/dom/workers/ServiceWorkerInfo.cpp b/dom/workers/ServiceWorkerInfo.cpp index fa08b97a6..04fba7f8e 100644 --- a/dom/workers/ServiceWorkerInfo.cpp +++ b/dom/workers/ServiceWorkerInfo.cpp @@ -6,6 +6,8 @@ #include "ServiceWorkerInfo.h" +#include "ServiceWorker.h" +#include "ServiceWorkerPrivate.h" #include "ServiceWorkerScriptCache.h" BEGIN_WORKERS_NAMESPACE diff --git a/dom/workers/ServiceWorkerInfo.h b/dom/workers/ServiceWorkerInfo.h index 80910bdad..8c3220c1a 100644 --- a/dom/workers/ServiceWorkerInfo.h +++ b/dom/workers/ServiceWorkerInfo.h @@ -9,6 +9,7 @@ #include "mozilla/dom/ServiceWorkerBinding.h" // For ServiceWorkerState #include "nsIServiceWorkerManager.h" +#include "Workers.h" namespace mozilla { namespace dom { diff --git a/dom/workers/ServiceWorkerJob.cpp b/dom/workers/ServiceWorkerJob.cpp index 3d0a8e2cd..d80dddfb6 100644 --- a/dom/workers/ServiceWorkerJob.cpp +++ b/dom/workers/ServiceWorkerJob.cpp @@ -9,6 +9,7 @@ #include "nsProxyRelease.h" #include "nsThreadUtils.h" #include "Workers.h" +#include "ServiceWorkerManager.h" namespace mozilla { namespace dom { diff --git a/dom/workers/ServiceWorkerRegisterJob.cpp b/dom/workers/ServiceWorkerRegisterJob.cpp index 8f771e762..595c029e1 100644 --- a/dom/workers/ServiceWorkerRegisterJob.cpp +++ b/dom/workers/ServiceWorkerRegisterJob.cpp @@ -6,6 +6,7 @@ #include "ServiceWorkerRegisterJob.h" +#include "ServiceWorkerManager.h" #include "Workers.h" namespace mozilla { diff --git a/dom/workers/ServiceWorkerRegistrationInfo.cpp b/dom/workers/ServiceWorkerRegistrationInfo.cpp index 26ad74bda..28d9fa9de 100644 --- a/dom/workers/ServiceWorkerRegistrationInfo.cpp +++ b/dom/workers/ServiceWorkerRegistrationInfo.cpp @@ -6,6 +6,10 @@ #include "ServiceWorkerRegistrationInfo.h" +#include "ServiceWorkerManager.h" +#include "ServiceWorkerPrivate.h" +#include "nsProxyRelease.h" + BEGIN_WORKERS_NAMESPACE namespace { diff --git a/dom/workers/ServiceWorkerRegistrationInfo.h b/dom/workers/ServiceWorkerRegistrationInfo.h index d2d217be0..a7175ef58 100644 --- a/dom/workers/ServiceWorkerRegistrationInfo.h +++ b/dom/workers/ServiceWorkerRegistrationInfo.h @@ -8,6 +8,7 @@ #define mozilla_dom_workers_serviceworkerregistrationinfo_h #include "mozilla/dom/workers/ServiceWorkerInfo.h" +#include "mozilla/dom/workers/ServiceWorkerCommon.h" namespace mozilla { namespace dom { diff --git a/dom/workers/ServiceWorkerUnregisterJob.cpp b/dom/workers/ServiceWorkerUnregisterJob.cpp index 8fd76b63d..9fd377700 100644 --- a/dom/workers/ServiceWorkerUnregisterJob.cpp +++ b/dom/workers/ServiceWorkerUnregisterJob.cpp @@ -7,6 +7,10 @@ #include "ServiceWorkerUnregisterJob.h" #include "nsIPushService.h" +#include "nsServiceManagerUtils.h" +#include "mozilla/Unused.h" +#include "Workers.h" +#include "ServiceWorkerManager.h" namespace mozilla { namespace dom { diff --git a/dom/workers/ServiceWorkerUpdateJob.cpp b/dom/workers/ServiceWorkerUpdateJob.cpp index 69877dfe4..38f58a3f9 100644 --- a/dom/workers/ServiceWorkerUpdateJob.cpp +++ b/dom/workers/ServiceWorkerUpdateJob.cpp @@ -6,9 +6,13 @@ #include "ServiceWorkerUpdateJob.h" +#include "nsProxyRelease.h" #include "nsIScriptError.h" #include "nsIURL.h" +#include "nsNetUtil.h" #include "ServiceWorkerScriptCache.h" +#include "ServiceWorkerPrivate.h" +#include "ServiceWorkerManager.h" #include "Workers.h" namespace mozilla { diff --git a/dom/workers/ServiceWorkerUpdateJob.h b/dom/workers/ServiceWorkerUpdateJob.h index 77adb2212..e5bfdc81d 100644 --- a/dom/workers/ServiceWorkerUpdateJob.h +++ b/dom/workers/ServiceWorkerUpdateJob.h @@ -8,6 +8,8 @@ #define mozilla_dom_workers_serviceworkerupdatejob_h #include "ServiceWorkerJob.h" +#include "ServiceWorkerRegistrationInfo.h" +#include "nsILoadGroup.h" namespace mozilla { namespace dom { diff --git a/dom/workers/ServiceWorkerWindowClient.cpp b/dom/workers/ServiceWorkerWindowClient.cpp index bae747214..bf22a7b28 100644 --- a/dom/workers/ServiceWorkerWindowClient.cpp +++ b/dom/workers/ServiceWorkerWindowClient.cpp @@ -19,16 +19,19 @@ #include "nsIDocShellLoadInfo.h" #include "nsIDocument.h" #include "nsIGlobalObject.h" +#include "nsIInterfaceRequestor.h" #include "nsIPrincipal.h" #include "nsIScriptSecurityManager.h" #include "nsIWebNavigation.h" #include "nsIWebProgress.h" #include "nsIWebProgressListener.h" +#include "nsNetUtil.h" #include "nsString.h" #include "nsWeakReference.h" #include "ServiceWorker.h" #include "ServiceWorkerInfo.h" #include "ServiceWorkerManager.h" +#include "ServiceWorkerPrivate.h" #include "WorkerPrivate.h" #include "WorkerScope.h" diff --git a/dom/workers/SharedWorker.cpp b/dom/workers/SharedWorker.cpp index 71c644405..dfdb8ed84 100644 --- a/dom/workers/SharedWorker.cpp +++ b/dom/workers/SharedWorker.cpp @@ -8,6 +8,7 @@ #include "nsPIDOMWindow.h" +#include "mozilla/dom/Event.h" #include "mozilla/EventDispatcher.h" #include "mozilla/Preferences.h" #include "mozilla/dom/MessagePort.h" diff --git a/dom/workers/WorkerRunnable.cpp b/dom/workers/WorkerRunnable.cpp index 60d69d4e4..8944c751c 100644 --- a/dom/workers/WorkerRunnable.cpp +++ b/dom/workers/WorkerRunnable.cpp @@ -14,6 +14,7 @@ #include "mozilla/DebugOnly.h" #include "mozilla/ErrorResult.h" +#include "mozilla/Unused.h" #include "mozilla/dom/ScriptSettings.h" #include "js/RootingAPI.h" @@ -22,6 +23,7 @@ #include "WorkerPrivate.h" #include "WorkerScope.h" +using namespace mozilla; USING_WORKERS_NAMESPACE namespace { diff --git a/dom/workers/WorkerRunnable.h b/dom/workers/WorkerRunnable.h index 8249a8053..2c9fb3b1d 100644 --- a/dom/workers/WorkerRunnable.h +++ b/dom/workers/WorkerRunnable.h @@ -14,6 +14,7 @@ #include "mozilla/Atomics.h" #include "nsISupportsImpl.h" #include "nsThreadUtils.h" /* nsRunnable */ +#include "WorkerHolder.h" struct JSContext; class nsIEventTarget; diff --git a/dom/workers/moz.build b/dom/workers/moz.build index 9fea84193..0ba7d9ad6 100644 --- a/dom/workers/moz.build +++ b/dom/workers/moz.build @@ -22,6 +22,7 @@ EXPORTS.mozilla.dom += [ EXPORTS.mozilla.dom.workers += [ 'RuntimeService.h', + 'ServiceWorkerCommon.h', 'ServiceWorkerInfo.h', 'ServiceWorkerManager.h', 'ServiceWorkerRegistrationInfo.h', @@ -46,7 +47,7 @@ XPIDL_SOURCES += [ 'nsIWorkerDebuggerManager.idl', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'ChromeWorkerScope.cpp', 'FileReaderSync.cpp', 'Principal.cpp', diff --git a/dom/xbl/moz.build b/dom/xbl/moz.build index 0950db036..7a8814878 100644 --- a/dom/xbl/moz.build +++ b/dom/xbl/moz.build @@ -16,7 +16,7 @@ EXPORTS.mozilla.dom += [ 'XBLChildrenElement.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'nsBindingManager.cpp', 'nsXBLBinding.cpp', 'nsXBLContentSink.cpp', diff --git a/dom/xhr/XMLHttpRequestString.cpp b/dom/xhr/XMLHttpRequestString.cpp index c668b94f6..c2bde5e0e 100644 --- a/dom/xhr/XMLHttpRequestString.cpp +++ b/dom/xhr/XMLHttpRequestString.cpp @@ -12,97 +12,6 @@ namespace mozilla { namespace dom { -class XMLHttpRequestStringBuffer final -{ - friend class XMLHttpRequestStringWriterHelper; - friend class XMLHttpRequestStringSnapshotReaderHelper; - -public: - NS_INLINE_DECL_THREADSAFE_REFCOUNTING(XMLHttpRequestStringBuffer) - NS_DECL_OWNINGTHREAD - - XMLHttpRequestStringBuffer() - : mMutex("XMLHttpRequestStringBuffer::mMutex") - { - } - - uint32_t - Length() - { - MutexAutoLock lock(mMutex); - return mData.Length(); - } - - uint32_t - UnsafeLength() const - { - return mData.Length(); - } - - void - Append(const nsAString& aString) - { - NS_ASSERT_OWNINGTHREAD(XMLHttpRequestStringBuffer); - - MutexAutoLock lock(mMutex); - mData.Append(aString); - } - - MOZ_MUST_USE bool - GetAsString(nsAString& aString) - { - MutexAutoLock lock(mMutex); - return aString.Assign(mData, mozilla::fallible); - } - - size_t - SizeOfThis(MallocSizeOf aMallocSizeOf) const - { - return mData.SizeOfExcludingThisIfUnshared(aMallocSizeOf); - } - - MOZ_MUST_USE bool - GetAsString(DOMString& aString, uint32_t aLength) - { - MutexAutoLock lock(mMutex); - MOZ_ASSERT(aLength <= mData.Length()); - nsStringBuffer* buf = nsStringBuffer::FromString(mData); - if (buf) { - // We have to use SetEphemeralStringBuffer, because once we release our - // mutex mData can get mutated from some other thread while the DOMString - // is still alive. - aString.SetEphemeralStringBuffer(buf, aLength); - return true; - } - - // We can get here if mData is empty. In that case it won't have an - // nsStringBuffer.... - MOZ_ASSERT(mData.IsEmpty()); - return aString.AsAString().Assign(mData.BeginReading(), aLength, - mozilla::fallible); - } - - void - CreateSnapshot(XMLHttpRequestStringSnapshot& aSnapshot) - { - MutexAutoLock lock(mMutex); - aSnapshot.Set(this, mData.Length()); - } - -private: - ~XMLHttpRequestStringBuffer() - {} - - nsString& UnsafeData() - { - return mData; - } - - Mutex mMutex; - - // The following member variable is protected by mutex. - nsString mData; -}; // --------------------------------------------------------------------------- // XMLHttpRequestString diff --git a/dom/xhr/XMLHttpRequestString.h b/dom/xhr/XMLHttpRequestString.h index b6b12483f..5709c1aa2 100644 --- a/dom/xhr/XMLHttpRequestString.h +++ b/dom/xhr/XMLHttpRequestString.h @@ -7,6 +7,9 @@ #ifndef mozilla_dom_XMLHttpRequestString_h #define mozilla_dom_XMLHttpRequestString_h +#include "mozilla/Mutex.h" +#include "mozilla/RefPtr.h" +#include "mozilla/dom/DOMString.h" #include "nsString.h" namespace mozilla { @@ -155,6 +158,98 @@ private: MutexAutoLock mLock; }; +class XMLHttpRequestStringBuffer final +{ + friend class XMLHttpRequestStringWriterHelper; + friend class XMLHttpRequestStringSnapshotReaderHelper; + +public: + NS_INLINE_DECL_THREADSAFE_REFCOUNTING(XMLHttpRequestStringBuffer) + NS_DECL_OWNINGTHREAD + + XMLHttpRequestStringBuffer() + : mMutex("XMLHttpRequestStringBuffer::mMutex") + { + } + + uint32_t + Length() + { + MutexAutoLock lock(mMutex); + return mData.Length(); + } + + uint32_t + UnsafeLength() const + { + return mData.Length(); + } + + void + Append(const nsAString& aString) + { + NS_ASSERT_OWNINGTHREAD(XMLHttpRequestStringBuffer); + + MutexAutoLock lock(mMutex); + mData.Append(aString); + } + + MOZ_MUST_USE bool + GetAsString(nsAString& aString) + { + MutexAutoLock lock(mMutex); + return aString.Assign(mData, mozilla::fallible); + } + + size_t + SizeOfThis(MallocSizeOf aMallocSizeOf) const + { + return mData.SizeOfExcludingThisIfUnshared(aMallocSizeOf); + } + + MOZ_MUST_USE bool + GetAsString(DOMString& aString, uint32_t aLength) + { + MutexAutoLock lock(mMutex); + MOZ_ASSERT(aLength <= mData.Length()); + nsStringBuffer* buf = nsStringBuffer::FromString(mData); + if (buf) { + // We have to use SetEphemeralStringBuffer, because once we release our + // mutex mData can get mutated from some other thread while the DOMString + // is still alive. + aString.SetEphemeralStringBuffer(buf, aLength); + return true; + } + + // We can get here if mData is empty. In that case it won't have an + // nsStringBuffer.... + MOZ_ASSERT(mData.IsEmpty()); + return aString.AsAString().Assign(mData.BeginReading(), aLength, + mozilla::fallible); + } + + void + CreateSnapshot(XMLHttpRequestStringSnapshot& aSnapshot) + { + MutexAutoLock lock(mMutex); + aSnapshot.Set(this, mData.Length()); + } + +private: + ~XMLHttpRequestStringBuffer() + {} + + nsString& UnsafeData() + { + return mData; + } + + Mutex mMutex; + + // The following member variable is protected by mutex. + nsString mData; +}; + } // dom namespace } // mozilla namespace diff --git a/dom/xhr/XMLHttpRequestWorker.cpp b/dom/xhr/XMLHttpRequestWorker.cpp index 2af61bd7d..7bec379aa 100644 --- a/dom/xhr/XMLHttpRequestWorker.cpp +++ b/dom/xhr/XMLHttpRequestWorker.cpp @@ -33,6 +33,8 @@ #include "WorkerScope.h" #include "WorkerPrivate.h" #include "WorkerRunnable.h" +#include "XMLHttpRequestMainThread.h" +#include "XMLHttpRequestString.h" #include "XMLHttpRequestUpload.h" #include "mozilla/UniquePtr.h" diff --git a/dom/xhr/moz.build b/dom/xhr/moz.build index 4ad91deea..d4803015f 100644 --- a/dom/xhr/moz.build +++ b/dom/xhr/moz.build @@ -18,7 +18,7 @@ EXPORTS.mozilla.dom += [ 'XMLHttpRequestUpload.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'XMLHttpRequest.cpp', 'XMLHttpRequestEventTarget.cpp', 'XMLHttpRequestMainThread.cpp', diff --git a/dom/xml/moz.build b/dom/xml/moz.build index f3af9968d..0eb3ee686 100644 --- a/dom/xml/moz.build +++ b/dom/xml/moz.build @@ -20,7 +20,7 @@ EXPORTS.mozilla.dom += [ 'XMLStylesheetProcessingInstruction.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'CDATASection.cpp', 'nsXMLContentSink.cpp', 'nsXMLElement.cpp', diff --git a/dom/xml/nsXMLPrettyPrinter.cpp b/dom/xml/nsXMLPrettyPrinter.cpp index 2e086dde0..7f1f2b07a 100644 --- a/dom/xml/nsXMLPrettyPrinter.cpp +++ b/dom/xml/nsXMLPrettyPrinter.cpp @@ -11,6 +11,7 @@ #include "nsIXSLTProcessor.h" #include "nsSyncLoadService.h" #include "nsPIDOMWindow.h" +#include "nsIDOMDocument.h" #include "nsIDOMElement.h" #include "nsIServiceManager.h" #include "nsNetUtil.h" diff --git a/dom/xslt/base/moz.build b/dom/xslt/base/moz.build index 7d9cd70fa..d08db4935 100644 --- a/dom/xslt/base/moz.build +++ b/dom/xslt/base/moz.build @@ -4,7 +4,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/. -UNIFIED_SOURCES += [ +SOURCES += [ 'txDouble.cpp', 'txExpandedName.cpp', 'txExpandedNameMap.cpp', diff --git a/dom/xslt/xml/moz.build b/dom/xslt/xml/moz.build index f20a27bba..967035466 100644 --- a/dom/xslt/xml/moz.build +++ b/dom/xslt/xml/moz.build @@ -4,7 +4,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/. -UNIFIED_SOURCES += [ +SOURCES += [ 'txXMLParser.cpp', 'txXMLUtils.cpp', ] diff --git a/dom/xslt/xpath/moz.build b/dom/xslt/xpath/moz.build index 1a7dbf89f..aa989ee91 100644 --- a/dom/xslt/xpath/moz.build +++ b/dom/xslt/xpath/moz.build @@ -10,7 +10,7 @@ EXPORTS.mozilla.dom += [ 'XPathResult.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'txBooleanExpr.cpp', 'txBooleanResult.cpp', 'txCoreFunctionCall.cpp', diff --git a/dom/xslt/xslt/moz.build b/dom/xslt/xslt/moz.build index d629e1d3e..8c9e98a0a 100644 --- a/dom/xslt/xslt/moz.build +++ b/dom/xslt/xslt/moz.build @@ -8,7 +8,7 @@ EXPORTS.mozilla.dom += [ 'txMozillaXSLTProcessor.h' ] -UNIFIED_SOURCES += [ +SOURCES += [ 'txBufferingHandler.cpp', 'txCurrentFunctionCall.cpp', 'txDocumentFunctionCall.cpp', diff --git a/dom/xslt/xslt/txExecutionState.cpp b/dom/xslt/xslt/txExecutionState.cpp index 869c3968b..5caaf77f0 100644 --- a/dom/xslt/xslt/txExecutionState.cpp +++ b/dom/xslt/xslt/txExecutionState.cpp @@ -13,6 +13,9 @@ #include "txLog.h" #include "txURIUtils.h" #include "txXMLParser.h" +#include "mozilla/Logging.h" + +using mozilla::LogLevel; const int32_t txExecutionState::kMaxRecursionDepth = 20000; diff --git a/dom/xslt/xslt/txMozillaXSLTProcessor.cpp b/dom/xslt/xslt/txMozillaXSLTProcessor.cpp index 0a2dd9b08..6aec6052f 100644 --- a/dom/xslt/xslt/txMozillaXSLTProcessor.cpp +++ b/dom/xslt/xslt/txMozillaXSLTProcessor.cpp @@ -37,7 +37,9 @@ #include "nsVariant.h" #include "mozilla/dom/DocumentFragment.h" #include "mozilla/dom/XSLTProcessorBinding.h" +#include "mozilla/ErrorResult.h" +using namespace mozilla; using namespace mozilla::dom; static NS_DEFINE_CID(kXMLDocumentCID, NS_XMLDOCUMENT_CID); diff --git a/dom/xul/moz.build b/dom/xul/moz.build index 8dff722be..dad38a2c4 100644 --- a/dom/xul/moz.build +++ b/dom/xul/moz.build @@ -19,7 +19,7 @@ if CONFIG['MOZ_XUL']: 'nsIXULDocument.h', ] - UNIFIED_SOURCES += [ + SOURCES += [ 'nsXULCommandDispatcher.cpp', 'nsXULContentSink.cpp', 'nsXULElement.cpp', @@ -36,7 +36,7 @@ XPIDL_SOURCES += [ XPIDL_MODULE = 'xul' -UNIFIED_SOURCES += [ +SOURCES += [ 'nsXULControllers.cpp', ] diff --git a/dom/xul/nsXULContentSink.cpp b/dom/xul/nsXULContentSink.cpp index 7103be758..edeee8728 100644 --- a/dom/xul/nsXULContentSink.cpp +++ b/dom/xul/nsXULContentSink.cpp @@ -42,6 +42,7 @@ #include "nsReadableUtils.h" #include "nsXULElement.h" #include "mozilla/Logging.h" +#include "mozilla/CheckedInt.h" #include "prmem.h" #include "nsCRT.h" @@ -57,6 +58,7 @@ #include "nsIScriptError.h" #include "nsContentTypeParser.h" +using namespace mozilla; static mozilla::LazyLogModule gContentSinkLog("nsXULContentSink");; //---------------------------------------------------------------------- diff --git a/dom/xul/templates/moz.build b/dom/xul/templates/moz.build index 3beb0b7e5..780f01941 100644 --- a/dom/xul/templates/moz.build +++ b/dom/xul/templates/moz.build @@ -17,7 +17,7 @@ XPIDL_SOURCES += [ XPIDL_MODULE = 'xultmpl' -UNIFIED_SOURCES += [ +SOURCES += [ 'nsContentSupportMap.cpp', 'nsContentTestNode.cpp', 'nsInstantiationNode.cpp', diff --git a/dom/xul/templates/nsInstantiationNode.cpp b/dom/xul/templates/nsInstantiationNode.cpp index 9079d4189..ebf12acad 100644 --- a/dom/xul/templates/nsInstantiationNode.cpp +++ b/dom/xul/templates/nsInstantiationNode.cpp @@ -8,6 +8,9 @@ #include "nsXULTemplateQueryProcessorRDF.h" #include "mozilla/Logging.h" + +using namespace mozilla; + extern mozilla::LazyLogModule gXULTemplateLog; nsInstantiationNode::nsInstantiationNode(nsXULTemplateQueryProcessorRDF* aProcessor, diff --git a/dom/xul/templates/nsTemplateMap.h b/dom/xul/templates/nsTemplateMap.h index cb828b093..dfa7d611a 100644 --- a/dom/xul/templates/nsTemplateMap.h +++ b/dom/xul/templates/nsTemplateMap.h @@ -9,6 +9,8 @@ #include "PLDHashTable.h" #include "nsXULElement.h" +using mozilla::fallible; + class nsTemplateMap { protected: struct Entry : public PLDHashEntryHdr { diff --git a/dom/xul/templates/nsXULTemplateQueryProcessorRDF.cpp b/dom/xul/templates/nsXULTemplateQueryProcessorRDF.cpp index 732e545d0..ecf6b64c5 100644 --- a/dom/xul/templates/nsXULTemplateQueryProcessorRDF.cpp +++ b/dom/xul/templates/nsXULTemplateQueryProcessorRDF.cpp @@ -35,6 +35,10 @@ #include "nsXULSortService.h" #include "nsIDocument.h" +#include "mozilla/Logging.h" + +using namespace mozilla; + //---------------------------------------------------------------------- #define PARSE_TYPE_INTEGER "Integer" diff --git a/dom/xul/templates/nsXULTemplateQueryProcessorStorage.cpp b/dom/xul/templates/nsXULTemplateQueryProcessorStorage.cpp index a70307bf5..cd7c32eae 100644 --- a/dom/xul/templates/nsXULTemplateQueryProcessorStorage.cpp +++ b/dom/xul/templates/nsXULTemplateQueryProcessorStorage.cpp @@ -28,6 +28,8 @@ #include "nsIDocument.h" #include "nsNetUtil.h" +using mozilla::fallible; + //---------------------------------------------------------------------- // // nsXULTemplateResultSetStorage diff --git a/dom/xul/templates/nsXULTreeBuilder.cpp b/dom/xul/templates/nsXULTreeBuilder.cpp index b42133484..3356700be 100644 --- a/dom/xul/templates/nsXULTreeBuilder.cpp +++ b/dom/xul/templates/nsXULTreeBuilder.cpp @@ -32,6 +32,9 @@ #include "nsTreeContentView.h" #include "nsIXULStore.h" #include "mozilla/BinarySearch.h" +#include "mozilla/Logging.h" + +using mozilla::LogLevel; // For security check #include "nsIDocument.h" |