diff --git a/devtools/shared/heapsnapshot/AutoMemMap.h b/devtools/shared/heapsnapshot/AutoMemMap.h index d0ffc4750e37..a70f57bb1228 100644 --- a/devtools/shared/heapsnapshot/AutoMemMap.h +++ b/devtools/shared/heapsnapshot/AutoMemMap.h @@ -33,7 +33,6 @@ namespace devtools { // } // // The memory is automatically unmapped when the AutoMemMap leaves scope. class MOZ_RAII AutoMemMap { - PRFileInfo64 fileInfo; PRFileDesc* fd; PRFileMap* fileMap; diff --git a/docshell/base/timeline/AutoGlobalTimelineMarker.h b/docshell/base/timeline/AutoGlobalTimelineMarker.h index 421e617e4aa5..02c37f0989c6 100644 --- a/docshell/base/timeline/AutoGlobalTimelineMarker.h +++ b/docshell/base/timeline/AutoGlobalTimelineMarker.h @@ -27,7 +27,6 @@ namespace mozilla { // ... // } class MOZ_RAII AutoGlobalTimelineMarker { - // The name of the marker we are adding. const char* mName; // Whether to capture the JS stack or not. diff --git a/docshell/base/timeline/AutoRestyleTimelineMarker.h b/docshell/base/timeline/AutoRestyleTimelineMarker.h index 3843ce13a6c6..1246e1a9bdb9 100644 --- a/docshell/base/timeline/AutoRestyleTimelineMarker.h +++ b/docshell/base/timeline/AutoRestyleTimelineMarker.h @@ -14,7 +14,6 @@ class nsIDocShell; namespace mozilla { class MOZ_RAII AutoRestyleTimelineMarker { - RefPtr mDocShell; bool mIsAnimationOnly; diff --git a/docshell/base/timeline/AutoTimelineMarker.h b/docshell/base/timeline/AutoTimelineMarker.h index 7711b2afbf5b..a86c741bb0ca 100644 --- a/docshell/base/timeline/AutoTimelineMarker.h +++ b/docshell/base/timeline/AutoTimelineMarker.h @@ -27,7 +27,6 @@ namespace mozilla { // ... // } class MOZ_RAII AutoTimelineMarker { - // The name of the marker we are adding. const char* mName; diff --git a/docshell/shistory/nsSHistory.h b/docshell/shistory/nsSHistory.h index 849332de0b08..0a103649cd92 100644 --- a/docshell/shistory/nsSHistory.h +++ b/docshell/shistory/nsSHistory.h @@ -231,7 +231,6 @@ class nsSHistory : public mozilla::LinkedListElement, nsISHEntry* aNewEntry); protected: - bool mHasOngoingUpdate; bool mIsRemote; nsTArray> mEntries; // entries are never null diff --git a/dom/base/Selection.h b/dom/base/Selection.h index 3e253ff154ec..c9f8db6c74db 100644 --- a/dom/base/Selection.h +++ b/dom/base/Selection.h @@ -917,6 +917,7 @@ class MOZ_STACK_CLASS SelectionBatcher final { class MOZ_RAII AutoHideSelectionChanges final { private: RefPtr mSelection; + public: explicit AutoHideSelectionChanges(const nsFrameSelection* aFrame); diff --git a/dom/base/nsGlobalWindowOuter.h b/dom/base/nsGlobalWindowOuter.h index 0074dfbf2bc9..008a78c284d5 100644 --- a/dom/base/nsGlobalWindowOuter.h +++ b/dom/base/nsGlobalWindowOuter.h @@ -397,7 +397,6 @@ class nsGlobalWindowOuter final : public mozilla::dom::EventTarget, ~TemporarilyDisableDialogs(); private: - // Always an inner window; this is the window whose dialog state we messed // with. We just want to keep it alive, because we plan to poke at its // members in our destructor. diff --git a/dom/base/nsImageLoadingContent.cpp b/dom/base/nsImageLoadingContent.cpp index b6abf04979a9..7fcb865b4cde 100644 --- a/dom/base/nsImageLoadingContent.cpp +++ b/dom/base/nsImageLoadingContent.cpp @@ -976,8 +976,8 @@ nsImageLoadingContent::LoadImageWithChannel(nsIChannel* aChannel, // Do the load. RefPtr& req = PrepareNextRequest(eImageLoadType_Normal); - nsresult rv = loader->LoadImageWithChannel(aChannel, this, doc, - aListener, getter_AddRefs(req)); + nsresult rv = loader->LoadImageWithChannel(aChannel, this, doc, aListener, + getter_AddRefs(req)); if (NS_SUCCEEDED(rv)) { CloneScriptedRequests(req); TrackImage(req); diff --git a/dom/bindings/TypedArray.h b/dom/bindings/TypedArray.h index aef7420f8476..0a319653ed36 100644 --- a/dom/bindings/TypedArray.h +++ b/dom/bindings/TypedArray.h @@ -12,9 +12,9 @@ #include "js/ArrayBuffer.h" #include "js/ArrayBufferMaybeShared.h" #include "js/experimental/TypedData.h" // js::Unwrap(Ui|I)nt(8|16|32)Array, js::Get(Ui|I)nt(8|16|32)ArrayLengthAndData, js::UnwrapUint8ClampedArray, js::GetUint8ClampedArrayLengthAndData, js::UnwrapFloat(32|64)Array, js::GetFloat(32|64)ArrayLengthAndData, JS_GetArrayBufferViewType -#include "js/GCAPI.h" // JS::AutoCheckCannotGC -#include "js/RootingAPI.h" // JS::Rooted -#include "js/ScalarType.h" // js::Scalar::Type +#include "js/GCAPI.h" // JS::AutoCheckCannotGC +#include "js/RootingAPI.h" // JS::Rooted +#include "js/ScalarType.h" // js::Scalar::Type #include "js/SharedArrayBuffer.h" #include "mozilla/Attributes.h" #include "mozilla/dom/BindingDeclarations.h" diff --git a/dom/canvas/WebGLChild.h b/dom/canvas/WebGLChild.h index 6ae77581a5d4..c2e17b5d963f 100644 --- a/dom/canvas/WebGLChild.h +++ b/dom/canvas/WebGLChild.h @@ -37,6 +37,7 @@ class WebGLChild final : public PWebGLChild, public SupportsWeakPtr { webgl::RaiiShmem mPendingCmdsShmem; size_t mPendingCmdsPos = 0; FlushedCmdInfo mFlushedCmdInfo; + public: NS_INLINE_DECL_THREADSAFE_REFCOUNTING(WebGLChild, override); using OtherSideActor = WebGLParent; diff --git a/dom/canvas/WebGLIpdl.h b/dom/canvas/WebGLIpdl.h index 6934c3e41101..3883a7aaac72 100644 --- a/dom/canvas/WebGLIpdl.h +++ b/dom/canvas/WebGLIpdl.h @@ -12,7 +12,8 @@ namespace mozilla { namespace webgl { -// TODO: This should probably replace Shmem, or at least this should move to ipc/glue. +// TODO: This should probably replace Shmem, or at least this should move to +// ipc/glue. class RaiiShmem final { RefPtr mWeakRef; mozilla::ipc::Shmem mShmem = {}; diff --git a/dom/canvas/WebGLParent.h b/dom/canvas/WebGLParent.h index d0d3127a01bc..c730c1bd26f4 100644 --- a/dom/canvas/WebGLParent.h +++ b/dom/canvas/WebGLParent.h @@ -18,7 +18,7 @@ class HostWebGLContext; namespace layers { class SharedSurfaceTextureClient; class SurfaceDescriptor; -} +} // namespace layers namespace dom { diff --git a/dom/gamepad/GamepadRemapping.cpp b/dom/gamepad/GamepadRemapping.cpp index d11670e10ad8..efd31118b5bf 100644 --- a/dom/gamepad/GamepadRemapping.cpp +++ b/dom/gamepad/GamepadRemapping.cpp @@ -342,12 +342,14 @@ class StadiaControllerRemapper final : public GamepadRemapper { break; case 4: { const double value = AxisToButtonValue(aValue); - service->NewButtonEvent(aIndex, BUTTON_INDEX_LEFT_TRIGGER, value > BUTTON_THRESHOLD_VALUE, value); + service->NewButtonEvent(aIndex, BUTTON_INDEX_LEFT_TRIGGER, + value > BUTTON_THRESHOLD_VALUE, value); break; } case 5: { const double value = AxisToButtonValue(aValue); - service->NewButtonEvent(aIndex, BUTTON_INDEX_RIGHT_TRIGGER, value > BUTTON_THRESHOLD_VALUE, value); + service->NewButtonEvent(aIndex, BUTTON_INDEX_RIGHT_TRIGGER, + value > BUTTON_THRESHOLD_VALUE, value); break; } default: @@ -420,7 +422,8 @@ class Playstation3Remapper final : public GamepadRemapper { default: NS_WARNING( nsPrintfCString( - "Axis idx '%d' doesn't support in Playstation3Remapper().", aAxis) + "Axis idx '%d' doesn't support in Playstation3Remapper().", + aAxis) .get()); break; } @@ -594,13 +597,13 @@ class Dualshock4Remapper final : public GamepadRemapper { const double value = AxisToButtonValue(aValue); service->NewButtonEvent(aIndex, BUTTON_INDEX_LEFT_TRIGGER, value > BUTTON_THRESHOLD_VALUE, value); - break; + break; } case 4: { const double value = AxisToButtonValue(aValue); service->NewButtonEvent(aIndex, BUTTON_INDEX_RIGHT_TRIGGER, value > BUTTON_THRESHOLD_VALUE, value); - break; + break; } case 5: service->NewAxisMoveEvent(aIndex, AXIS_INDEX_RIGHT_STICK_Y, aValue); @@ -1723,7 +1726,8 @@ already_AddRefed GetGamepadRemapper(const uint16_t aVendorId, {GamepadId::kPadixProduct2060, new IBuffaloRemapper()}, {GamepadId::kPlayComProduct0005, new XSkillsRemapper()}, {GamepadId::kPrototypeVendorProduct0667, new BoomN64PsxRemapper()}, - {GamepadId::kPrototypeVendorProduct9401, new StadiaControllerOldFirmwareRemapper()}, + {GamepadId::kPrototypeVendorProduct9401, + new StadiaControllerOldFirmwareRemapper()}, {GamepadId::kRazer1532Product0900, new RazerServalRemapper()}, {GamepadId::kSonyProduct0268, new Playstation3Remapper()}, {GamepadId::kSonyProduct05c4, new Dualshock4Remapper()}, diff --git a/dom/html/HTMLImageElement.cpp b/dom/html/HTMLImageElement.cpp index d81cdbf1ab63..b98a7471f686 100644 --- a/dom/html/HTMLImageElement.cpp +++ b/dom/html/HTMLImageElement.cpp @@ -751,9 +751,9 @@ nsresult HTMLImageElement::CopyInnerTo(HTMLImageElement* aDest) { // initaiated by a user interaction. mUseUrgentStartForChannel = UserActivation::IsHandlingUserInput(); - nsContentUtils::AddScriptRunner(NewRunnableMethod( - "dom::HTMLImageElement::MaybeLoadImage", aDest, - &HTMLImageElement::MaybeLoadImage, false)); + nsContentUtils::AddScriptRunner( + NewRunnableMethod("dom::HTMLImageElement::MaybeLoadImage", aDest, + &HTMLImageElement::MaybeLoadImage, false)); } return NS_OK; diff --git a/dom/media/VideoUtils.cpp b/dom/media/VideoUtils.cpp index ce8fd3fc0fcd..0aac81d4a35f 100644 --- a/dom/media/VideoUtils.cpp +++ b/dom/media/VideoUtils.cpp @@ -290,8 +290,8 @@ bool ExtractVPXCodecDetails(const nsAString& aCodec, uint8_t& aProfile, // No more than 8 fields are expected. return false; } - *(fields[fieldsCount]) = static_cast( - (*fieldsItr).ToInteger(&rv, 10)); + *(fields[fieldsCount]) = + static_cast((*fieldsItr).ToInteger(&rv, 10)); // We got invalid field value, parsing error. NS_ENSURE_SUCCESS(rv, false); } diff --git a/dom/media/webaudio/AudioBuffer.cpp b/dom/media/webaudio/AudioBuffer.cpp index bfaf9b2827eb..da7badd3aaf2 100644 --- a/dom/media/webaudio/AudioBuffer.cpp +++ b/dom/media/webaudio/AudioBuffer.cpp @@ -7,7 +7,7 @@ #include "AudioBuffer.h" #include "mozilla/dom/AudioBufferBinding.h" #include "jsfriendapi.h" -#include "js/ArrayBuffer.h" // JS::StealArrayBufferContents +#include "js/ArrayBuffer.h" // JS::StealArrayBufferContents #include "js/experimental/TypedData.h" // JS_NewFloat32Array, JS_GetFloat32ArrayData, JS_GetTypedArrayLength, JS_GetArrayBufferViewBuffer #include "mozilla/ErrorResult.h" #include "AudioSegment.h" diff --git a/dom/script/ScriptSettings.cpp b/dom/script/ScriptSettings.cpp index 2e2d2750e03f..9dccd5f03055 100644 --- a/dom/script/ScriptSettings.cpp +++ b/dom/script/ScriptSettings.cpp @@ -708,7 +708,6 @@ AutoJSContext::AutoJSContext() : mCx(nullptr) { MOZ_ASSERT(!mCx, "mCx should not be initialized!"); MOZ_ASSERT(NS_IsMainThread()); - if (dom::IsJSAPIActive()) { mCx = dom::danger::GetJSContext(); } else { @@ -722,7 +721,6 @@ AutoJSContext::operator JSContext*() const { return mCx; } AutoSafeJSContext::AutoSafeJSContext() : AutoJSAPI() { MOZ_ASSERT(NS_IsMainThread()); - DebugOnly ok = Init(xpc::UnprivilegedJunkScope()); MOZ_ASSERT(ok, "This is quite odd. We should have crashed in the " diff --git a/dom/simpledb/SDBConnection.cpp b/dom/simpledb/SDBConnection.cpp index 93bf9c4c32cd..df6594ba1782 100644 --- a/dom/simpledb/SDBConnection.cpp +++ b/dom/simpledb/SDBConnection.cpp @@ -9,8 +9,8 @@ #include "ActorsChild.h" #include "js/ArrayBuffer.h" // JS::{GetObjectAsArrayBuffer,IsArrayBufferObject} #include "js/experimental/TypedData.h" // JS_IsArrayBufferViewObject, JS_GetObjectAsArrayBufferView -#include "js/RootingAPI.h" // JS::{Handle,Rooted} -#include "js/Value.h" // JS::Value +#include "js/RootingAPI.h" // JS::{Handle,Rooted} +#include "js/Value.h" // JS::Value #include "mozilla/ipc/BackgroundChild.h" #include "mozilla/ipc/BackgroundParent.h" #include "mozilla/ipc/BackgroundUtils.h" diff --git a/editor/libeditor/HTMLEditSubActionHandler.cpp b/editor/libeditor/HTMLEditSubActionHandler.cpp index f9369c1c4335..0f35a76fad56 100644 --- a/editor/libeditor/HTMLEditSubActionHandler.cpp +++ b/editor/libeditor/HTMLEditSubActionHandler.cpp @@ -101,7 +101,6 @@ static bool IsStyleCachePreservingSubAction(EditSubAction aEditSubAction) { } class MOZ_RAII AutoSetTemporaryAncestorLimiter final { - public: explicit AutoSetTemporaryAncestorLimiter(HTMLEditor& aHTMLEditor, Selection& aSelection, diff --git a/gfx/config/gfxConfigManager.cpp b/gfx/config/gfxConfigManager.cpp index d8c087b365e1..b20a7fdffcf5 100644 --- a/gfx/config/gfxConfigManager.cpp +++ b/gfx/config/gfxConfigManager.cpp @@ -271,7 +271,7 @@ void gfxConfigManager::ConfigureWebRender() { if (mXRenderEnabled) { // XRender and WebRender don't play well together. XRender is disabled by // default. If the user opts into it don't enable webrender. - mFeatureWr->ForceDisable(FeatureStatus::Blocked,"XRender is enabled", + mFeatureWr->ForceDisable(FeatureStatus::Blocked, "XRender is enabled", "FEATURE_FAILURE_XRENDER"_ns); } diff --git a/gfx/layers/client/TextureClient.h b/gfx/layers/client/TextureClient.h index e12a05f23a48..51967b77adfb 100644 --- a/gfx/layers/client/TextureClient.h +++ b/gfx/layers/client/TextureClient.h @@ -784,7 +784,6 @@ class TextureClientReleaseTask : public Runnable { // Automatically lock and unlock a texture. Since texture locking is fallible, // Succeeded() must be checked on the guard object before proceeding. class MOZ_RAII TextureClientAutoLock { - public: TextureClientAutoLock(TextureClient* aTexture, OpenMode aMode) : mTexture(aTexture), mSucceeded(false) { diff --git a/gfx/layers/wr/OMTASampler.h b/gfx/layers/wr/OMTASampler.h index b201150ba82f..860a84acbdc5 100644 --- a/gfx/layers/wr/OMTASampler.h +++ b/gfx/layers/wr/OMTASampler.h @@ -10,7 +10,7 @@ #include #include -#include "base/platform_thread.h" // for PlatformThreadId +#include "base/platform_thread.h" // for PlatformThreadId #include "mozilla/layers/OMTAController.h" // for OMTAController #include "mozilla/Maybe.h" #include "mozilla/StaticMutex.h" diff --git a/gfx/tests/gtest/TestConfigManager.cpp b/gfx/tests/gtest/TestConfigManager.cpp index cce30899e2e9..c79a29dcc8d0 100644 --- a/gfx/tests/gtest/TestConfigManager.cpp +++ b/gfx/tests/gtest/TestConfigManager.cpp @@ -711,4 +711,3 @@ TEST_F(GfxConfigManager, WebRenderWhenXRenderEnabled) { EXPECT_TRUE(mFeatures.mGPUProcess.IsEnabled()); EXPECT_TRUE(mFeatures.mD3D11HwAngle.IsEnabled()); } - diff --git a/image/imgRequestProxy.cpp b/image/imgRequestProxy.cpp index e399ce7a2231..3fb2f3a15f27 100644 --- a/image/imgRequestProxy.cpp +++ b/image/imgRequestProxy.cpp @@ -1069,7 +1069,8 @@ imgRequestProxy::GetStaticRequest(imgIRequest** aReturn) { already_AddRefed imgRequestProxy::GetStaticRequest( Document* aLoadingDocument) { - MOZ_DIAGNOSTIC_ASSERT(!aLoadingDocument || aLoadingDocument->IsStaticDocument()); + MOZ_DIAGNOSTIC_ASSERT(!aLoadingDocument || + aLoadingDocument->IsStaticDocument()); RefPtr image = GetImage(); bool animated; diff --git a/image/imgRequestProxy.h b/image/imgRequestProxy.h index af30bbcc4ff0..a533da814682 100644 --- a/image/imgRequestProxy.h +++ b/image/imgRequestProxy.h @@ -123,7 +123,8 @@ class imgRequestProxy : public mozilla::PreloaderBase, Document* aLoadingDocument, imgRequestProxy** aClone); nsresult Clone(imgINotificationObserver* aObserver, Document* aLoadingDocument, imgRequestProxy** aClone); - already_AddRefed GetStaticRequest(Document* aLoadingDocument); + already_AddRefed GetStaticRequest( + Document* aLoadingDocument); imgRequest* GetOwner() const; diff --git a/ipc/glue/BackgroundChildImpl.cpp b/ipc/glue/BackgroundChildImpl.cpp index b0817c268243..63501b784926 100644 --- a/ipc/glue/BackgroundChildImpl.cpp +++ b/ipc/glue/BackgroundChildImpl.cpp @@ -139,12 +139,12 @@ void BackgroundChildImpl::ProcessingError(Result aCode, const char* aReason) { abortMessage.AssignLiteral(#_result); \ break - HANDLE_CASE(MsgNotKnown); - HANDLE_CASE(MsgNotAllowed); - HANDLE_CASE(MsgPayloadError); - HANDLE_CASE(MsgProcessingError); - HANDLE_CASE(MsgRouteError); - HANDLE_CASE(MsgValueError); + HANDLE_CASE(MsgNotKnown); + HANDLE_CASE(MsgNotAllowed); + HANDLE_CASE(MsgPayloadError); + HANDLE_CASE(MsgProcessingError); + HANDLE_CASE(MsgRouteError); + HANDLE_CASE(MsgValueError); #undef HANDLE_CASE diff --git a/ipc/glue/Neutering.h b/ipc/glue/Neutering.h index cd95b1118400..44cbe042aebe 100644 --- a/ipc/glue/Neutering.h +++ b/ipc/glue/Neutering.h @@ -7,7 +7,6 @@ #ifndef mozilla_ipc_Neutering_h #define mozilla_ipc_Neutering_h - /** * This header declares RAII wrappers for Window neutering. See * WindowsMessageLoop.cpp for more details. diff --git a/js/src/builtin/FinalizationRegistryObject.h b/js/src/builtin/FinalizationRegistryObject.h index 548e2a4e1494..cacf020a874a 100644 --- a/js/src/builtin/FinalizationRegistryObject.h +++ b/js/src/builtin/FinalizationRegistryObject.h @@ -187,6 +187,7 @@ class FinalizationRegistryObject : public NativeObject { static bool cleanupQueuedRecords(JSContext* cx, HandleFinalizationRegistryObject registry, HandleObject callback = nullptr); + private: static const JSClassOps classOps_; static const ClassSpec classSpec_; diff --git a/js/src/builtin/TestingFunctions.cpp b/js/src/builtin/TestingFunctions.cpp index be523ca74156..59469078b33e 100644 --- a/js/src/builtin/TestingFunctions.cpp +++ b/js/src/builtin/TestingFunctions.cpp @@ -57,7 +57,7 @@ #include "js/Debug.h" #include "js/experimental/TypedData.h" // JS_GetObjectAsUint8Array #include "js/friend/DumpFunctions.h" // js::Dump{Backtrace,Heap,Object}, JS::FormatStackDump, js::IgnoreNurseryObjects -#include "js/friend/WindowProxy.h" // js::ToWindowProxyIfWindow +#include "js/friend/WindowProxy.h" // js::ToWindowProxyIfWindow #include "js/HashTable.h" #include "js/LocaleSensitive.h" #include "js/PropertySpec.h" diff --git a/js/src/builtin/streams/StreamAPI.cpp b/js/src/builtin/streams/StreamAPI.cpp index 87473a33e071..5578fafcc1a3 100644 --- a/js/src/builtin/streams/StreamAPI.cpp +++ b/js/src/builtin/streams/StreamAPI.cpp @@ -11,9 +11,9 @@ #include // uint32_t, uintptr_t -#include "jsapi.h" // js::AssertHeapIsIdle, JS_ReportErrorNumberASCII +#include "jsapi.h" // js::AssertHeapIsIdle, JS_ReportErrorNumberASCII #include "jsfriendapi.h" // js::GetErrorMessage, js::IsObjectInContextCompartment, JSMSG_* -#include "jstypes.h" // JS_{FRIEND,PUBLIC}_API +#include "jstypes.h" // JS_{FRIEND,PUBLIC}_API #include "builtin/Stream.h" // js::ReadableByteStreamController{,Close}, js::ReadableStreamDefaultController{,Close}, js::StreamController #include "builtin/streams/ReadableStream.h" // js::ReadableStream diff --git a/js/src/debugger/Debugger.cpp b/js/src/debugger/Debugger.cpp index b95d93bc7dc5..7fc63a2afc22 100644 --- a/js/src/debugger/Debugger.cpp +++ b/js/src/debugger/Debugger.cpp @@ -2961,7 +2961,6 @@ class MOZ_RAII ExecutionObservableRealms // don't match. return iter.hasUsableAbstractFramePtr() && realms_.has(iter.realm()); } - }; // Given a particular AbstractFramePtr F that has become observable, this @@ -3025,7 +3024,6 @@ class MOZ_RAII ExecutionObservableFrame return iter.hasUsableAbstractFramePtr() && iter.abstractFramePtr() == frame_; } - }; class MOZ_RAII ExecutionObservableScript @@ -3057,7 +3055,6 @@ class MOZ_RAII ExecutionObservableScript return iter.hasUsableAbstractFramePtr() && !iter.isWasm() && iter.abstractFramePtr().script() == script_; } - }; /* static */ diff --git a/js/src/debugger/NoExecute.cpp b/js/src/debugger/NoExecute.cpp index da212198c420..8f48104c4d89 100644 --- a/js/src/debugger/NoExecute.cpp +++ b/js/src/debugger/NoExecute.cpp @@ -13,14 +13,14 @@ #include "jsapi.h" // for Handle #include "jsfriendapi.h" // for DumpBacktrace, GetErrorMessage -#include "debugger/Debugger.h" // for Debugger -#include "gc/Barrier.h" // for GCPtrNativeObject +#include "debugger/Debugger.h" // for Debugger +#include "gc/Barrier.h" // for GCPtrNativeObject #include "js/friend/DumpFunctions.h" // for DumpBacktrace -#include "js/Promise.h" // for AutoDebuggerJobQueueInterruption -#include "vm/JSContext.h" // for ProtectedDataContextArg, JSContext -#include "vm/JSScript.h" // for JSScript -#include "vm/Realm.h" // for AutoRealm, Realm -#include "vm/Warnings.h" // for WarnNumberLatin1 +#include "js/Promise.h" // for AutoDebuggerJobQueueInterruption +#include "vm/JSContext.h" // for ProtectedDataContextArg, JSContext +#include "vm/JSScript.h" // for JSScript +#include "vm/Realm.h" // for AutoRealm, Realm +#include "vm/Warnings.h" // for WarnNumberLatin1 #include "vm/Realm-inl.h" // for AutoRealm::AutoRealm diff --git a/js/src/debugger/Object.cpp b/js/src/debugger/Object.cpp index 3e09eb0ffc3e..b31769bb9b2f 100644 --- a/js/src/debugger/Object.cpp +++ b/js/src/debugger/Object.cpp @@ -31,42 +31,42 @@ #include "gc/Tracer.h" // for TraceManuallyBarrieredCrossCompartmentEdge #include "js/CompilationAndEvaluation.h" // for Compile #include "js/Conversions.h" // for ToObject -#include "js/friend/WindowProxy.h" // for IsWindow, IsWindowProxy, ToWindowIfWindowProxy -#include "js/HeapAPI.h" // for IsInsideNursery -#include "js/Promise.h" // for PromiseState -#include "js/Proxy.h" // for PropertyDescriptor -#include "js/StableStringChars.h" // for AutoStableStringChars -#include "proxy/ScriptedProxyHandler.h" // for ScriptedProxyHandler -#include "vm/ArgumentsObject.h" // for ARGS_LENGTH_MAX -#include "vm/ArrayObject.h" // for ArrayObject -#include "vm/AsyncFunction.h" // for AsyncGeneratorObject -#include "vm/AsyncIteration.h" // for AsyncFunctionGeneratorObject -#include "vm/BytecodeUtil.h" // for JSDVG_SEARCH_STACK -#include "vm/Compartment.h" // for Compartment -#include "vm/EnvironmentObject.h" // for GetDebugEnvironmentForFunction -#include "vm/ErrorObject.h" // for JSObject::is, ErrorObject -#include "vm/GeneratorObject.h" // for AbstractGeneratorObject -#include "vm/GlobalObject.h" // for JSObject::is, GlobalObject -#include "vm/Instrumentation.h" // for RealmInstrumentation -#include "vm/Interpreter.h" // for Call -#include "vm/JSAtom.h" // for Atomize, js_apply_str -#include "vm/JSContext.h" // for JSContext, ReportValueError -#include "vm/JSFunction.h" // for JSFunction -#include "vm/JSScript.h" // for JSScript -#include "vm/NativeObject.h" // for NativeObject, JSObject::is -#include "vm/ObjectGroup.h" // for GenericObject, NewObjectKind -#include "vm/ObjectOperations.h" // for DefineProperty -#include "vm/PlainObject.h" // for js::PlainObject -#include "vm/PromiseObject.h" // for js::PromiseObject -#include "vm/Realm.h" // for AutoRealm, ErrorCopier, Realm -#include "vm/Runtime.h" // for JSAtomState -#include "vm/SavedFrame.h" // for SavedFrame -#include "vm/Scope.h" // for PositionalFormalParameterIter -#include "vm/SelfHosting.h" // for GetClonedSelfHostedFunctionName -#include "vm/Shape.h" // for Shape -#include "vm/Stack.h" // for InvokeArgs -#include "vm/StringType.h" // for JSAtom, PropertyName -#include "vm/WrapperObject.h" // for JSObject::is, WrapperObject +#include "js/friend/WindowProxy.h" // for IsWindow, IsWindowProxy, ToWindowIfWindowProxy +#include "js/HeapAPI.h" // for IsInsideNursery +#include "js/Promise.h" // for PromiseState +#include "js/Proxy.h" // for PropertyDescriptor +#include "js/StableStringChars.h" // for AutoStableStringChars +#include "proxy/ScriptedProxyHandler.h" // for ScriptedProxyHandler +#include "vm/ArgumentsObject.h" // for ARGS_LENGTH_MAX +#include "vm/ArrayObject.h" // for ArrayObject +#include "vm/AsyncFunction.h" // for AsyncGeneratorObject +#include "vm/AsyncIteration.h" // for AsyncFunctionGeneratorObject +#include "vm/BytecodeUtil.h" // for JSDVG_SEARCH_STACK +#include "vm/Compartment.h" // for Compartment +#include "vm/EnvironmentObject.h" // for GetDebugEnvironmentForFunction +#include "vm/ErrorObject.h" // for JSObject::is, ErrorObject +#include "vm/GeneratorObject.h" // for AbstractGeneratorObject +#include "vm/GlobalObject.h" // for JSObject::is, GlobalObject +#include "vm/Instrumentation.h" // for RealmInstrumentation +#include "vm/Interpreter.h" // for Call +#include "vm/JSAtom.h" // for Atomize, js_apply_str +#include "vm/JSContext.h" // for JSContext, ReportValueError +#include "vm/JSFunction.h" // for JSFunction +#include "vm/JSScript.h" // for JSScript +#include "vm/NativeObject.h" // for NativeObject, JSObject::is +#include "vm/ObjectGroup.h" // for GenericObject, NewObjectKind +#include "vm/ObjectOperations.h" // for DefineProperty +#include "vm/PlainObject.h" // for js::PlainObject +#include "vm/PromiseObject.h" // for js::PromiseObject +#include "vm/Realm.h" // for AutoRealm, ErrorCopier, Realm +#include "vm/Runtime.h" // for JSAtomState +#include "vm/SavedFrame.h" // for SavedFrame +#include "vm/Scope.h" // for PositionalFormalParameterIter +#include "vm/SelfHosting.h" // for GetClonedSelfHostedFunctionName +#include "vm/Shape.h" // for Shape +#include "vm/Stack.h" // for InvokeArgs +#include "vm/StringType.h" // for JSAtom, PropertyName +#include "vm/WrapperObject.h" // for JSObject::is, WrapperObject #include "vm/Compartment-inl.h" // for Compartment::wrap #include "vm/JSObject-inl.h" // for GetObjectClassName, InitClass, NewObjectWithGivenProtoAndKind, ToPropertyKey diff --git a/js/src/debugger/Source.cpp b/js/src/debugger/Source.cpp index 6a7d5aedfbbb..752e625869e9 100644 --- a/js/src/debugger/Source.cpp +++ b/js/src/debugger/Source.cpp @@ -14,7 +14,7 @@ #include // for memcpy #include // for move -#include "jsapi.h" // for JS_ReportErrorNumberASCII, JS_CopyStringCharsZ +#include "jsapi.h" // for JS_ReportErrorNumberASCII, JS_CopyStringCharsZ #include "debugger/Debugger.h" // for DebuggerSourceReferent, Debugger #include "debugger/Script.h" // for DebuggerScript diff --git a/js/src/gc/Marking.cpp b/js/src/gc/Marking.cpp index d6389f4ccd50..251e9b1c156a 100644 --- a/js/src/gc/Marking.cpp +++ b/js/src/gc/Marking.cpp @@ -834,8 +834,7 @@ void GCMarker::severWeakDelegate(JSObject* key, JSObject* delegate) { // 'delegate' is now the delegate of 'key'. Update weakmap marking state. void GCMarker::restoreWeakDelegate(JSObject* key, JSObject* delegate) { if (!key->zone()->needsIncrementalBarrier() || - !delegate->zone()->needsIncrementalBarrier()) - { + !delegate->zone()->needsIncrementalBarrier()) { MOZ_ASSERT(!key->zone()->gcWeakKeys(key).get(key), "non-collecting zone should not have populated gcWeakKeys"); return; diff --git a/js/src/gc/Zone.cpp b/js/src/gc/Zone.cpp index 1b63db4ebb25..80d134e3d2f4 100644 --- a/js/src/gc/Zone.cpp +++ b/js/src/gc/Zone.cpp @@ -485,7 +485,7 @@ void Zone::discardJitCode(JSFreeOp* fop, } void JS::Zone::beforeClearDelegateInternal(JSObject* wrapper, - JSObject* delegate) { + JSObject* delegate) { MOZ_ASSERT(js::gc::detail::GetDelegate(wrapper) == delegate); MOZ_ASSERT(needsIncrementalBarrier()); GCMarker::fromTracer(barrierTracer())->severWeakDelegate(wrapper, delegate); diff --git a/js/src/jit/CacheIR.cpp b/js/src/jit/CacheIR.cpp index 4e108b27fbca..bb622ad6c581 100644 --- a/js/src/jit/CacheIR.cpp +++ b/js/src/jit/CacheIR.cpp @@ -18,7 +18,7 @@ #include "jit/InlinableNatives.h" #include "jit/Ion.h" // IsIonEnabled #include "js/friend/WindowProxy.h" // js::IsWindow, js::IsWindowProxy, js::ToWindowIfWindowProxy -#include "js/ScalarType.h" // js::Scalar::Type +#include "js/ScalarType.h" // js::Scalar::Type #include "util/Unicode.h" #include "vm/PlainObject.h" // js::PlainObject #include "vm/SelfHosting.h" diff --git a/js/src/jit/Ion.h b/js/src/jit/Ion.h index fc255443f24b..6ca3c167d49d 100644 --- a/js/src/jit/Ion.h +++ b/js/src/jit/Ion.h @@ -120,7 +120,6 @@ class MOZ_RAII AutoEnterIonBackend { jcx->leaveIonBackend(); } #endif - }; bool OffThreadCompilationAvailable(JSContext* cx); diff --git a/js/src/jsapi-tests/testArrayBufferView.cpp b/js/src/jsapi-tests/testArrayBufferView.cpp index f4a8d19eaf29..cedee3796b33 100644 --- a/js/src/jsapi-tests/testArrayBufferView.cpp +++ b/js/src/jsapi-tests/testArrayBufferView.cpp @@ -4,7 +4,7 @@ #include "jsfriendapi.h" -#include "js/ArrayBuffer.h" // JS::NewArrayBuffer +#include "js/ArrayBuffer.h" // JS::NewArrayBuffer #include "js/experimental/TypedData.h" // JS_GetArrayBufferView{Type,ByteLength,Data}, JS_GetObjectAsArrayBufferView, JS_GetObjectAs{{Ui,I}nt{8,16,32},Float{32,64}}Array, JS_IsArrayBufferViewObject, JS_NewDataView, JS_New{{Ui,I}nt{8,16,32},Float{32,64},Uint8Clamped}Array #include "js/ScalarType.h" // js::Scalar::Type #include "jsapi-tests/tests.h" diff --git a/js/src/jsapi.h b/js/src/jsapi.h index a1a6cd1c6ac3..60b27c8053ec 100644 --- a/js/src/jsapi.h +++ b/js/src/jsapi.h @@ -419,7 +419,6 @@ class MOZ_RAII JS_PUBLIC_API JSAutoRealm { JSAutoRealm(JSContext* cx, JSObject* target); JSAutoRealm(JSContext* cx, JSScript* target); ~JSAutoRealm(); - }; class MOZ_RAII JS_PUBLIC_API JSAutoNullableRealm { @@ -429,7 +428,6 @@ class MOZ_RAII JS_PUBLIC_API JSAutoNullableRealm { public: explicit JSAutoNullableRealm(JSContext* cx, JSObject* targetOrNull); ~JSAutoNullableRealm(); - }; namespace JS { diff --git a/js/src/jsexn.cpp b/js/src/jsexn.cpp index a6c9048175a3..f0a0953f1faf 100644 --- a/js/src/jsexn.cpp +++ b/js/src/jsexn.cpp @@ -28,8 +28,8 @@ #include "js/CharacterEncoding.h" #include "js/Class.h" #include "js/Conversions.h" -#include "js/ErrorReport.h" // JS::PrintError -#include "js/Exception.h" // JS::ExceptionStack +#include "js/ErrorReport.h" // JS::PrintError +#include "js/Exception.h" // JS::ExceptionStack #include "js/experimental/TypedData.h" // JS_IsArrayBufferViewObject #include "js/SavedFrameAPI.h" #include "js/UniquePtr.h" diff --git a/js/src/shell/js.cpp b/js/src/shell/js.cpp index 9ff276954591..5b5c3ea77c26 100644 --- a/js/src/shell/js.cpp +++ b/js/src/shell/js.cpp @@ -109,7 +109,7 @@ #include "js/friend/DumpFunctions.h" // JS::FormatStackDump #include "js/friend/StackLimits.h" // js::CheckRecursionLimitConservative #include "js/friend/WindowProxy.h" // js::IsWindowProxy, js::SetWindowProxyClass, js::ToWindowProxyIfWindow, js::ToWindowIfWindowProxy -#include "js/GCAPI.h" // JS::AutoCheckCannotGC +#include "js/GCAPI.h" // JS::AutoCheckCannotGC #include "js/GCVector.h" #include "js/Initialization.h" #include "js/JSON.h" diff --git a/js/src/shell/jsrtfuzzing/jsrtfuzzing.cpp b/js/src/shell/jsrtfuzzing/jsrtfuzzing.cpp index c6b5b252a155..424521bc3237 100644 --- a/js/src/shell/jsrtfuzzing/jsrtfuzzing.cpp +++ b/js/src/shell/jsrtfuzzing/jsrtfuzzing.cpp @@ -21,9 +21,9 @@ #include "js/ErrorReport.h" // JS::PrintError #include "js/Exception.h" // JS::StealPendingExceptionStack #include "js/experimental/TypedData.h" // JS_GetUint8ClampedArrayData, JS_NewUint8ClampedArray -#include "js/RootingAPI.h" // JS::Rooted -#include "js/SourceText.h" // JS::Source{Ownership,Text} -#include "js/Value.h" // JS::Value +#include "js/RootingAPI.h" // JS::Rooted +#include "js/SourceText.h" // JS::Source{Ownership,Text} +#include "js/Value.h" // JS::Value #include "shell/jsshell.h" // js::shell::{reportWarnings,PrintStackTrace,sArg{c,v}} #include "vm/Interpreter.h" #include "vm/TypedArrayObject.h" diff --git a/js/src/vm/EnvironmentObject.h b/js/src/vm/EnvironmentObject.h index 20c4996ae8f9..a7d4102467e2 100644 --- a/js/src/vm/EnvironmentObject.h +++ b/js/src/vm/EnvironmentObject.h @@ -787,7 +787,6 @@ class MOZ_RAII EnvironmentIter { } AbstractFramePtr maybeInitialFrame() const { return frame_; } - }; // The key in MissingEnvironmentMap. For live frames, maps live frames to diff --git a/js/src/vm/HelperThreads.cpp b/js/src/vm/HelperThreads.cpp index 1c79ba25f020..572bcf8e7e1e 100644 --- a/js/src/vm/HelperThreads.cpp +++ b/js/src/vm/HelperThreads.cpp @@ -16,7 +16,7 @@ #include "frontend/BytecodeCompilation.h" #include "jit/IonCompileTask.h" -#include "js/ContextOptions.h" // JS::ContextOptions +#include "js/ContextOptions.h" // JS::ContextOptions #include "js/friend/StackLimits.h" // js::ReportOverRecursed #include "js/SourceText.h" #include "js/UniquePtr.h" diff --git a/js/src/vm/HelperThreads.h b/js/src/vm/HelperThreads.h index b41db40585d5..d2fa520dc6be 100644 --- a/js/src/vm/HelperThreads.h +++ b/js/src/vm/HelperThreads.h @@ -670,7 +670,6 @@ void RunPendingSourceCompressions(JSRuntime* runtime); class MOZ_RAII AutoLockHelperThreadState : public LockGuard { using Base = LockGuard; - public: explicit AutoLockHelperThreadState() : Base(HelperThreadState().helperLock) {} }; @@ -678,7 +677,6 @@ class MOZ_RAII AutoLockHelperThreadState : public LockGuard { class MOZ_RAII AutoUnlockHelperThreadState : public UnlockGuard { using Base = UnlockGuard; - public: explicit AutoUnlockHelperThreadState(AutoLockHelperThreadState& locked) : Base(locked) {} diff --git a/js/src/vm/JSContext.cpp b/js/src/vm/JSContext.cpp index f1314c5e28e7..4616da613a22 100644 --- a/js/src/vm/JSContext.cpp +++ b/js/src/vm/JSContext.cpp @@ -41,7 +41,7 @@ #include "jit/Ion.h" #include "jit/PcScriptCache.h" #include "js/CharacterEncoding.h" -#include "js/ContextOptions.h" // JS::ContextOptions +#include "js/ContextOptions.h" // JS::ContextOptions #include "js/friend/StackLimits.h" // js::ReportOverRecursed #include "js/Printf.h" #ifdef JS_SIMULATOR_ARM diff --git a/js/src/vm/JSContext.h b/js/src/vm/JSContext.h index 2cc1e1093c8b..17b02a0efdff 100644 --- a/js/src/vm/JSContext.h +++ b/js/src/vm/JSContext.h @@ -1144,7 +1144,6 @@ class MOZ_RAII AutoLockScriptData { #endif } } - }; // A token used to prove you can safely access the atoms zone. This zone is diff --git a/js/src/vm/JSObject.cpp b/js/src/vm/JSObject.cpp index d78f9a3d2913..ae44f1402199 100644 --- a/js/src/vm/JSObject.cpp +++ b/js/src/vm/JSObject.cpp @@ -37,7 +37,7 @@ #include "jit/BaselineJIT.h" #include "js/CharacterEncoding.h" #include "js/friend/DumpFunctions.h" // js::DumpObject -#include "js/friend/WindowProxy.h" // js::IsWindow, js::ToWindowProxyIfWindow +#include "js/friend/WindowProxy.h" // js::IsWindow, js::ToWindowProxyIfWindow #include "js/MemoryMetrics.h" #include "js/PropertyDescriptor.h" // JS::FromPropertyDescriptor #include "js/PropertySpec.h" // JSPropertySpec diff --git a/js/src/vm/Realm.h b/js/src/vm/Realm.h index 576821fb0682..b8f0d1a1d649 100644 --- a/js/src/vm/Realm.h +++ b/js/src/vm/Realm.h @@ -192,7 +192,6 @@ using NewObjectMetadataState = mozilla::Variant; class MOZ_RAII AutoSetNewObjectMetadata { - JSContext* cx_; Rooted prevState_; diff --git a/js/src/vm/SelfHosting.cpp b/js/src/vm/SelfHosting.cpp index e2989721c0ad..a167828a0d4d 100644 --- a/js/src/vm/SelfHosting.cpp +++ b/js/src/vm/SelfHosting.cpp @@ -52,7 +52,7 @@ #include "js/ErrorReport.h" // JS::PrintError #include "js/Exception.h" #include "js/experimental/TypedData.h" // JS_GetArrayBufferViewType -#include "js/Modules.h" // JS::GetModulePrivate +#include "js/Modules.h" // JS::GetModulePrivate #include "js/PropertySpec.h" #include "js/ScalarType.h" // js::Scalar::Type #include "js/SourceText.h" // JS::SourceText diff --git a/js/src/vm/ToSource.cpp b/js/src/vm/ToSource.cpp index 818ac0dfd7a9..210d69e67a14 100644 --- a/js/src/vm/ToSource.cpp +++ b/js/src/vm/ToSource.cpp @@ -14,13 +14,13 @@ #include "jsfriendapi.h" // CheckRecursionLimit, GetBuiltinClass -#include "builtin/Array.h" // ArrayToSource -#include "builtin/Boolean.h" // BooleanToString -#include "builtin/Object.h" // ObjectToSource -#include "gc/Allocator.h" // CanGC -#include "js/Class.h" // ESClass +#include "builtin/Array.h" // ArrayToSource +#include "builtin/Boolean.h" // BooleanToString +#include "builtin/Object.h" // ObjectToSource +#include "gc/Allocator.h" // CanGC +#include "js/Class.h" // ESClass #include "js/friend/StackLimits.h" // js::CheckRecursionLimit -#include "js/Symbol.h" // SymbolCode, JS::WellKnownSymbolLimit +#include "js/Symbol.h" // SymbolCode, JS::WellKnownSymbolLimit #include "js/TypeDecls.h" // Rooted{Function, Object, String, Value}, HandleValue, Latin1Char #include "js/Utility.h" // UniqueChars #include "js/Value.h" // JS::Value diff --git a/js/src/wasm/WasmModule.cpp b/js/src/wasm/WasmModule.cpp index 853f5d48eb21..07e0228c0871 100644 --- a/js/src/wasm/WasmModule.cpp +++ b/js/src/wasm/WasmModule.cpp @@ -23,7 +23,7 @@ #include "builtin/TypedObject.h" #include "jit/JitOptions.h" -#include "js/BuildId.h" // JS::BuildIdCharVector +#include "js/BuildId.h" // JS::BuildIdCharVector #include "js/experimental/TypedData.h" // JS_NewUint8Array #include "threading/LockGuard.h" #include "vm/PlainObject.h" // js::PlainObject diff --git a/js/xpconnect/src/XPCJSRuntime.cpp b/js/xpconnect/src/XPCJSRuntime.cpp index b0f9f5018ace..62a72c79438c 100644 --- a/js/xpconnect/src/XPCJSRuntime.cpp +++ b/js/xpconnect/src/XPCJSRuntime.cpp @@ -54,7 +54,7 @@ #include "js/UbiNode.h" #include "js/UbiNodeUtils.h" #include "js/friend/UsageStatistics.h" // JS_TELEMETRY_*, JS_SetAccumulateTelemetryCallback -#include "js/friend/WindowProxy.h" // js::SetWindowProxyClass +#include "js/friend/WindowProxy.h" // js::SetWindowProxyClass #include "mozilla/dom/GeneratedAtomList.h" #include "mozilla/dom/BindingUtils.h" #include "mozilla/dom/Element.h" diff --git a/js/xpconnect/src/XPCWrappedNative.cpp b/js/xpconnect/src/XPCWrappedNative.cpp index f6368fbe0dd3..c6158cc23501 100644 --- a/js/xpconnect/src/XPCWrappedNative.cpp +++ b/js/xpconnect/src/XPCWrappedNative.cpp @@ -9,7 +9,7 @@ #include "xpcprivate.h" #include "nsWrapperCacheInlines.h" #include "XPCLog.h" -#include "js/Array.h" // JS::GetArrayLength, JS::IsArrayObject +#include "js/Array.h" // JS::GetArrayLength, JS::IsArrayObject #include "js/experimental/TypedData.h" // JS_GetTypedArrayLength, JS_IsTypedArrayObject #include "js/MemoryFunctions.h" #include "js/Printf.h" diff --git a/js/xpconnect/wrappers/XrayWrapper.cpp b/js/xpconnect/wrappers/XrayWrapper.cpp index 3f4a45eb97f7..63c89d482f6e 100644 --- a/js/xpconnect/wrappers/XrayWrapper.cpp +++ b/js/xpconnect/wrappers/XrayWrapper.cpp @@ -20,7 +20,7 @@ #include "jsapi.h" #include "js/experimental/TypedData.h" // JS_GetTypedArrayLength -#include "js/friend/WindowProxy.h" // js::IsWindowProxy +#include "js/friend/WindowProxy.h" // js::IsWindowProxy #include "js/PropertySpec.h" #include "nsJSUtils.h" #include "nsPrintfCString.h" diff --git a/layout/base/ScrollStyles.cpp b/layout/base/ScrollStyles.cpp index dfac5324cc0b..6ce21aad8c6c 100644 --- a/layout/base/ScrollStyles.cpp +++ b/layout/base/ScrollStyles.cpp @@ -12,7 +12,8 @@ namespace mozilla { // https://drafts.csswg.org/css-overflow/#overflow-propagation // "If `visible` is applied to the viewport, it must be interpreted as `auto`. // If `clip` is applied to the viewport, it must be interpreted as `hidden`." -static StyleOverflow MapOverflowValueForViewportPropagation(StyleOverflow aOverflow) { +static StyleOverflow MapOverflowValueForViewportPropagation( + StyleOverflow aOverflow) { switch (aOverflow) { case StyleOverflow::Visible: return StyleOverflow::Auto; @@ -35,8 +36,9 @@ ScrollStyles::ScrollStyles(StyleOverflow aH, StyleOverflow aV) ScrollStyles::ScrollStyles(const nsStyleDisplay& aDisplay, MapOverflowToValidScrollStyleTag) - : ScrollStyles(MapOverflowValueForViewportPropagation(aDisplay.mOverflowX), - MapOverflowValueForViewportPropagation(aDisplay.mOverflowY)) {} + : ScrollStyles( + MapOverflowValueForViewportPropagation(aDisplay.mOverflowX), + MapOverflowValueForViewportPropagation(aDisplay.mOverflowY)) {} bool ScrollStyles::IsHiddenInBothDirections() const { return mHorizontal == StyleOverflow::Hidden && diff --git a/layout/base/nsPresContext.cpp b/layout/base/nsPresContext.cpp index b872058af7f7..4623bbe575f8 100644 --- a/layout/base/nsPresContext.cpp +++ b/layout/base/nsPresContext.cpp @@ -1090,7 +1090,8 @@ static bool CheckOverflow(const ComputedStyle* aComputedStyle, return false; } - *aStyles = ScrollStyles(*display, ScrollStyles::MapOverflowToValidScrollStyle); + *aStyles = + ScrollStyles(*display, ScrollStyles::MapOverflowToValidScrollStyle); return true; } diff --git a/layout/generic/nsIFrame.cpp b/layout/generic/nsIFrame.cpp index a18280ee1072..ada769787845 100644 --- a/layout/generic/nsIFrame.cpp +++ b/layout/generic/nsIFrame.cpp @@ -2664,7 +2664,7 @@ static void ApplyOverflowClipping( // comboboxes which make their display text (an inline frame) have clipping. MOZ_ASSERT(aClipAxes != nsIFrame::PhysicalAxes::None); MOZ_ASSERT(aFrame->ShouldApplyOverflowClipping(aFrame->StyleDisplay()) == - aClipAxes); + aClipAxes); nsRect clipRect; bool haveRadii = false; @@ -11105,10 +11105,10 @@ nsIFrame::PhysicalAxes nsIFrame::ShouldApplyOverflowClipping( !PresContext()->ElementWouldPropagateScrollStyles(*element)) { uint8_t axes = uint8_t(PhysicalAxes::None); if (aDisp->mOverflowX == mozilla::StyleOverflow::Clip) { - axes |= uint8_t(PhysicalAxes::Horizontal); + axes |= uint8_t(PhysicalAxes::Horizontal); } if (aDisp->mOverflowY == mozilla::StyleOverflow::Clip) { - axes |= uint8_t(PhysicalAxes::Vertical); + axes |= uint8_t(PhysicalAxes::Vertical); } return PhysicalAxes(axes); } diff --git a/layout/printing/nsPrintJob.h b/layout/printing/nsPrintJob.h index 3ddb222b2285..d16a9bc79e65 100644 --- a/layout/printing/nsPrintJob.h +++ b/layout/printing/nsPrintJob.h @@ -12,7 +12,7 @@ #include "nsCOMPtr.h" #include "nsHashKeys.h" -#include "nsIFrame.h" // For WeakFrame +#include "nsIFrame.h" // For WeakFrame #include "nsSize.h" #include "nsTHashtable.h" #include "nsWeakReference.h" diff --git a/layout/style/ImageLoader.cpp b/layout/style/ImageLoader.cpp index ba5b5c6e8ff3..abf9f7d24946 100644 --- a/layout/style/ImageLoader.cpp +++ b/layout/style/ImageLoader.cpp @@ -405,8 +405,7 @@ already_AddRefed ImageLoader::LoadImage( RefPtr request; nsresult rv = nsContentUtils::LoadImage( uri, &aDocument, &aDocument, data.Principal(), 0, data.ReferrerInfo(), - sImageObserver, loadFlags, u"css"_ns, - getter_AddRefs(request)); + sImageObserver, loadFlags, u"css"_ns, getter_AddRefs(request)); if (NS_FAILED(rv) || !request) { return nullptr; diff --git a/layout/style/SharedStyleSheetCache.h b/layout/style/SharedStyleSheetCache.h index 2d246a8c5695..c1d24497a0e0 100644 --- a/layout/style/SharedStyleSheetCache.h +++ b/layout/style/SharedStyleSheetCache.h @@ -129,7 +129,8 @@ class SharedStyleSheetCache final : public nsIMemoryReporter { // // Note that we hold on to all sheet loads, even if in the end they happen not // to be cacheable. - nsDataHashtable> mLoadingDatas; + nsDataHashtable> + mLoadingDatas; // An origin-to-number-of-registered-documents count, in order to manage cache // eviction as described in RegisterLoader / UnregisterLoader. diff --git a/media/webrtc/signaling/src/peerconnection/RTCDTMFSender.cpp b/media/webrtc/signaling/src/peerconnection/RTCDTMFSender.cpp index 336a06b7ed40..429a3406176e 100644 --- a/media/webrtc/signaling/src/peerconnection/RTCDTMFSender.cpp +++ b/media/webrtc/signaling/src/peerconnection/RTCDTMFSender.cpp @@ -32,7 +32,8 @@ LazyLogModule gDtmfLog("RTCDTMFSender"); RTCDTMFSender::RTCDTMFSender(nsPIDOMWindowInner* aWindow, TransceiverImpl* aTransceiver, AudioSessionConduit* aConduit) - : DOMEventTargetHelper(aWindow), mTransceiver(aTransceiver), + : DOMEventTargetHelper(aWindow), + mTransceiver(aTransceiver), mConduit(aConduit) {} JSObject* RTCDTMFSender::WrapObject(JSContext* aCx, diff --git a/mfbt/WeakPtr.h b/mfbt/WeakPtr.h index 12f790f91eae..cd37fdb36eb6 100644 --- a/mfbt/WeakPtr.h +++ b/mfbt/WeakPtr.h @@ -192,9 +192,7 @@ class SupportsWeakPtr { using WeakReference = detail::WeakReference; protected: - ~SupportsWeakPtr() { - DetachWeakPtr(); - } + ~SupportsWeakPtr() { DetachWeakPtr(); } protected: void DetachWeakPtr() { diff --git a/mozglue/baseprofiler/public/BaseProfiler.h b/mozglue/baseprofiler/public/BaseProfiler.h index 393e7fb97424..455623842a71 100644 --- a/mozglue/baseprofiler/public/BaseProfiler.h +++ b/mozglue/baseprofiler/public/BaseProfiler.h @@ -634,7 +634,6 @@ class MOZ_RAII AutoProfilerStats { ~AutoProfilerStats() { mStats.AddDurationFrom(mStart); } private: - StaticBaseProfilerStats& mStats; TimeStamp mStart; }; @@ -1006,7 +1005,6 @@ class MOZ_RAII AutoProfilerLabel { MFBT_API static ProfilingStack* GetProfilingStack(); private: - // We save a ProfilingStack pointer in the ctor so we don't have to redo the // TLS lookup in the dtor. ProfilingStack* mProfilingStack; diff --git a/netwerk/base/TRRLoadInfo.cpp b/netwerk/base/TRRLoadInfo.cpp index d2d9c2c7b66b..afd1eed9459b 100644 --- a/netwerk/base/TRRLoadInfo.cpp +++ b/netwerk/base/TRRLoadInfo.cpp @@ -305,7 +305,6 @@ TRRLoadInfo::GetInnerWindowID(uint64_t* aResult) { return NS_ERROR_NOT_IMPLEMENTED; } - NS_IMETHODIMP TRRLoadInfo::GetBrowsingContextID(uint64_t* aResult) { return NS_ERROR_NOT_IMPLEMENTED; diff --git a/netwerk/protocol/http/Http3Session.cpp b/netwerk/protocol/http/Http3Session.cpp index 189036cd1eb0..5106358ee5b1 100644 --- a/netwerk/protocol/http/Http3Session.cpp +++ b/netwerk/protocol/http/Http3Session.cpp @@ -181,8 +181,7 @@ void Http3Session::Shutdown() { Http3Session::~Http3Session() { LOG3(("Http3Session::~Http3Session %p", this)); - Telemetry::Accumulate(Telemetry::HTTP3_REQUEST_PER_CONN, - mTransactionCount); + Telemetry::Accumulate(Telemetry::HTTP3_REQUEST_PER_CONN, mTransactionCount); Shutdown(); } diff --git a/toolkit/components/reputationservice/ApplicationReputation.cpp b/toolkit/components/reputationservice/ApplicationReputation.cpp index 9e150261d068..d871c66470a5 100644 --- a/toolkit/components/reputationservice/ApplicationReputation.cpp +++ b/toolkit/components/reputationservice/ApplicationReputation.cpp @@ -197,8 +197,8 @@ const char* const ApplicationReputationService::kBinaryFileExtensions[] = { ".caction", // Automator action ".cdr", // Mac disk image //".cer", exec // Signed certificate file - ".cfg", // Windows - ".chi", // Windows Help + ".cfg", // Windows + ".chi", // Windows Help //".chm", exec // Windows Help ".class", // Java //".cmd", exec // Windows executable diff --git a/toolkit/crashreporter/test/nsTestCrasher.cpp b/toolkit/crashreporter/test/nsTestCrasher.cpp index a838cab46aef..e846d423cf86 100644 --- a/toolkit/crashreporter/test/nsTestCrasher.cpp +++ b/toolkit/crashreporter/test/nsTestCrasher.cpp @@ -222,13 +222,13 @@ extern "C" NS_EXPORT void Crash(int16_t how) { // Since we need to call the real HeapFree() we get its pointer directly. HMODULE kernel32 = LoadLibraryW(L"Kernel32.dll"); if (kernel32) { - typedef BOOL(*HeapFreeT)(HANDLE, DWORD, LPVOID); + typedef BOOL (*HeapFreeT)(HANDLE, DWORD, LPVOID); HeapFreeT heapFree = (HeapFreeT)GetProcAddress(kernel32, "HeapFree"); if (heapFree) { HANDLE heap = GetProcessHeap(); LPVOID badPointer = (LPVOID)3; heapFree(heap, 0, badPointer); - break; // This should be unreachable + break; // This should be unreachable } } } diff --git a/tools/profiler/public/GeckoProfiler.h b/tools/profiler/public/GeckoProfiler.h index d5dbd7806ce7..826438ea5778 100644 --- a/tools/profiler/public/GeckoProfiler.h +++ b/tools/profiler/public/GeckoProfiler.h @@ -1216,7 +1216,6 @@ class MOZ_RAII AutoProfilerLabel { } private: - // We save a ProfilingStack pointer in the ctor so we don't have to redo the // TLS lookup in the dtor. ProfilingStack* mProfilingStack; diff --git a/widget/cocoa/nsDeviceContextSpecX.mm b/widget/cocoa/nsDeviceContextSpecX.mm index a206f9362d7d..3f5aadd28fc8 100644 --- a/widget/cocoa/nsDeviceContextSpecX.mm +++ b/widget/cocoa/nsDeviceContextSpecX.mm @@ -270,9 +270,11 @@ NS_IMETHODIMP nsDeviceContextSpecX::Init(nsIWidget* aWidget, nsIPrintSettings* a mPrintViaSkPDF = true; } else if (destination == kPMDestinationFile) { AutoCFRelease destURL(nullptr); - status = ::PMSessionCopyDestinationLocation(mPrintSession, mPrintSettings, destURL.receive()); + status = + ::PMSessionCopyDestinationLocation(mPrintSession, mPrintSettings, destURL.receive()); if (status == noErr) { - AutoCFRelease destPathRef = CFURLCopyFileSystemPath(destURL, kCFURLPOSIXPathStyle); + AutoCFRelease destPathRef = + CFURLCopyFileSystemPath(destURL, kCFURLPOSIXPathStyle); NSString* destPath = (NSString*)CFStringRef(destPathRef); NSString* destPathExt = [destPath pathExtension]; if ([destPathExt isEqualToString:@"pdf"]) { @@ -367,12 +369,15 @@ NS_IMETHODIMP nsDeviceContextSpecX::EndDocument() { } case kPMDestinationFile: { AutoCFRelease destURL(nullptr); - status = ::PMSessionCopyDestinationLocation(mPrintSession, mPrintSettings, destURL.receive()); + status = + ::PMSessionCopyDestinationLocation(mPrintSession, mPrintSettings, destURL.receive()); if (status == noErr) { - AutoCFRelease sourcePathRef = CFURLCopyFileSystemPath(pdfURL, kCFURLPOSIXPathStyle); + AutoCFRelease sourcePathRef = + CFURLCopyFileSystemPath(pdfURL, kCFURLPOSIXPathStyle); NSString* sourcePath = (NSString*)CFStringRef(sourcePathRef); # ifdef DEBUG - AutoCFRelease destPathRef = CFURLCopyFileSystemPath(destURL, kCFURLPOSIXPathStyle); + AutoCFRelease destPathRef = + CFURLCopyFileSystemPath(destURL, kCFURLPOSIXPathStyle); NSString* destPath = (NSString*)CFStringRef(destPathRef); NSString* destPathExt = [destPath pathExtension]; MOZ_ASSERT([destPathExt isEqualToString:@"pdf"], diff --git a/xpcom/base/AutoRestore.h b/xpcom/base/AutoRestore.h index f68a05e0cf1a..fc585da14b43 100644 --- a/xpcom/base/AutoRestore.h +++ b/xpcom/base/AutoRestore.h @@ -30,6 +30,7 @@ class MOZ_RAII AutoRestore { private: T& mLocation; T mValue; + public: explicit AutoRestore(T& aValue) : mLocation(aValue), mValue(aValue) {} ~AutoRestore() { mLocation = mValue; }