Skip to content

Commit 843f943

Browse files
committed
Bug 1519636 - Reformat recent changes to the Google coding style r=andi
# ignore-this-changeset Differential Revision: https://phabricator.services.mozilla.com/D85678
1 parent 964bac7 commit 843f943

File tree

72 files changed

+145
-156
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+145
-156
lines changed

devtools/shared/heapsnapshot/AutoMemMap.h

-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ namespace devtools {
3333
// }
3434
// // The memory is automatically unmapped when the AutoMemMap leaves scope.
3535
class MOZ_RAII AutoMemMap {
36-
3736
PRFileInfo64 fileInfo;
3837
PRFileDesc* fd;
3938
PRFileMap* fileMap;

docshell/base/timeline/AutoGlobalTimelineMarker.h

-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ namespace mozilla {
2727
// ...
2828
// }
2929
class MOZ_RAII AutoGlobalTimelineMarker {
30-
3130
// The name of the marker we are adding.
3231
const char* mName;
3332
// Whether to capture the JS stack or not.

docshell/base/timeline/AutoRestyleTimelineMarker.h

-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ class nsIDocShell;
1414
namespace mozilla {
1515

1616
class MOZ_RAII AutoRestyleTimelineMarker {
17-
1817
RefPtr<nsIDocShell> mDocShell;
1918
bool mIsAnimationOnly;
2019

docshell/base/timeline/AutoTimelineMarker.h

-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ namespace mozilla {
2727
// ...
2828
// }
2929
class MOZ_RAII AutoTimelineMarker {
30-
3130
// The name of the marker we are adding.
3231
const char* mName;
3332

docshell/shistory/nsSHistory.h

-1
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,6 @@ class nsSHistory : public mozilla::LinkedListElement<nsSHistory>,
231231
nsISHEntry* aNewEntry);
232232

233233
protected:
234-
235234
bool mHasOngoingUpdate;
236235
bool mIsRemote;
237236
nsTArray<nsCOMPtr<nsISHEntry>> mEntries; // entries are never null

dom/base/Selection.h

+1
Original file line numberDiff line numberDiff line change
@@ -917,6 +917,7 @@ class MOZ_STACK_CLASS SelectionBatcher final {
917917
class MOZ_RAII AutoHideSelectionChanges final {
918918
private:
919919
RefPtr<Selection> mSelection;
920+
920921
public:
921922
explicit AutoHideSelectionChanges(const nsFrameSelection* aFrame);
922923

dom/base/nsGlobalWindowOuter.h

-1
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,6 @@ class nsGlobalWindowOuter final : public mozilla::dom::EventTarget,
397397
~TemporarilyDisableDialogs();
398398

399399
private:
400-
401400
// Always an inner window; this is the window whose dialog state we messed
402401
// with. We just want to keep it alive, because we plan to poke at its
403402
// members in our destructor.

dom/base/nsImageLoadingContent.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -976,8 +976,8 @@ nsImageLoadingContent::LoadImageWithChannel(nsIChannel* aChannel,
976976

977977
// Do the load.
978978
RefPtr<imgRequestProxy>& req = PrepareNextRequest(eImageLoadType_Normal);
979-
nsresult rv = loader->LoadImageWithChannel(aChannel, this, doc,
980-
aListener, getter_AddRefs(req));
979+
nsresult rv = loader->LoadImageWithChannel(aChannel, this, doc, aListener,
980+
getter_AddRefs(req));
981981
if (NS_SUCCEEDED(rv)) {
982982
CloneScriptedRequests(req);
983983
TrackImage(req);

dom/bindings/TypedArray.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
#include "js/ArrayBuffer.h"
1313
#include "js/ArrayBufferMaybeShared.h"
1414
#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
15-
#include "js/GCAPI.h" // JS::AutoCheckCannotGC
16-
#include "js/RootingAPI.h" // JS::Rooted
17-
#include "js/ScalarType.h" // js::Scalar::Type
15+
#include "js/GCAPI.h" // JS::AutoCheckCannotGC
16+
#include "js/RootingAPI.h" // JS::Rooted
17+
#include "js/ScalarType.h" // js::Scalar::Type
1818
#include "js/SharedArrayBuffer.h"
1919
#include "mozilla/Attributes.h"
2020
#include "mozilla/dom/BindingDeclarations.h"

dom/canvas/WebGLChild.h

+1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ class WebGLChild final : public PWebGLChild, public SupportsWeakPtr {
3737
webgl::RaiiShmem mPendingCmdsShmem;
3838
size_t mPendingCmdsPos = 0;
3939
FlushedCmdInfo mFlushedCmdInfo;
40+
4041
public:
4142
NS_INLINE_DECL_THREADSAFE_REFCOUNTING(WebGLChild, override);
4243
using OtherSideActor = WebGLParent;

dom/canvas/WebGLIpdl.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
namespace mozilla {
1313
namespace webgl {
1414

15-
// TODO: This should probably replace Shmem, or at least this should move to ipc/glue.
15+
// TODO: This should probably replace Shmem, or at least this should move to
16+
// ipc/glue.
1617
class RaiiShmem final {
1718
RefPtr<mozilla::ipc::ActorLifecycleProxy> mWeakRef;
1819
mozilla::ipc::Shmem mShmem = {};

dom/canvas/WebGLParent.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class HostWebGLContext;
1818
namespace layers {
1919
class SharedSurfaceTextureClient;
2020
class SurfaceDescriptor;
21-
}
21+
} // namespace layers
2222

2323
namespace dom {
2424

dom/gamepad/GamepadRemapping.cpp

+10-6
Original file line numberDiff line numberDiff line change
@@ -342,12 +342,14 @@ class StadiaControllerRemapper final : public GamepadRemapper {
342342
break;
343343
case 4: {
344344
const double value = AxisToButtonValue(aValue);
345-
service->NewButtonEvent(aIndex, BUTTON_INDEX_LEFT_TRIGGER, value > BUTTON_THRESHOLD_VALUE, value);
345+
service->NewButtonEvent(aIndex, BUTTON_INDEX_LEFT_TRIGGER,
346+
value > BUTTON_THRESHOLD_VALUE, value);
346347
break;
347348
}
348349
case 5: {
349350
const double value = AxisToButtonValue(aValue);
350-
service->NewButtonEvent(aIndex, BUTTON_INDEX_RIGHT_TRIGGER, value > BUTTON_THRESHOLD_VALUE, value);
351+
service->NewButtonEvent(aIndex, BUTTON_INDEX_RIGHT_TRIGGER,
352+
value > BUTTON_THRESHOLD_VALUE, value);
351353
break;
352354
}
353355
default:
@@ -420,7 +422,8 @@ class Playstation3Remapper final : public GamepadRemapper {
420422
default:
421423
NS_WARNING(
422424
nsPrintfCString(
423-
"Axis idx '%d' doesn't support in Playstation3Remapper().", aAxis)
425+
"Axis idx '%d' doesn't support in Playstation3Remapper().",
426+
aAxis)
424427
.get());
425428
break;
426429
}
@@ -594,13 +597,13 @@ class Dualshock4Remapper final : public GamepadRemapper {
594597
const double value = AxisToButtonValue(aValue);
595598
service->NewButtonEvent(aIndex, BUTTON_INDEX_LEFT_TRIGGER,
596599
value > BUTTON_THRESHOLD_VALUE, value);
597-
break;
600+
break;
598601
}
599602
case 4: {
600603
const double value = AxisToButtonValue(aValue);
601604
service->NewButtonEvent(aIndex, BUTTON_INDEX_RIGHT_TRIGGER,
602605
value > BUTTON_THRESHOLD_VALUE, value);
603-
break;
606+
break;
604607
}
605608
case 5:
606609
service->NewAxisMoveEvent(aIndex, AXIS_INDEX_RIGHT_STICK_Y, aValue);
@@ -1723,7 +1726,8 @@ already_AddRefed<GamepadRemapper> GetGamepadRemapper(const uint16_t aVendorId,
17231726
{GamepadId::kPadixProduct2060, new IBuffaloRemapper()},
17241727
{GamepadId::kPlayComProduct0005, new XSkillsRemapper()},
17251728
{GamepadId::kPrototypeVendorProduct0667, new BoomN64PsxRemapper()},
1726-
{GamepadId::kPrototypeVendorProduct9401, new StadiaControllerOldFirmwareRemapper()},
1729+
{GamepadId::kPrototypeVendorProduct9401,
1730+
new StadiaControllerOldFirmwareRemapper()},
17271731
{GamepadId::kRazer1532Product0900, new RazerServalRemapper()},
17281732
{GamepadId::kSonyProduct0268, new Playstation3Remapper()},
17291733
{GamepadId::kSonyProduct05c4, new Dualshock4Remapper()},

dom/html/HTMLImageElement.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -751,9 +751,9 @@ nsresult HTMLImageElement::CopyInnerTo(HTMLImageElement* aDest) {
751751
// initaiated by a user interaction.
752752
mUseUrgentStartForChannel = UserActivation::IsHandlingUserInput();
753753

754-
nsContentUtils::AddScriptRunner(NewRunnableMethod<bool>(
755-
"dom::HTMLImageElement::MaybeLoadImage", aDest,
756-
&HTMLImageElement::MaybeLoadImage, false));
754+
nsContentUtils::AddScriptRunner(
755+
NewRunnableMethod<bool>("dom::HTMLImageElement::MaybeLoadImage", aDest,
756+
&HTMLImageElement::MaybeLoadImage, false));
757757
}
758758

759759
return NS_OK;

dom/media/VideoUtils.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -290,8 +290,8 @@ bool ExtractVPXCodecDetails(const nsAString& aCodec, uint8_t& aProfile,
290290
// No more than 8 fields are expected.
291291
return false;
292292
}
293-
*(fields[fieldsCount]) = static_cast<uint8_t>(
294-
(*fieldsItr).ToInteger(&rv, 10));
293+
*(fields[fieldsCount]) =
294+
static_cast<uint8_t>((*fieldsItr).ToInteger(&rv, 10));
295295
// We got invalid field value, parsing error.
296296
NS_ENSURE_SUCCESS(rv, false);
297297
}

dom/media/webaudio/AudioBuffer.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#include "AudioBuffer.h"
88
#include "mozilla/dom/AudioBufferBinding.h"
99
#include "jsfriendapi.h"
10-
#include "js/ArrayBuffer.h" // JS::StealArrayBufferContents
10+
#include "js/ArrayBuffer.h" // JS::StealArrayBufferContents
1111
#include "js/experimental/TypedData.h" // JS_NewFloat32Array, JS_GetFloat32ArrayData, JS_GetTypedArrayLength, JS_GetArrayBufferViewBuffer
1212
#include "mozilla/ErrorResult.h"
1313
#include "AudioSegment.h"

dom/script/ScriptSettings.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -708,7 +708,6 @@ AutoJSContext::AutoJSContext() : mCx(nullptr) {
708708
MOZ_ASSERT(!mCx, "mCx should not be initialized!");
709709
MOZ_ASSERT(NS_IsMainThread());
710710

711-
712711
if (dom::IsJSAPIActive()) {
713712
mCx = dom::danger::GetJSContext();
714713
} else {
@@ -722,7 +721,6 @@ AutoJSContext::operator JSContext*() const { return mCx; }
722721
AutoSafeJSContext::AutoSafeJSContext() : AutoJSAPI() {
723722
MOZ_ASSERT(NS_IsMainThread());
724723

725-
726724
DebugOnly<bool> ok = Init(xpc::UnprivilegedJunkScope());
727725
MOZ_ASSERT(ok,
728726
"This is quite odd. We should have crashed in the "

dom/simpledb/SDBConnection.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
#include "ActorsChild.h"
1010
#include "js/ArrayBuffer.h" // JS::{GetObjectAsArrayBuffer,IsArrayBufferObject}
1111
#include "js/experimental/TypedData.h" // JS_IsArrayBufferViewObject, JS_GetObjectAsArrayBufferView
12-
#include "js/RootingAPI.h" // JS::{Handle,Rooted}
13-
#include "js/Value.h" // JS::Value
12+
#include "js/RootingAPI.h" // JS::{Handle,Rooted}
13+
#include "js/Value.h" // JS::Value
1414
#include "mozilla/ipc/BackgroundChild.h"
1515
#include "mozilla/ipc/BackgroundParent.h"
1616
#include "mozilla/ipc/BackgroundUtils.h"

editor/libeditor/HTMLEditSubActionHandler.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ static bool IsStyleCachePreservingSubAction(EditSubAction aEditSubAction) {
101101
}
102102

103103
class MOZ_RAII AutoSetTemporaryAncestorLimiter final {
104-
105104
public:
106105
explicit AutoSetTemporaryAncestorLimiter(HTMLEditor& aHTMLEditor,
107106
Selection& aSelection,

gfx/config/gfxConfigManager.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ void gfxConfigManager::ConfigureWebRender() {
271271
if (mXRenderEnabled) {
272272
// XRender and WebRender don't play well together. XRender is disabled by
273273
// default. If the user opts into it don't enable webrender.
274-
mFeatureWr->ForceDisable(FeatureStatus::Blocked,"XRender is enabled",
274+
mFeatureWr->ForceDisable(FeatureStatus::Blocked, "XRender is enabled",
275275
"FEATURE_FAILURE_XRENDER"_ns);
276276
}
277277

gfx/layers/client/TextureClient.h

-1
Original file line numberDiff line numberDiff line change
@@ -784,7 +784,6 @@ class TextureClientReleaseTask : public Runnable {
784784
// Automatically lock and unlock a texture. Since texture locking is fallible,
785785
// Succeeded() must be checked on the guard object before proceeding.
786786
class MOZ_RAII TextureClientAutoLock {
787-
788787
public:
789788
TextureClientAutoLock(TextureClient* aTexture, OpenMode aMode)
790789
: mTexture(aTexture), mSucceeded(false) {

gfx/layers/wr/OMTASampler.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#include <unordered_map>
1111
#include <queue>
1212

13-
#include "base/platform_thread.h" // for PlatformThreadId
13+
#include "base/platform_thread.h" // for PlatformThreadId
1414
#include "mozilla/layers/OMTAController.h" // for OMTAController
1515
#include "mozilla/Maybe.h"
1616
#include "mozilla/StaticMutex.h"

gfx/tests/gtest/TestConfigManager.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -711,4 +711,3 @@ TEST_F(GfxConfigManager, WebRenderWhenXRenderEnabled) {
711711
EXPECT_TRUE(mFeatures.mGPUProcess.IsEnabled());
712712
EXPECT_TRUE(mFeatures.mD3D11HwAngle.IsEnabled());
713713
}
714-

image/imgRequestProxy.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -1069,7 +1069,8 @@ imgRequestProxy::GetStaticRequest(imgIRequest** aReturn) {
10691069

10701070
already_AddRefed<imgRequestProxy> imgRequestProxy::GetStaticRequest(
10711071
Document* aLoadingDocument) {
1072-
MOZ_DIAGNOSTIC_ASSERT(!aLoadingDocument || aLoadingDocument->IsStaticDocument());
1072+
MOZ_DIAGNOSTIC_ASSERT(!aLoadingDocument ||
1073+
aLoadingDocument->IsStaticDocument());
10731074
RefPtr<Image> image = GetImage();
10741075

10751076
bool animated;

image/imgRequestProxy.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,8 @@ class imgRequestProxy : public mozilla::PreloaderBase,
123123
Document* aLoadingDocument, imgRequestProxy** aClone);
124124
nsresult Clone(imgINotificationObserver* aObserver,
125125
Document* aLoadingDocument, imgRequestProxy** aClone);
126-
already_AddRefed<imgRequestProxy> GetStaticRequest(Document* aLoadingDocument);
126+
already_AddRefed<imgRequestProxy> GetStaticRequest(
127+
Document* aLoadingDocument);
127128

128129
imgRequest* GetOwner() const;
129130

ipc/glue/BackgroundChildImpl.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -139,12 +139,12 @@ void BackgroundChildImpl::ProcessingError(Result aCode, const char* aReason) {
139139
abortMessage.AssignLiteral(#_result); \
140140
break
141141

142-
HANDLE_CASE(MsgNotKnown);
143-
HANDLE_CASE(MsgNotAllowed);
144-
HANDLE_CASE(MsgPayloadError);
145-
HANDLE_CASE(MsgProcessingError);
146-
HANDLE_CASE(MsgRouteError);
147-
HANDLE_CASE(MsgValueError);
142+
HANDLE_CASE(MsgNotKnown);
143+
HANDLE_CASE(MsgNotAllowed);
144+
HANDLE_CASE(MsgPayloadError);
145+
HANDLE_CASE(MsgProcessingError);
146+
HANDLE_CASE(MsgRouteError);
147+
HANDLE_CASE(MsgValueError);
148148

149149
#undef HANDLE_CASE
150150

ipc/glue/Neutering.h

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
#ifndef mozilla_ipc_Neutering_h
88
#define mozilla_ipc_Neutering_h
99

10-
1110
/**
1211
* This header declares RAII wrappers for Window neutering. See
1312
* WindowsMessageLoop.cpp for more details.

js/src/builtin/FinalizationRegistryObject.h

+1
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ class FinalizationRegistryObject : public NativeObject {
187187
static bool cleanupQueuedRecords(JSContext* cx,
188188
HandleFinalizationRegistryObject registry,
189189
HandleObject callback = nullptr);
190+
190191
private:
191192
static const JSClassOps classOps_;
192193
static const ClassSpec classSpec_;

js/src/builtin/TestingFunctions.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
#include "js/Debug.h"
5858
#include "js/experimental/TypedData.h" // JS_GetObjectAsUint8Array
5959
#include "js/friend/DumpFunctions.h" // js::Dump{Backtrace,Heap,Object}, JS::FormatStackDump, js::IgnoreNurseryObjects
60-
#include "js/friend/WindowProxy.h" // js::ToWindowProxyIfWindow
60+
#include "js/friend/WindowProxy.h" // js::ToWindowProxyIfWindow
6161
#include "js/HashTable.h"
6262
#include "js/LocaleSensitive.h"
6363
#include "js/PropertySpec.h"

js/src/builtin/streams/StreamAPI.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111

1212
#include <stdint.h> // uint32_t, uintptr_t
1313

14-
#include "jsapi.h" // js::AssertHeapIsIdle, JS_ReportErrorNumberASCII
14+
#include "jsapi.h" // js::AssertHeapIsIdle, JS_ReportErrorNumberASCII
1515
#include "jsfriendapi.h" // js::GetErrorMessage, js::IsObjectInContextCompartment, JSMSG_*
16-
#include "jstypes.h" // JS_{FRIEND,PUBLIC}_API
16+
#include "jstypes.h" // JS_{FRIEND,PUBLIC}_API
1717

1818
#include "builtin/Stream.h" // js::ReadableByteStreamController{,Close}, js::ReadableStreamDefaultController{,Close}, js::StreamController
1919
#include "builtin/streams/ReadableStream.h" // js::ReadableStream

js/src/debugger/Debugger.cpp

-3
Original file line numberDiff line numberDiff line change
@@ -2961,7 +2961,6 @@ class MOZ_RAII ExecutionObservableRealms
29612961
// don't match.
29622962
return iter.hasUsableAbstractFramePtr() && realms_.has(iter.realm());
29632963
}
2964-
29652964
};
29662965

29672966
// Given a particular AbstractFramePtr F that has become observable, this
@@ -3025,7 +3024,6 @@ class MOZ_RAII ExecutionObservableFrame
30253024
return iter.hasUsableAbstractFramePtr() &&
30263025
iter.abstractFramePtr() == frame_;
30273026
}
3028-
30293027
};
30303028

30313029
class MOZ_RAII ExecutionObservableScript
@@ -3057,7 +3055,6 @@ class MOZ_RAII ExecutionObservableScript
30573055
return iter.hasUsableAbstractFramePtr() && !iter.isWasm() &&
30583056
iter.abstractFramePtr().script() == script_;
30593057
}
3060-
30613058
};
30623059

30633060
/* static */

js/src/debugger/NoExecute.cpp

+7-7
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@
1313
#include "jsapi.h" // for Handle
1414
#include "jsfriendapi.h" // for DumpBacktrace, GetErrorMessage
1515

16-
#include "debugger/Debugger.h" // for Debugger
17-
#include "gc/Barrier.h" // for GCPtrNativeObject
16+
#include "debugger/Debugger.h" // for Debugger
17+
#include "gc/Barrier.h" // for GCPtrNativeObject
1818
#include "js/friend/DumpFunctions.h" // for DumpBacktrace
19-
#include "js/Promise.h" // for AutoDebuggerJobQueueInterruption
20-
#include "vm/JSContext.h" // for ProtectedDataContextArg, JSContext
21-
#include "vm/JSScript.h" // for JSScript
22-
#include "vm/Realm.h" // for AutoRealm, Realm
23-
#include "vm/Warnings.h" // for WarnNumberLatin1
19+
#include "js/Promise.h" // for AutoDebuggerJobQueueInterruption
20+
#include "vm/JSContext.h" // for ProtectedDataContextArg, JSContext
21+
#include "vm/JSScript.h" // for JSScript
22+
#include "vm/Realm.h" // for AutoRealm, Realm
23+
#include "vm/Warnings.h" // for WarnNumberLatin1
2424

2525
#include "vm/Realm-inl.h" // for AutoRealm::AutoRealm
2626

0 commit comments

Comments
 (0)