Done with:
./mach static-analysis check --checks="-*, modernize-concat-nested-namespaces" --fix .
and then clang-format on the files

Differential Revision: https://phabricator.services.mozilla.com/D58217

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Sylvestre Ledru 2020-01-18 13:48:34 +00:00
Родитель 506e65bcab
Коммит cc2040bf21
107 изменённых файлов: 223 добавлений и 455 удалений

Просмотреть файл

@ -990,8 +990,7 @@ struct MessageManagerReferentCount {
} // namespace
namespace mozilla {
namespace dom {
namespace mozilla::dom {
class MessageManagerReporter final : public nsIMemoryReporter {
~MessageManagerReporter() = default;
@ -1125,8 +1124,7 @@ MessageManagerReporter::CollectReports(nsIHandleReportCallback* aHandleReport,
return NS_OK;
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom
already_AddRefed<ChromeMessageBroadcaster>
nsFrameMessageManager::GetGlobalMessageManager() {

Просмотреть файл

@ -13,8 +13,7 @@
#include "nsTextFragmentImpl.h"
#include <algorithm>
namespace mozilla {
namespace SSE2 {
namespace mozilla::SSE2 {
static inline bool is_zero(__m128i x) {
return _mm_movemask_epi8(_mm_cmpeq_epi8(x, _mm_setzero_si128())) == 0xffff;
@ -64,5 +63,4 @@ int32_t FirstNon8Bit(const char16_t* str, const char16_t* end) {
return -1;
}
} // namespace SSE2
} // namespace mozilla
} // namespace mozilla::SSE2

Просмотреть файл

@ -25,9 +25,7 @@
NS_LITERAL_STRING("dischargingtimechange")
#define CHARGINGTIMECHANGE_EVENT_NAME NS_LITERAL_STRING("chargingtimechange")
namespace mozilla {
namespace dom {
namespace battery {
namespace mozilla::dom::battery {
BatteryManager::BatteryManager(nsPIDOMWindowInner* aWindow)
: DOMEventTargetHelper(aWindow),
@ -183,6 +181,4 @@ void BatteryManager::Notify(const hal::BatteryInformation& aBatteryInfo) {
}
}
} // namespace battery
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom::battery

Просмотреть файл

@ -13,8 +13,7 @@
using namespace mozilla::layers;
using namespace mozilla::gfx;
namespace mozilla {
namespace dom {
namespace mozilla::dom {
static ImageBitmapFormat GetImageBitmapFormatFromSurfaceFromat(
SurfaceFormat aSurfaceFormat) {
@ -200,5 +199,4 @@ uint32_t ImageUtils::GetBufferLength() const {
return mImpl->GetBufferLength();
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

Просмотреть файл

@ -10,8 +10,7 @@
#include "mozilla/dom/GeolocationPositionBinding.h"
#include "mozilla/dom/GeolocationCoordinatesBinding.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(GeolocationCoordinates, mPosition)
NS_IMPL_CYCLE_COLLECTING_ADDREF(GeolocationCoordinates)
@ -65,5 +64,4 @@ GENERATE_COORDS_WRAPPED_GETTER_NULLABLE(Speed)
#undef GENERATE_COORDS_WRAPPED_GETTER
#undef GENERATE_COORDS_WRAPPED_GETTER_NULLABLE
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

Просмотреть файл

@ -142,8 +142,7 @@ nsGeoPosition::GetCoords(nsIDOMGeoPositionCoords** aCoords) {
return NS_OK;
}
namespace mozilla {
namespace dom {
namespace mozilla::dom {
NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(GeolocationPosition, mParent,
mCoordinates)
@ -186,5 +185,4 @@ uint64_t GeolocationPosition::Timestamp() const {
return rv;
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

Просмотреть файл

@ -9,8 +9,7 @@
#include "mozilla/CycleCollectedJSContext.h" // for nsAutoMicroTask
#include "Geolocation.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(GeolocationPositionError, mParent)
NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(GeolocationPositionError, AddRef)
@ -64,5 +63,4 @@ void GeolocationPositionError::NotifyCallback(
}
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

Просмотреть файл

@ -19,8 +19,7 @@
#include "nsObjectLoadingContent.h"
#include "GeckoProfiler.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
class PluginDocument final : public MediaDocument, public nsIPluginDocument {
public:
@ -258,8 +257,7 @@ PluginDocument::Print() {
return NS_OK;
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom
nsresult NS_NewPluginDocument(mozilla::dom::Document** aResult) {
auto* doc = new mozilla::dom::PluginDocument();

Просмотреть файл

@ -141,8 +141,7 @@ namespace mozilla {
MOZ_TYPE_SPECIFIC_SCOPED_POINTER_TEMPLATE(ScopedPRFileDesc, PRFileDesc,
PR_Close);
namespace dom {
namespace indexedDB {
namespace dom::indexedDB {
using namespace mozilla::dom::quota;
using namespace mozilla::ipc;
@ -27676,8 +27675,7 @@ nsresult FileHelper::SyncCopy(nsIInputStream* aInputStream,
return rv;
}
} // namespace indexedDB
} // namespace dom
} // namespace dom::indexedDB
} // namespace mozilla
#undef IDB_MOBILE

Просмотреть файл

@ -27,9 +27,7 @@
#include "unicode/ucol.h"
#include "xpcpublic.h"
namespace mozilla {
namespace dom {
namespace indexedDB {
namespace mozilla::dom::indexedDB {
/*
Here's how we encode keys:
@ -887,6 +885,4 @@ nsresult Key::SetFromSource(T* aSource, uint32_t aIndex) {
return NS_OK;
}
} // namespace indexedDB
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom::indexedDB

Просмотреть файл

@ -456,9 +456,7 @@ void PopException() {
// Static callbacks that get routed back through the new C++ API
//
namespace mozilla {
namespace plugins {
namespace parent {
namespace mozilla::plugins::parent {
NPError _geturl(NPP npp, const char* relativeURL, const char* target) {
if (!NS_IsMainThread()) {
@ -1883,6 +1881,4 @@ void _setcurrentasyncsurface(NPP instance, NPAsyncSurface* surface,
inst->SetCurrentAsyncSurface(surface, changed);
}
} /* namespace parent */
} /* namespace plugins */
} /* namespace mozilla */
} // namespace mozilla::plugins::parent

Просмотреть файл

@ -154,8 +154,7 @@ static bool IsTypeInList(const nsCString& aMimeType, nsCString aTypeList) {
return FindInReadable(commaSeparated, start, end);
}
namespace mozilla {
namespace plugins {
namespace mozilla::plugins {
class BlocklistPromiseHandler final
: public mozilla::dom::PromiseNativeHandler {
public:
@ -260,8 +259,7 @@ NS_IMPL_ISUPPORTS0(BlocklistPromiseHandler)
bool BlocklistPromiseHandler::sPluginBlocklistStatesChangedSinceLastWrite =
false;
uint32_t BlocklistPromiseHandler::sPendingBlocklistStateRequests = 0;
} // namespace plugins
} // namespace mozilla
} // namespace mozilla::plugins
nsPluginHost::nsPluginHost()
: mPluginsLoaded(false),

Просмотреть файл

@ -77,8 +77,7 @@ nsresult NS_NewPrototypeDocumentContentSink(nsIContentSink** aResult,
return NS_OK;
}
namespace mozilla {
namespace dom {
namespace mozilla::dom {
PrototypeDocumentContentSink::PrototypeDocumentContentSink()
: mNextSrcLoadWaiter(nullptr),
@ -1080,5 +1079,4 @@ nsresult PrototypeDocumentContentSink::AddAttributes(
return NS_OK;
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

Просмотреть файл

@ -10,8 +10,7 @@
#include <string.h>
namespace mozilla {
namespace gfx {
namespace mozilla::gfx {
MOZ_ALWAYS_INLINE
__m128i Divide(__m128i aValues, __m128i aDivisor) {
@ -343,5 +342,4 @@ void AlphaBoxBlur::BoxBlur_SSE2(uint8_t* aData, int32_t aLeftLobe,
}
}
} // namespace gfx
} // namespace mozilla
} // namespace mozilla::gfx

Просмотреть файл

@ -13,8 +13,7 @@
#include <cmath>
#include "mozilla/Vector.h"
namespace mozilla {
namespace gfx {
namespace mozilla::gfx {
ConvolutionFilter::ConvolutionFilter()
: mFilter(MakeUnique<SkConvolutionFilter1D>()) {}
@ -163,5 +162,4 @@ bool ConvolutionFilter::ComputeResizeFilter(ResizeMethod aResizeMethod,
return mFilter->maxFilter() > 0 && mFilter->numValues() == aDstSize;
}
} // namespace gfx
} // namespace mozilla
} // namespace mozilla::gfx

Просмотреть файл

@ -42,8 +42,7 @@
# include "ScaledFontDWrite.h"
#endif
namespace mozilla {
namespace gfx {
namespace mozilla::gfx {
class GradientStopsSkia : public GradientStops {
public:
@ -1885,5 +1884,4 @@ void DrawTargetSkia::MarkChanged() {
}
}
} // namespace gfx
} // namespace mozilla
} // namespace mozilla::gfx

Просмотреть файл

@ -202,8 +202,7 @@ void mozilla_UnlockFTLibrary(FT_Library aFTLibrary) {
}
#endif
namespace mozilla {
namespace gfx {
namespace mozilla::gfx {
#ifdef MOZ_ENABLE_FREETYPE
FT_Library Factory::mFTLibrary = nullptr;
@ -1378,5 +1377,4 @@ void LogWStr(const wchar_t* aWStr, std::stringstream& aOut) {
}
#endif
} // namespace gfx
} // namespace mozilla
} // namespace mozilla::gfx

Просмотреть файл

@ -13,8 +13,7 @@ static_assert(
false, "If this file is built, FilterProcessing.h should know about it!");
#endif
namespace mozilla {
namespace gfx {
namespace mozilla::gfx {
void FilterProcessing::ExtractAlpha_SSE2(const IntSize& size,
uint8_t* sourceData,
@ -124,5 +123,4 @@ FilterProcessing::ApplyArithmeticCombine_SSE2(DataSourceSurface* aInput1,
aInput1, aInput2, aK1, aK2, aK3, aK4);
}
} // namespace gfx
} // namespace mozilla
} // namespace mozilla::gfx

Просмотреть файл

@ -134,8 +134,7 @@ MOZ_ALWAYS_INLINE uint32_t Avg2(uint32_t a, uint32_t b) {
return ((sum & mask) >> 1) + carry;
}
namespace mozilla {
namespace gfx {
namespace mozilla::gfx {
void ImageHalfScaler::HalfImage2D_SSE2(uint8_t* aSource, int32_t aSourceStride,
const IntSize& aSourceSize,
@ -331,5 +330,4 @@ void ImageHalfScaler::HalfImageHorizontal_SSE2(uint8_t* aSource,
}
}
} // namespace gfx
} // namespace mozilla
} // namespace mozilla::gfx

Просмотреть файл

@ -15,8 +15,7 @@
using namespace mozilla::gfx;
namespace mozilla {
namespace gfx {
namespace mozilla::gfx {
InlineTranslator::InlineTranslator() : mFontContext(nullptr) {}
@ -110,5 +109,4 @@ already_AddRefed<DrawTarget> InlineTranslator::CreateDrawTarget(
return drawTarget.forget();
}
} // namespace gfx
} // namespace mozilla
} // namespace mozilla::gfx

Просмотреть файл

@ -7,8 +7,7 @@
#include "JobScheduler.h"
#include "mozilla/gfx/Logging.h"
namespace mozilla {
namespace gfx {
namespace mozilla::gfx {
void* ThreadCallback(void* threadData);
@ -153,5 +152,4 @@ void EventObject::Wait() {
mCond.Wait(&mMutex);
}
} // namespace gfx
} // namespace mozilla
} // namespace mozilla::gfx

Просмотреть файл

@ -8,8 +8,7 @@
#include "UnscaledFontFreeType.h"
#include "Logging.h"
namespace mozilla {
namespace gfx {
namespace mozilla::gfx {
NativeFontResourceFreeType::NativeFontResourceFreeType(
UniquePtr<uint8_t[]>&& aFontData, uint32_t aDataLength,
@ -90,5 +89,4 @@ NativeFontResourceFontconfig::Create(uint8_t* aFontData, uint32_t aDataLength,
}
#endif
} // namespace gfx
} // namespace mozilla
} // namespace mozilla::gfx

Просмотреть файл

@ -11,8 +11,7 @@
#include "HelpersSkia.h"
#include "PathHelpers.h"
namespace mozilla {
namespace gfx {
namespace mozilla::gfx {
PathBuilderSkia::PathBuilderSkia(const Matrix& aTransform, const SkPath& aPath,
FillRule aFillRule)
@ -203,5 +202,4 @@ void PathSkia::StreamToSink(PathSink* aSink) const {
}
}
} // namespace gfx
} // namespace mozilla
} // namespace mozilla::gfx

Просмотреть файл

@ -21,8 +21,7 @@
#include FT_LCD_FILTER_H
#include FT_MULTIPLE_MASTERS_H
namespace mozilla {
namespace gfx {
namespace mozilla::gfx {
ScaledFontFontconfig::ScaledFontFontconfig(
RefPtr<SharedFTFace>&& aFace, FcPattern* aPattern,
@ -521,5 +520,4 @@ already_AddRefed<UnscaledFont> UnscaledFontFontconfig::CreateFromFontDescriptor(
return unscaledFont.forget();
}
} // namespace gfx
} // namespace mozilla
} // namespace mozilla::gfx

Просмотреть файл

@ -12,8 +12,7 @@
#include "skia/include/core/SkData.h"
#include "mozilla/CheckedInt.h"
namespace mozilla {
namespace gfx {
namespace mozilla::gfx {
SourceSurfaceSkia::SourceSurfaceSkia()
: mFormat(SurfaceFormat::UNKNOWN),
@ -171,5 +170,4 @@ void SourceSurfaceSkia::DrawTargetWillChange() {
}
}
} // namespace gfx
} // namespace mozilla
} // namespace mozilla::gfx

Просмотреть файл

@ -9,8 +9,7 @@
#include <immintrin.h>
#include <tmmintrin.h>
namespace mozilla {
namespace gfx {
namespace mozilla::gfx {
template <bool aSwapRB>
void UnpackRowRGB24_SSSE3(const uint8_t* aSrc, uint8_t* aDst, int32_t aLength);
@ -81,5 +80,4 @@ void UnpackRowRGB24_AVX2(const uint8_t* aSrc, uint8_t* aDst, int32_t aLength) {
template void UnpackRowRGB24_AVX2<false>(const uint8_t*, uint8_t*, int32_t);
template void UnpackRowRGB24_AVX2<true>(const uint8_t*, uint8_t*, int32_t);
} // namespace gfx
} // namespace mozilla
} // namespace mozilla::gfx

Просмотреть файл

@ -8,8 +8,7 @@
#include <emmintrin.h>
namespace mozilla {
namespace gfx {
namespace mozilla::gfx {
// Load 1-3 pixels into a 4 pixel vector.
static MOZ_ALWAYS_INLINE __m128i LoadRemainder_SSE2(const uint8_t* aSrc,
@ -372,5 +371,4 @@ template void Swizzle_SSE2<true, false>(const uint8_t*, int32_t, uint8_t*,
template void Swizzle_SSE2<true, true>(const uint8_t*, int32_t, uint8_t*,
int32_t, IntSize);
} // namespace gfx
} // namespace mozilla
} // namespace mozilla::gfx

Просмотреть файл

@ -9,8 +9,7 @@
#include <emmintrin.h>
#include <tmmintrin.h>
namespace mozilla {
namespace gfx {
namespace mozilla::gfx {
template <bool aSwapRB>
void UnpackRowRGB24(const uint8_t* aSrc, uint8_t* aDst, int32_t aLength);
@ -63,5 +62,4 @@ void UnpackRowRGB24_SSSE3(const uint8_t* aSrc, uint8_t* aDst, int32_t aLength) {
template void UnpackRowRGB24_SSSE3<false>(const uint8_t*, uint8_t*, int32_t);
template void UnpackRowRGB24_SSSE3<true>(const uint8_t*, uint8_t*, int32_t);
} // namespace gfx
} // namespace mozilla
} // namespace mozilla::gfx

Просмотреть файл

@ -20,8 +20,7 @@
#include <sys/stat.h>
#include <sys/mman.h>
namespace mozilla {
namespace gfx {
namespace mozilla::gfx {
bool UnscaledFontFreeType::GetFontFileData(FontFileDataOutput aDataCallback,
void* aBaton) {
@ -191,5 +190,4 @@ void UnscaledFontFreeType::ApplyVariationsToFace(
}
}
} // namespace gfx
} // namespace mozilla
} // namespace mozilla::gfx

Просмотреть файл

@ -46,8 +46,7 @@
# include "gfxPlatformGtk.h"
#endif
namespace mozilla {
namespace gl {
namespace mozilla::gl {
using namespace mozilla::gfx;
using namespace mozilla::widget;
@ -1052,5 +1051,4 @@ GLContext* GLContextProviderGLX::GetGlobalContext() {
/*static*/
void GLContextProviderGLX::Shutdown() {}
} /* namespace gl */
} /* namespace mozilla */
} // namespace mozilla::gl

Просмотреть файл

@ -10,8 +10,7 @@
#include "GLContextProvider.h"
namespace mozilla {
namespace gl {
namespace mozilla::gl {
using namespace mozilla::gfx;
using namespace mozilla::widget;
@ -81,5 +80,4 @@ void GLContextProviderWayland::Shutdown() {
}
}
} /* namespace gl */
} /* namespace mozilla */
} // namespace mozilla::gl

Просмотреть файл

@ -34,8 +34,7 @@
# include "SharedSurfaceGLX.h"
#endif
namespace mozilla {
namespace gl {
namespace mozilla::gl {
using gfx::SurfaceFormat;
@ -770,5 +769,4 @@ void ReadBuffer::SetReadBuffer(GLenum userMode) const {
mGL->fReadBuffer(internalMode);
}
} /* namespace gl */
} /* namespace mozilla */
} // namespace mozilla::gl

Просмотреть файл

@ -16,8 +16,7 @@
#include "mozilla/layers/TextureForwarder.h"
#include "mozilla/X11Util.h"
namespace mozilla {
namespace gl {
namespace mozilla::gl {
/* static */
UniquePtr<SharedSurface_GLXDrawable> SharedSurface_GLXDrawable::Create(
@ -119,5 +118,4 @@ UniquePtr<SharedSurface> SurfaceFactory_GLXDrawable::CreateShared(
mAllocator->IsSameProcess());
}
} // namespace gl
} // namespace mozilla
} // namespace mozilla::gl

Просмотреть файл

@ -73,8 +73,7 @@
# include "mozilla/SandboxTestingChild.h"
#endif
namespace mozilla {
namespace gfx {
namespace mozilla::gfx {
using namespace ipc;
using namespace layers;
@ -587,5 +586,4 @@ void GPUParent::ActorDestroy(ActorDestroyReason aWhy) {
XRE_ShutdownChildProcess();
}
} // namespace gfx
} // namespace mozilla
} // namespace mozilla::gfx

Просмотреть файл

@ -40,8 +40,7 @@
# include "mozilla/layers/D3D11YCbCrImage.h"
#endif
namespace mozilla {
namespace layers {
namespace mozilla::layers {
using namespace mozilla::gfx;
using namespace mozilla::ipc;
@ -800,5 +799,4 @@ ImageContainer::ProducerID ImageContainer::AllocateProducerID() {
return ++sProducerID;
}
} // namespace layers
} // namespace mozilla
} // namespace mozilla::layers

Просмотреть файл

@ -20,8 +20,7 @@
using namespace mozilla::gfx;
namespace mozilla {
namespace layers {
namespace mozilla::layers {
class BasicImageLayer : public ImageLayer, public BasicImplData {
public:
@ -106,5 +105,4 @@ already_AddRefed<ImageLayer> BasicLayerManager::CreateImageLayer() {
return layer.forget();
}
} // namespace layers
} // namespace mozilla
} // namespace mozilla::layers

Просмотреть файл

@ -22,8 +22,7 @@
using namespace mozilla;
using namespace mozilla::gfx;
namespace mozilla {
namespace layers {
namespace mozilla::layers {
X11TextureData::X11TextureData(gfx::IntSize aSize, gfx::SurfaceFormat aFormat,
bool aClientDeallocation, bool aIsCrossProcess,
@ -137,5 +136,4 @@ X11TextureData* X11TextureData::Create(gfx::IntSize aSize,
return texture;
}
} // namespace layers
} // namespace mozilla
} // namespace mozilla::layers

Просмотреть файл

@ -8,8 +8,7 @@
#include "gfxXlibSurface.h"
#include "gfx2DGlue.h"
namespace mozilla {
namespace layers {
namespace mozilla::layers {
using namespace mozilla::gfx;
@ -46,5 +45,4 @@ SurfaceFormat X11TextureSourceBasic::ContentTypeToSurfaceFormat(
}
}
} // namespace layers
} // namespace mozilla
} // namespace mozilla::layers

Просмотреть файл

@ -70,8 +70,7 @@
} while (0)
#endif
namespace mozilla {
namespace layers {
namespace mozilla::layers {
using namespace mozilla::ipc;
using namespace mozilla::gl;
@ -1907,5 +1906,4 @@ bool MappedYCbCrChannelData::CopyInto(MappedYCbCrChannelData& aDst) {
return true;
}
} // namespace layers
} // namespace mozilla
} // namespace mozilla::layers

Просмотреть файл

@ -14,8 +14,7 @@
#include "gfxPlatform.h"
#include "gfxXlibSurface.h"
namespace mozilla {
namespace layers {
namespace mozilla::layers {
using namespace mozilla::gfx;
@ -101,5 +100,4 @@ already_AddRefed<gfx::DataSourceSurface> X11TextureHost::GetAsSurface() {
return surf->GetDataSurface();
}
} // namespace layers
} // namespace mozilla
} // namespace mozilla::layers

Просмотреть файл

@ -8,8 +8,7 @@
#include "mozilla/widget/WaylandDMABufSurface.h"
#include "gfxPlatform.h"
namespace mozilla {
namespace layers {
namespace mozilla::layers {
using namespace gfx;
@ -103,5 +102,4 @@ bool WaylandDMABUFTextureData::UpdateFromSurface(gfx::SourceSurface* aSurface) {
return true;
}
} // namespace layers
} // namespace mozilla
} // namespace mozilla::layers

Просмотреть файл

@ -11,8 +11,7 @@
#include "mozilla/webrender/WebRenderAPI.h"
#include "GLContextEGL.h"
namespace mozilla {
namespace layers {
namespace mozilla::layers {
WaylandDMABUFTextureHostOGL::WaylandDMABUFTextureHostOGL(
TextureFlags aFlags, const SurfaceDescriptor& aDesc)
@ -135,5 +134,4 @@ void WaylandDMABUFTextureHostOGL::PushDisplayItems(
!(mFlags & TextureFlags::NON_PREMULTIPLIED));
}
} // namespace layers
} // namespace mozilla
} // namespace mozilla::layers

Просмотреть файл

@ -9,8 +9,7 @@
#include "gfx2DGlue.h"
#include "GLContext.h"
namespace mozilla {
namespace layers {
namespace mozilla::layers {
using namespace mozilla::gfx;
@ -87,5 +86,4 @@ SurfaceFormat X11TextureSourceOGL::ContentTypeToSurfaceFormat(
}
}
} // namespace layers
} // namespace mozilla
} // namespace mozilla::layers

Просмотреть файл

@ -15,8 +15,7 @@
# include "mozilla/layers/TextureHostOGL.h"
#endif
namespace mozilla {
namespace layers {
namespace mozilla::layers {
WebRenderTextureHost::WebRenderTextureHost(
const SurfaceDescriptor& aDesc, TextureFlags aFlags, TextureHost* aTexture,
@ -230,5 +229,4 @@ bool WebRenderTextureHost::NeedsYFlip() const {
return yFlip;
}
} // namespace layers
} // namespace mozilla
} // namespace mozilla::layers

Просмотреть файл

@ -23,8 +23,7 @@
// RFC: https://tools.ietf.org/html/rfc2911#section-4.1.2
#define IPP_JOB_NAME_LIMIT_LENGTH 255
namespace mozilla {
namespace gfx {
namespace mozilla::gfx {
PrintTarget::PrintTarget(cairo_surface_t* aCairoSurface, const IntSize& aSize)
: mCairoSurface(aCairoSurface),
@ -202,5 +201,4 @@ void PrintTarget::RegisterPageDoneCallback(PageDoneCallback&& aCallback) {
void PrintTarget::UnregisterPageDoneCallback() { mPageDoneCallback = nullptr; }
} // namespace gfx
} // namespace mozilla
} // namespace mozilla::gfx

Просмотреть файл

@ -8,8 +8,7 @@
#include "cairo.h"
#include "cairo-pdf.h"
namespace mozilla {
namespace gfx {
namespace mozilla::gfx {
static cairo_status_t write_func(void* closure, const unsigned char* data,
unsigned int length) {
@ -69,5 +68,4 @@ void PrintTargetPDF::Finish() {
mStream->Close();
}
} // namespace gfx
} // namespace mozilla
} // namespace mozilla::gfx

Просмотреть файл

@ -8,8 +8,7 @@
#include "cairo.h"
#include "cairo-ps.h"
namespace mozilla {
namespace gfx {
namespace mozilla::gfx {
static cairo_status_t write_func(void* closure, const unsigned char* data,
unsigned int length) {
@ -94,5 +93,4 @@ void PrintTargetPS::Finish() {
mStream->Close();
}
} // namespace gfx
} // namespace mozilla
} // namespace mozilla::gfx

Просмотреть файл

@ -9,8 +9,7 @@
#include "nsString.h"
#include <vector>
namespace mozilla {
namespace gfx {
namespace mozilla::gfx {
PrintTargetSkPDF::PrintTargetSkPDF(const IntSize& aSize,
UniquePtr<SkWStream> aStream)
@ -124,5 +123,4 @@ already_AddRefed<DrawTarget> PrintTargetSkPDF::GetReferenceDrawTarget() {
return do_AddRef(mRefDT);
}
} // namespace gfx
} // namespace mozilla
} // namespace mozilla::gfx

Просмотреть файл

@ -9,8 +9,7 @@
#include "gfxPlatform.h"
#include "mozilla/gfx/Logging.h"
namespace mozilla {
namespace gfx {
namespace mozilla::gfx {
/* static */
already_AddRefed<PrintTargetThebes> PrintTargetThebes::CreateOrNull(
@ -96,5 +95,4 @@ nsresult PrintTargetThebes::EndPage() {
void PrintTargetThebes::Finish() { return mGfxSurface->Finish(); }
} // namespace gfx
} // namespace mozilla
} // namespace mozilla::gfx

Просмотреть файл

@ -48,8 +48,7 @@ using namespace mozilla::gfx;
using namespace mozilla::layers;
using namespace mozilla::gl;
namespace mozilla {
namespace gfx {
namespace mozilla::gfx {
/**
* When VR content is active, we run the tasks at 1ms
@ -1531,5 +1530,4 @@ VRManager::Observe(nsISupports* subject, const char* topic,
NS_IMPL_ISUPPORTS(VRManager, nsIObserver)
} // namespace gfx
} // namespace mozilla
} // namespace mozilla::gfx

Просмотреть файл

@ -8,8 +8,7 @@
#include "prthread.h"
#include "mozilla/ClearOnShutdown.h"
namespace mozilla {
namespace gfx {
namespace mozilla::gfx {
static StaticRefPtr<VRPuppetCommandBuffer> sVRPuppetCommandBufferSingleton;
@ -508,5 +507,4 @@ void VRPuppetCommandBuffer::EncodeStruct(nsTArray<uint64_t>& aBuffer,
purgeBuffer();
}
} // namespace gfx
} // namespace mozilla
} // namespace mozilla::gfx

Просмотреть файл

@ -16,8 +16,7 @@
#include "mozilla/dom/HTMLCanvasElement.h"
#include "mozilla/layers/SyncObject.h" // for SyncObjectClient
namespace mozilla {
namespace gfx {
namespace mozilla::gfx {
VRLayerChild::VRLayerChild()
: mCanvasElement(nullptr), mIPCOpen(false), mLastSubmittedFrameId(0) {
@ -140,5 +139,4 @@ void VRLayerChild::ReleaseIPDLReference() {
Release();
}
} // namespace gfx
} // namespace mozilla
} // namespace mozilla::gfx

Просмотреть файл

@ -51,8 +51,7 @@ const uint32_t kVRHapticUpdateInterval = 5;
using namespace mozilla::gfx;
namespace mozilla {
namespace gfx {
namespace mozilla::gfx {
namespace {
@ -2364,5 +2363,4 @@ void OpenVRSession::UpdateTelemetry(VRSystemState& aSystemState) {
aSystemState.displayState.droppedFrameCount = stats.m_nNumReprojectedFrames;
}
} // namespace gfx
} // namespace mozilla
} // namespace mozilla::gfx

Просмотреть файл

@ -19,8 +19,7 @@
using namespace mozilla::gfx;
namespace mozilla {
namespace gfx {
namespace mozilla::gfx {
PuppetSession::PuppetSession() : VRSession() {}
@ -116,5 +115,4 @@ void PuppetSession::StopAllHaptics() {
VRPuppetCommandBuffer::Get().StopAllHaptics();
}
} // namespace gfx
} // namespace mozilla
} // namespace mozilla::gfx

Просмотреть файл

@ -26,8 +26,7 @@
# include <android/native_window_jni.h>
#endif
namespace mozilla {
namespace wr {
namespace mozilla::wr {
/* static */
UniquePtr<RenderCompositor> RenderCompositorEGL::Create(
@ -120,7 +119,7 @@ bool RenderCompositorEGL::Resume() {
EGLNativeWindowType window = mWidget->AsAndroid()->GetEGLNativeWindow();
JNIEnv* const env = jni::GetEnvForThread();
ANativeWindow* const nativeWindow =
ANativeWindow_fromSurface(env, reinterpret_cast<jobject>(window));
ANativeWindow_fromSurface(env, reinterpret_cast<jobject>(window));
const int32_t width = ANativeWindow_getWidth(nativeWindow);
const int32_t height = ANativeWindow_getHeight(nativeWindow);
mEGLSurfaceSize = LayoutDeviceIntSize(width, height);
@ -176,5 +175,4 @@ LayoutDeviceIntSize RenderCompositorEGL::GetBufferSize() {
#endif
}
} // namespace wr
} // namespace mozilla
} // namespace mozilla::wr

Просмотреть файл

@ -10,8 +10,7 @@
#include "mozilla/gfx/Logging.h"
#include "ScopedGLHelpers.h"
namespace mozilla {
namespace wr {
namespace mozilla::wr {
RenderWaylandDMABUFTextureHostOGL::RenderWaylandDMABUFTextureHostOGL(
WaylandDMABufSurface* aSurface)
@ -91,5 +90,4 @@ void RenderWaylandDMABUFTextureHostOGL::DeleteTextureHandle() {
}
}
} // namespace wr
} // namespace mozilla
} // namespace mozilla::wr

Просмотреть файл

@ -51,8 +51,7 @@ using namespace mozilla::dom;
} \
} while (0)
namespace mozilla {
namespace hal {
namespace mozilla::hal {
static bool sInitialized = false;
@ -480,5 +479,4 @@ void Shutdown() {
sInitialized = false;
}
} // namespace hal
} // namespace mozilla
} // namespace mozilla::hal

Просмотреть файл

@ -80,8 +80,7 @@ class TestChild final : public mozilla::ipc::PBackgroundTestChild {
} // namespace
namespace mozilla {
namespace ipc {
namespace mozilla::ipc {
using mozilla::dom::UDPSocketChild;
using mozilla::net::PUDPSocketChild;
@ -757,8 +756,7 @@ PFileDescriptorSetChild* BackgroundChildImpl::SendPFileDescriptorSetConstructor(
return PBackgroundChild::SendPFileDescriptorSetConstructor(aFD);
}
} // namespace ipc
} // namespace mozilla
} // namespace mozilla::ipc
mozilla::ipc::IPCResult TestChild::Recv__delete__(const nsCString& aTestArg) {
MOZ_RELEASE_ASSERT(aTestArg == mTestArg,

Просмотреть файл

@ -112,8 +112,7 @@ class TestParent final : public mozilla::ipc::PBackgroundTestParent {
} // namespace
namespace mozilla {
namespace ipc {
namespace mozilla::ipc {
using mozilla::dom::BroadcastChannelParent;
using mozilla::dom::ContentParent;
@ -1305,8 +1304,7 @@ BackgroundParentImpl::SendPFileDescriptorSetConstructor(
return PBackgroundParent::SendPFileDescriptorSetConstructor(aFD);
}
} // namespace ipc
} // namespace mozilla
} // namespace mozilla::ipc
void TestParent::ActorDestroy(ActorDestroyReason aWhy) {
mozilla::ipc::AssertIsInMainOrSocketProcess();

Просмотреть файл

@ -6,8 +6,7 @@
#include "FileDescriptorSetChild.h"
namespace mozilla {
namespace ipc {
namespace mozilla::ipc {
FileDescriptorSetChild::FileDescriptorSetChild(
const FileDescriptor& aFileDescriptor) {
@ -30,5 +29,4 @@ mozilla::ipc::IPCResult FileDescriptorSetChild::RecvAddFileDescriptor(
return IPC_OK();
}
} // namespace ipc
} // namespace mozilla
} // namespace mozilla::ipc

Просмотреть файл

@ -6,8 +6,7 @@
#include "FileDescriptorSetParent.h"
namespace mozilla {
namespace ipc {
namespace mozilla::ipc {
FileDescriptorSetParent::FileDescriptorSetParent(
const FileDescriptor& aFileDescriptor) {
@ -32,5 +31,4 @@ mozilla::ipc::IPCResult FileDescriptorSetParent::RecvAddFileDescriptor(
return IPC_OK();
}
} // namespace ipc
} // namespace mozilla
} // namespace mozilla::ipc

Просмотреть файл

@ -21,8 +21,7 @@
} \
}
namespace mozilla {
namespace jsdebugger {
namespace mozilla::jsdebugger {
NS_IMPL_ISUPPORTS(JSDebugger, IJSDebugger)
@ -69,5 +68,4 @@ JSDebugger::AddClass(JS::Handle<JS::Value> global, JSContext* cx) {
return NS_OK;
}
} // namespace jsdebugger
} // namespace mozilla
} // namespace mozilla::jsdebugger

Просмотреть файл

@ -64,8 +64,7 @@ using mozilla::IsAsciiDigit;
using JS::AutoCheckCannotGC;
using JS::AutoStableStringChars;
namespace js {
namespace ctypes {
namespace js::ctypes {
static bool HasUnpairedSurrogate(const char16_t* chars, size_t nchars,
char16_t* unpaired) {
@ -2319,8 +2318,7 @@ static bool GetObjectProperty(JSContext* cx, HandleObject obj,
return true;
}
} /* namespace ctypes */
} /* namespace js */
} // namespace js::ctypes
using namespace js;
using namespace js::ctypes;

Просмотреть файл

@ -17,8 +17,7 @@
using JS::AutoStableStringChars;
namespace js {
namespace ctypes {
namespace js::ctypes {
/*******************************************************************************
** JSAPI function prototypes
@ -403,5 +402,4 @@ bool Library::Declare(JSContext* cx, unsigned argc, Value* vp) {
return true;
}
} // namespace ctypes
} // namespace js
} // namespace js::ctypes

Просмотреть файл

@ -33,8 +33,7 @@
using JS::RegExpFlag;
using JS::RegExpFlags;
namespace js {
namespace frontend {
namespace js::frontend {
// Compare a bunch of `uint8_t` values (as returned by the tokenizer_) with
// a string literal (and ONLY a string literal).
@ -5036,5 +5035,4 @@ JS::Result<ParseNode*> BinASTParser<Tok>::parseOptionalStatement(
template class BinASTParser<BinASTTokenReaderContext>;
template class BinASTParser<BinASTTokenReaderMultipart>;
} // namespace frontend
} // namespace js
} // namespace js::frontend

Просмотреть файл

@ -8,13 +8,11 @@
#include "vm/JSContext-inl.h"
namespace js {
namespace frontend {
namespace js::frontend {
BinASTParserBase::BinASTParserBase(JSContext* cx, ParseInfo& parseInfo,
HandleScriptSourceObject sourceObject)
: ParserSharedBase(cx, parseInfo, sourceObject,
ParserSharedBase::Kind::BinASTParser) {}
} // namespace frontend
} // namespace js
} // namespace js::frontend

Просмотреть файл

@ -74,8 +74,7 @@
//
// They should be treated lazily (whenever we open a subscope), like bindings.
namespace js {
namespace frontend {
namespace js::frontend {
using UsedNamePtr = UsedNameTracker::UsedNameMap::Ptr;
@ -811,5 +810,4 @@ BinASTParserPerTokenizer<Tok>::asFinalParser() const {
template class BinASTParserPerTokenizer<BinASTTokenReaderContext>;
template class BinASTParserPerTokenizer<BinASTTokenReaderMultipart>;
} // namespace frontend
} // namespace js
} // namespace js::frontend

Просмотреть файл

@ -12,8 +12,7 @@
#include "js/Utility.h" // js_malloc
#include "vm/StringType.h" // JSAtom
namespace js {
namespace frontend {
namespace js::frontend {
BinASTSourceMetadata::~BinASTSourceMetadata() {
if (isMultipart()) {
@ -111,6 +110,4 @@ void BinASTSourceMetadataContext::release() {
}
}
} // namespace frontend
} // namespace js
} // namespace js::frontend

Просмотреть файл

@ -9,8 +9,7 @@
#include "frontend/BinAST-macros.h"
#include "js/Result.h"
namespace js {
namespace frontend {
namespace js::frontend {
template <typename T>
using ErrorResult = mozilla::GenericErrorResult<T>;
@ -105,5 +104,4 @@ JS::Result<uint8_t> BinASTTokenReaderBase::readByte() {
return *current_++;
}
} // namespace frontend
} // namespace js
} // namespace js::frontend

Просмотреть файл

@ -26,8 +26,7 @@
#include "vm/JSAtom.h" // AtomizeWTF8Chars
#include "vm/JSScript.h" // ScriptSource
namespace js {
namespace frontend {
namespace js::frontend {
#ifdef BINAST_CX_MAGIC_HEADER // Context 0.1 doesn't implement the planned
// magic header.
@ -3269,6 +3268,4 @@ mozilla::detail::IntegerRange<size_t> HuffmanLookup::suffixes(
return mozilla::IntegerRange<size_t>(first, last + 1);
}
} // namespace frontend
} // namespace js
} // namespace js::frontend

Просмотреть файл

@ -20,8 +20,7 @@
#include "js/Result.h"
namespace js {
namespace frontend {
namespace js::frontend {
// The magic header, at the start of every binjs file.
const char MAGIC_HEADER[] = "BINJS";
@ -474,6 +473,4 @@ JS::Result<Ok> BinASTTokenReaderMultipart::AutoTaggedTuple::done() {
return Ok();
}
} // namespace frontend
} // namespace js
} // namespace js::frontend

Просмотреть файл

@ -79,8 +79,7 @@ using JS::AutoGCRooter;
using JS::ReadOnlyCompileOptions;
using JS::RegExpFlags;
namespace js {
namespace frontend {
namespace js::frontend {
using DeclaredNamePtr = ParseContext::Scope::DeclaredNamePtr;
using AddDeclaredNamePtr = ParseContext::Scope::AddDeclaredNamePtr;
@ -10875,5 +10874,4 @@ template class Parser<SyntaxParseHandler, Utf8Unit>;
template class Parser<FullParseHandler, char16_t>;
template class Parser<SyntaxParseHandler, char16_t>;
} /* namespace frontend */
} /* namespace js */
} // namespace js::frontend

Просмотреть файл

@ -15,8 +15,7 @@
#include "vm/Realm.h"
#include "vm/Shape.h"
namespace js {
namespace vtune {
namespace js::vtune {
// VTune internals are not known to be threadsafe.
static Mutex* VTuneMutex = nullptr;
@ -161,5 +160,4 @@ void UnmarkBytes(void* bytes, unsigned size) {
if (ok != 1) printf("[!] VTune Integration: Failed to unload method.\n");
}
} // namespace vtune
} // namespace js
} // namespace js::vtune

Просмотреть файл

@ -10,8 +10,7 @@
#include "mozilla/VsyncDispatcher.h"
#include "nsThreadUtils.h"
namespace mozilla {
namespace layout {
namespace mozilla::layout {
VsyncChild::VsyncChild()
: mObservingVsync(false),
@ -91,5 +90,4 @@ mozilla::ipc::IPCResult VsyncChild::RecvVsyncRate(const float& aVsyncRate) {
return IPC_OK();
}
} // namespace layout
} // namespace mozilla
} // namespace mozilla::layout

Просмотреть файл

@ -15,8 +15,7 @@
#include "nr_socket_proxy_config.h"
namespace mozilla {
namespace net {
namespace mozilla::net {
using std::shared_ptr;
@ -122,5 +121,4 @@ void WebrtcTCPSocketWrapper::OnConnected(const nsCString& aProxyType) {
&WebrtcTCPSocketCallback::OnConnected, aProxyType)));
}
} // namespace net
} // namespace mozilla
} // namespace mozilla::net

Просмотреть файл

@ -22,8 +22,7 @@
# include <dlfcn.h>
#endif
namespace mozilla {
namespace recordreplay {
namespace mozilla::recordreplay {
// clang-format off
#define FOR_EACH_INTERFACE(Macro) \
@ -180,5 +179,4 @@ bool gIsMiddleman;
#undef ENABLE_RECORD_REPLAY
} // namespace recordreplay
} // namespace mozilla
} // namespace mozilla::recordreplay

Просмотреть файл

@ -17,8 +17,7 @@
#include "NetworkInfoServiceImpl.h"
namespace mozilla {
namespace net {
namespace mozilla::net {
static nsresult ListInterfaceAddresses(int aFd, const char* aIface,
AddrMapType& aAddrMap);
@ -94,5 +93,4 @@ static nsresult ListInterfaceAddresses(int aFd, const char* aInterface,
return NS_OK;
}
} // namespace net
} // namespace mozilla
} // namespace mozilla::net

Просмотреть файл

@ -19,8 +19,7 @@
# error "Unsupported platform for nsNetworkInfoService! Check moz.build"
#endif
namespace mozilla {
namespace net {
namespace mozilla::net {
NS_IMPL_ISUPPORTS(nsNetworkInfoService, nsINetworkInfoService)
@ -93,5 +92,4 @@ nsresult nsNetworkInfoService::GetHostname(nsIGetHostnameListener* aListener) {
return NS_OK;
}
} // namespace net
} // namespace mozilla
} // namespace mozilla::net

Просмотреть файл

@ -81,8 +81,7 @@ nsresult nsCacheServiceConstructor(nsISupports* aOuter, const nsIID& aIID,
#include "WebSocketChannel.h"
#include "WebSocketChannelChild.h"
namespace mozilla {
namespace net {
namespace mozilla::net {
static BaseWebSocketChannel* WebSocketChannelConstructor(bool aSecure) {
if (IsNeckoChild()) {
return new WebSocketChannelChild(aSecure);
@ -113,8 +112,7 @@ static BaseWebSocketChannel* WebSocketChannelConstructor(bool aSecure) {
WEB_SOCKET_HANDLER_CONSTRUCTOR(WebSocketChannel, false)
WEB_SOCKET_HANDLER_CONSTRUCTOR(WebSocketSSLChannel, true)
#undef WEB_SOCKET_HANDLER_CONSTRUCTOR
} // namespace net
} // namespace mozilla
} // namespace mozilla::net
///////////////////////////////////////////////////////////////////////////////

Просмотреть файл

@ -19,8 +19,7 @@
#include "nsServiceManagerUtils.h"
#include "nsThreadUtils.h"
namespace mozilla {
namespace net {
namespace mozilla::net {
AppCacheStorage::AppCacheStorage(nsILoadContextInfo* aInfo,
nsIApplicationCache* aAppCache)
@ -168,5 +167,4 @@ NS_IMETHODIMP AppCacheStorage::GetCacheIndexEntryAttrs(
return NS_ERROR_NOT_IMPLEMENTED;
}
} // namespace net
} // namespace mozilla
} // namespace mozilla::net

Просмотреть файл

@ -19,8 +19,7 @@
#include "nsNetUtil.h"
#include "nsServiceManagerUtils.h"
namespace mozilla {
namespace net {
namespace mozilla::net {
NS_IMPL_ISUPPORTS(CacheStorage, nsICacheStorage)
@ -251,5 +250,4 @@ nsresult CacheStorage::ChooseApplicationCache(nsIURI* aURI,
return NS_OK;
}
} // namespace net
} // namespace mozilla
} // namespace mozilla::net

Просмотреть файл

@ -82,8 +82,7 @@ static_assert(
//----------------------------------------------------------------------------
namespace mozilla {
namespace net {
namespace mozilla::net {
LazyLogModule gHostResolverLog("nsHostResolver");
#define LOG(args) \
MOZ_LOG(mozilla::net::gHostResolverLog, mozilla::LogLevel::Debug, args)
@ -91,8 +90,7 @@ LazyLogModule gHostResolverLog("nsHostResolver");
MOZ_LOG(mozilla::net::gHostResolverLog, mozilla::LogLevel::Error, args)
#define LOG_ENABLED() \
MOZ_LOG_TEST(mozilla::net::gHostResolverLog, mozilla::LogLevel::Debug)
} // namespace net
} // namespace mozilla
} // namespace mozilla::net
//----------------------------------------------------------------------------

Просмотреть файл

@ -37,8 +37,7 @@
#include "nsIProxiedChannel.h"
#include "nsIProxyInfo.h"
namespace mozilla {
namespace net {
namespace mozilla::net {
#define SUBRESOURCE_AUTH_DIALOG_DISALLOW_ALL 0
#define SUBRESOURCE_AUTH_DIALOG_DISALLOW_CROSS_ORIGIN 1
@ -1664,5 +1663,4 @@ NS_IMPL_ISUPPORTS(nsHttpChannelAuthProvider, nsICancelable,
nsIHttpChannelAuthProvider, nsIAuthPromptCallback,
nsIHttpAuthenticatorCallback)
} // namespace net
} // namespace mozilla
} // namespace mozilla::net

Просмотреть файл

@ -132,8 +132,7 @@
using mozilla::dom::Promise;
namespace mozilla {
namespace net {
namespace mozilla::net {
LazyLogModule gHttpLog("nsHttp");
@ -294,8 +293,7 @@ nsHttpHandler::nsHttpHandler()
mNextChannelId(1),
mLastActiveTabLoadOptimizationLock(
"nsHttpConnectionMgr::LastActiveTabLoadOptimization"),
mSpdyBlacklistLock(
"nsHttpHandler::SpdyBlacklist"),
mSpdyBlacklistLock("nsHttpHandler::SpdyBlacklist"),
mThroughCaptivePortal(false) {
LOG(("Creating nsHttpHandler [this=%p].\n", this));
@ -2725,5 +2723,4 @@ nsresult nsHttpHandler::CancelTransaction(HttpTransactionShell* trans,
return mConnMgr->CancelTransaction(trans, reason);
}
} // namespace net
} // namespace mozilla
} // namespace mozilla::net

Просмотреть файл

@ -35,8 +35,7 @@
/* a shorter name that better explains what it does */
#define EINTR_RETRY(x) MOZ_TEMP_FAILURE_RETRY(x)
namespace mozilla {
namespace net {
namespace mozilla::net {
// period during which to absorb subsequent network change events, in
// milliseconds
@ -1799,5 +1798,4 @@ void NetlinkService::GetIsLinkUp(bool* aIsUp) {
*aIsUp = mLinkUp;
}
} // namespace net
} // namespace mozilla
} // namespace mozilla::net

Просмотреть файл

@ -15,8 +15,7 @@
#include "mozStorageBindingParamsArray.h"
#include "Variant.h"
namespace mozilla {
namespace storage {
namespace mozilla::storage {
////////////////////////////////////////////////////////////////////////////////
//// Local Helper Objects
@ -432,5 +431,4 @@ BindingParams::BindAdoptedBlobByIndex(uint32_t aIndex, uint8_t* aValue,
return BindByIndex(aIndex, value);
}
} // namespace storage
} // namespace mozilla
} // namespace mozilla::storage

Просмотреть файл

@ -70,8 +70,7 @@ mozilla::LazyLogModule gStorageLog("mozStorage");
} while (0)
#endif
namespace mozilla {
namespace storage {
namespace mozilla::storage {
using mozilla::dom::quota::QuotaObject;
@ -2279,5 +2278,4 @@ Connection::GetQuotaObjects(QuotaObject** aDatabaseQuotaObject,
return NS_OK;
}
} // namespace storage
} // namespace mozilla
} // namespace mozilla::storage

Просмотреть файл

@ -14,8 +14,7 @@
#include "nsZipArchive.h"
#include "xpc_make_class.h"
namespace mozilla {
namespace ctypes {
namespace mozilla::ctypes {
static char* UnicodeToNative(JSContext* cx, const char16_t* source,
size_t slen) {
@ -98,5 +97,4 @@ Module::Call(nsIXPConnectWrappedNative* wrapper, JSContext* cx, JSObject* obj,
return NS_OK;
}
} // namespace ctypes
} // namespace mozilla
} // namespace mozilla::ctypes

Просмотреть файл

@ -10,8 +10,7 @@
#include "nsNativeCharsetUtils.h"
#include "xpc_make_class.h"
namespace mozilla {
namespace reflect {
namespace mozilla::reflect {
NS_IMPL_ISUPPORTS(Module, nsIXPCScriptable)
@ -35,5 +34,4 @@ Module::Call(nsIXPConnectWrappedNative* wrapper, JSContext* cx, JSObject* obj,
return NS_OK;
}
} // namespace reflect
} // namespace mozilla
} // namespace mozilla::reflect

Просмотреть файл

@ -49,8 +49,7 @@ static void LogError(JSContext* aCx, const nsCString& aMessage) {
}
}
namespace mozilla {
namespace telemetry {
namespace mozilla::telemetry {
class Timer final {
public:
@ -428,5 +427,4 @@ void Stopwatch::SetTestModeEnabled(const dom::GlobalObject& aGlobal,
Timers::Singleton().SuppressErrors() = aTesting;
}
} // namespace telemetry
} // namespace mozilla
} // namespace mozilla::telemetry

Просмотреть файл

@ -1194,11 +1194,11 @@ static void internal_initFogotype(bool aUseTelemetry) {
NS_WARNING("Couldn't find pingsender. Bailing on FOGotype");
return;
}
#ifdef XP_WIN
# ifdef XP_WIN
pingsender->Append(NS_LITERAL_STRING("pingsender.exe"));
#else
# else
pingsender->Append(NS_LITERAL_STRING("pingsender"));
#endif
# endif
nsAutoString pingsenderPath;
rv = pingsender->GetPath(pingsenderPath);
if (NS_FAILED(rv)) {
@ -1986,8 +1986,7 @@ void RecordShutdownEndTimeStamp() {
// EXTERNALLY VISIBLE FUNCTIONS in mozilla::Telemetry::
// These are listed in Telemetry.h
namespace mozilla {
namespace Telemetry {
namespace mozilla::Telemetry {
// The external API for controlling recording state
void SetHistogramRecordingEnabled(HistogramID aID, bool aEnabled) {
@ -2207,8 +2206,7 @@ void RecordOrigin(mozilla::Telemetry::OriginMetricID aId,
void ShutdownTelemetry() { TelemetryImpl::ShutdownTelemetry(); }
} // namespace Telemetry
} // namespace mozilla
} // namespace mozilla::Telemetry
NS_IMPL_COMPONENT_FACTORY(nsITelemetry) {
return TelemetryImpl::CreateTelemetryInstance().downcast<nsISupports>();

Просмотреть файл

@ -18,9 +18,7 @@
#include "TelemetryProcessData.h"
#include "Telemetry.h"
namespace mozilla {
namespace Telemetry {
namespace Common {
namespace mozilla::Telemetry::Common {
bool IsExpiredVersion(const char* aExpiration) {
MOZ_ASSERT(aExpiration);
@ -199,6 +197,4 @@ SupportedProduct GetCurrentProduct() {
#endif
}
} // namespace Common
} // namespace Telemetry
} // namespace mozilla
} // namespace mozilla::Telemetry::Common

Просмотреть файл

@ -10,8 +10,7 @@
#include "js/Array.h" // JS::NewArrayObject
#include "mozilla/HangAnnotations.h"
namespace mozilla {
namespace Telemetry {
namespace mozilla::Telemetry {
// The maximum number of chrome hangs stacks that we're keeping.
const size_t kMaxChromeStacksKept = 50;
@ -225,5 +224,4 @@ JSObject* CreateJSStackObject(JSContext* cx, const CombinedStacks& stacks) {
return ret;
}
} // namespace Telemetry
} // namespace mozilla
} // namespace mozilla::Telemetry

Просмотреть файл

@ -57,8 +57,7 @@ bool IsKeyValid(const nsACString& aKey) {
} // anonymous namespace
namespace mozilla {
namespace Telemetry {
namespace mozilla::Telemetry {
void KeyedStackCapturer::Capture(const nsACString& aKey) {
MutexAutoLock captureStackMutex(mStackCapturerMutex);
@ -162,5 +161,4 @@ size_t KeyedStackCapturer::SizeOfExcludingThis(
return n;
}
} // namespace Telemetry
} // namespace mozilla
} // namespace mozilla::Telemetry

Просмотреть файл

@ -26,8 +26,7 @@ static bool CompareByIndex(const StackFrame& a, const StackFrame& b) {
} // namespace
namespace mozilla {
namespace Telemetry {
namespace mozilla::Telemetry {
const size_t kMaxChromeStackDepth = 50;
@ -186,5 +185,4 @@ ProcessedStack BatchProcessedStackGenerator::GetStackAndModules(
#endif
}
} // namespace Telemetry
} // namespace mozilla
} // namespace mozilla::Telemetry

Просмотреть файл

@ -8,8 +8,7 @@
#include "core/TelemetryCommon.h"
#include "js/Array.h" // JS::NewArrayObject
namespace mozilla {
namespace Telemetry {
namespace mozilla::Telemetry {
TelemetryIOInterposeObserver::TelemetryIOInterposeObserver(nsIFile* aXreDir)
: mCurStage(STAGE_STARTUP) {
@ -176,5 +175,4 @@ size_t TelemetryIOInterposeObserver::SizeOfExcludingThis(
return size;
}
} // namespace Telemetry
} // namespace mozilla
} // namespace mozilla::Telemetry

Просмотреть файл

@ -101,8 +101,7 @@ extern mozilla::LazyLogModule gUrlClassifierDbServiceLog;
#define LOG_ENABLED() \
MOZ_LOG_TEST(gUrlClassifierDbServiceLog, mozilla::LogLevel::Debug)
namespace mozilla {
namespace safebrowsing {
namespace mozilla::safebrowsing {
const uint32_t STORE_MAGIC = 0x1231af3b;
const uint32_t CURRENT_VERSION = 4;
@ -1178,5 +1177,4 @@ ChunkSet& HashStore::SubChunks() {
return mSubChunks;
}
} // namespace safebrowsing
} // namespace mozilla
} // namespace mozilla::safebrowsing

Просмотреть файл

@ -24,8 +24,7 @@ static mozilla::LazyLogModule gUrlClassifierPrefixSetLog(
#define LOG_ENABLED() \
MOZ_LOG_TEST(gUrlClassifierPrefixSetLog, mozilla::LogLevel::Debug)
namespace mozilla {
namespace safebrowsing {
namespace mozilla::safebrowsing {
#define PREFIX_SIZE_FIXED 4
@ -492,5 +491,4 @@ size_t VariableLengthPrefixSet::SizeOfIncludingThis(
return n;
}
} // namespace safebrowsing
} // namespace mozilla
} // namespace mozilla::safebrowsing

Просмотреть файл

@ -3634,16 +3634,14 @@ bool IsWaylandDisabled() {
}
#endif
namespace mozilla {
namespace startup {
namespace mozilla::startup {
Result<nsCOMPtr<nsIFile>, nsresult> GetIncompleteStartupFile(nsIFile* aProfLD) {
nsCOMPtr<nsIFile> crashFile;
MOZ_TRY(aProfLD->Clone(getter_AddRefs(crashFile)));
MOZ_TRY(crashFile->Append(FILE_STARTUP_INCOMPLETE));
return std::move(crashFile);
}
} // namespace startup
} // namespace mozilla
} // namespace mozilla::startup
// Check whether the last startup attempt resulted in a crash within the
// last 6 hours.

Просмотреть файл

@ -248,11 +248,9 @@ const char* XRE_ChildProcessTypeToAnnotation(GeckoProcessType aProcessType) {
}
}
namespace mozilla {
namespace startup {
namespace mozilla::startup {
GeckoProcessType sChildProcessType = GeckoProcessType_Default;
} // namespace startup
} // namespace mozilla
} // namespace mozilla::startup
#if defined(MOZ_WIDGET_ANDROID)
void XRE_SetAndroidChildFds(JNIEnv* env, const XRE_AndroidChildFds& fds) {

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше