Skip to content

Commit 7f60810

Browse files
committed
Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset Differential Revision: https://phabricator.services.mozilla.com/D27245 --HG-- extra : moz-landing-system : lando
1 parent 4f3f612 commit 7f60810

File tree

114 files changed

+420
-406
lines changed

Some content is hidden

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

114 files changed

+420
-406
lines changed

accessible/atk/Platform.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -310,14 +310,15 @@ bool a11y::ShouldA11yBeEnabled() {
310310

311311
// check GSettings
312312
#define GSETINGS_A11Y_INTERFACE "org.gnome.desktop.interface"
313-
#define GSETINGS_A11Y_KEY "toolkit-accessibility"
313+
#define GSETINGS_A11Y_KEY "toolkit-accessibility"
314314
nsCOMPtr<nsIGSettingsService> gsettings =
315315
do_GetService(NS_GSETTINGSSERVICE_CONTRACTID);
316316
nsCOMPtr<nsIGSettingsCollection> a11y_settings;
317317

318318
if (gsettings) {
319-
gsettings->GetCollectionForSchema(NS_LITERAL_CSTRING(GSETINGS_A11Y_INTERFACE),
320-
getter_AddRefs(a11y_settings));
319+
gsettings->GetCollectionForSchema(
320+
NS_LITERAL_CSTRING(GSETINGS_A11Y_INTERFACE),
321+
getter_AddRefs(a11y_settings));
321322
if (a11y_settings) {
322323
a11y_settings->GetBoolean(NS_LITERAL_CSTRING(GSETINGS_A11Y_KEY),
323324
&sShouldEnable);

browser/app/winlauncher/LauncherProcessWin.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -180,10 +180,10 @@ static mozilla::Maybe<bool> RunAsLauncherProcess(int& argc, wchar_t** argv) {
180180
#endif // defined(MOZ_LAUNCHER_PROCESS)
181181

182182
// We must check for force-launcher *after* we do LauncherRegistryInfo checks
183-
runAsLauncher |= mozilla::CheckArg(argc, argv, L"force-launcher",
184-
static_cast<const wchar_t**>(nullptr),
185-
mozilla::CheckArgFlag::RemoveArg) ==
186-
mozilla::ARG_FOUND;
183+
runAsLauncher |=
184+
mozilla::CheckArg(argc, argv, L"force-launcher",
185+
static_cast<const wchar_t**>(nullptr),
186+
mozilla::CheckArgFlag::RemoveArg) == mozilla::ARG_FOUND;
187187

188188
if (!runAsLauncher) {
189189
// In this case, we will be proceeding to run as the browser.

docshell/shistory/nsSHistory.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -598,9 +598,7 @@ nsSHistory::AddEntry(nsISHEntry* aSHEntry, bool aPersist) {
598598
}
599599

600600
NS_IMETHODIMP_(void)
601-
nsSHistory::ClearRootDocShell() {
602-
mRootDocShell = nullptr;
603-
}
601+
nsSHistory::ClearRootDocShell() { mRootDocShell = nullptr; }
604602

605603
/* Get size of the history list */
606604
NS_IMETHODIMP

dom/base/ImageEncoder.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -287,9 +287,9 @@ nsresult ImageEncoder::GetInputStream(int32_t aWidth, int32_t aHeight,
287287
imgIEncoder* aEncoder,
288288
const nsAString& aEncoderOptions,
289289
nsIInputStream** aStream) {
290-
nsresult rv = aEncoder->InitFromData(aImageBuffer, aWidth * aHeight * 4,
291-
aWidth, aHeight, aWidth * 4, aFormat,
292-
aEncoderOptions);
290+
nsresult rv =
291+
aEncoder->InitFromData(aImageBuffer, aWidth * aHeight * 4, aWidth,
292+
aHeight, aWidth * 4, aFormat, aEncoderOptions);
293293
NS_ENSURE_SUCCESS(rv, rv);
294294

295295
nsCOMPtr<imgIEncoder> encoder(aEncoder);
@@ -317,9 +317,9 @@ nsresult ImageEncoder::ExtractDataInternal(
317317
return NS_ERROR_INVALID_ARG;
318318
}
319319

320-
rv = ImageEncoder::GetInputStream(
321-
aSize.width, aSize.height, aImageBuffer, aFormat, aEncoder,
322-
aOptions, getter_AddRefs(imgStream));
320+
rv = ImageEncoder::GetInputStream(aSize.width, aSize.height, aImageBuffer,
321+
aFormat, aEncoder, aOptions,
322+
getter_AddRefs(imgStream));
323323
} else if (aContext && !aUsePlaceholder) {
324324
NS_ConvertUTF16toUTF8 encoderType(aType);
325325
rv = aContext->GetInputStream(encoderType.get(), aOptions,

dom/base/MaybeCrossOriginObject.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -435,9 +435,9 @@ bool MaybeCrossOriginObject<Base>::defineProperty(
435435
}
436436

437437
template <typename Base>
438-
bool MaybeCrossOriginObject<Base>::enumerate(JSContext* cx,
439-
JS::Handle<JSObject*> proxy,
440-
JS::MutableHandleVector<jsid> props) const {
438+
bool MaybeCrossOriginObject<Base>::enumerate(
439+
JSContext* cx, JS::Handle<JSObject*> proxy,
440+
JS::MutableHandleVector<jsid> props) const {
441441
// Just get the property keys from ourselves, in whatever Realm we happen to
442442
// be in. It's important to not enter the Realm of "proxy" here, because that
443443
// would affect the list of keys we claim to have. We wrap the proxy in the

dom/base/RemoteOuterWindowProxy.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,9 @@ class RemoteOuterWindowProxy
4545
JS::MutableHandleVector<jsid> aProps) const final;
4646

4747
// SpiderMonkey extensions
48-
bool getOwnEnumerablePropertyKeys(JSContext* cx, JS::Handle<JSObject*> proxy,
49-
JS::MutableHandleVector<jsid> props) const final;
48+
bool getOwnEnumerablePropertyKeys(
49+
JSContext* cx, JS::Handle<JSObject*> proxy,
50+
JS::MutableHandleVector<jsid> props) const final;
5051

5152
void NoteChildren(JSObject* aProxy,
5253
nsCycleCollectionTraversalCallback& aCb) const override {
@@ -140,9 +141,9 @@ bool AppendIndexedPropertyNames(JSContext* aCx, BrowsingContext* aContext,
140141
return true;
141142
}
142143

143-
bool RemoteOuterWindowProxy::ownPropertyKeys(JSContext* aCx,
144-
JS::Handle<JSObject*> aProxy,
145-
JS::MutableHandleVector<jsid> aProps) const {
144+
bool RemoteOuterWindowProxy::ownPropertyKeys(
145+
JSContext* aCx, JS::Handle<JSObject*> aProxy,
146+
JS::MutableHandleVector<jsid> aProps) const {
146147
BrowsingContext* bc = GetBrowsingContext(aProxy);
147148

148149
// https://html.spec.whatwg.org/multipage/window-object.html#windowproxy-ownpropertykeys:crossoriginownpropertykeys-(-o-)

dom/base/WindowNamedPropertiesHandler.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ class WindowNamedPropertiesHandler : public BaseDOMProxyHandler {
2424
JS::Handle<jsid> aId,
2525
JS::Handle<JS::PropertyDescriptor> aDesc,
2626
JS::ObjectOpResult& result) const override;
27-
virtual bool ownPropNames(JSContext* aCx, JS::Handle<JSObject*> aProxy,
28-
unsigned flags,
29-
JS::MutableHandleVector<jsid> aProps) const override;
27+
virtual bool ownPropNames(
28+
JSContext* aCx, JS::Handle<JSObject*> aProxy, unsigned flags,
29+
JS::MutableHandleVector<jsid> aProps) const override;
3030
virtual bool delete_(JSContext* aCx, JS::Handle<JSObject*> aProxy,
3131
JS::Handle<jsid> aId,
3232
JS::ObjectOpResult& aResult) const override;

dom/base/nsJSEnvironment.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -499,8 +499,8 @@ void DispatchScriptErrorEvent(nsPIDOMWindowInner* win,
499499
xpc::ErrorReport* xpcReport,
500500
JS::Handle<JS::Value> exception,
501501
JS::Handle<JSObject*> exceptionStack) {
502-
nsContentUtils::AddScriptRunner(
503-
new ScriptErrorEvent(win, rootingCx, xpcReport, exception, exceptionStack));
502+
nsContentUtils::AddScriptRunner(new ScriptErrorEvent(
503+
win, rootingCx, xpcReport, exception, exceptionStack));
504504
}
505505

506506
} /* namespace xpc */

dom/base/nsObjectLoadingContent.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3508,10 +3508,9 @@ bool nsObjectLoadingContent::MayResolve(jsid aId) {
35083508
return true;
35093509
}
35103510

3511-
void nsObjectLoadingContent::GetOwnPropertyNames(JSContext* aCx,
3512-
JS::MutableHandleVector<jsid> /* unused */,
3513-
bool /* unused */,
3514-
ErrorResult& aRv) {
3511+
void nsObjectLoadingContent::GetOwnPropertyNames(
3512+
JSContext* aCx, JS::MutableHandleVector<jsid> /* unused */,
3513+
bool /* unused */, ErrorResult& aRv) {
35153514
// Just like DoResolve, just make sure we're instantiated. That will do
35163515
// the work our Enumerate hook needs to do. This purposefully does not fire
35173516
// for xray resolves, see bug 967694

dom/base/nsObjectLoadingContent.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,8 @@ class nsObjectLoadingContent : public nsImageLoadingContent,
189189
static bool MayResolve(jsid aId);
190190

191191
// Helper for WebIDL enumeration
192-
void GetOwnPropertyNames(JSContext* aCx, JS::MutableHandleVector<jsid> /* unused */,
192+
void GetOwnPropertyNames(JSContext* aCx,
193+
JS::MutableHandleVector<jsid> /* unused */,
193194
bool /* unused */, mozilla::ErrorResult& aRv);
194195

195196
// WebIDL API

dom/bindings/BindingUtils.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1870,7 +1870,8 @@ bool XrayAppendPropertyKeys<ConstantSpec>(
18701870

18711871
bool XrayOwnPropertyKeys(JSContext* cx, JS::Handle<JSObject*> wrapper,
18721872
JS::Handle<JSObject*> obj, unsigned flags,
1873-
JS::MutableHandleVector<jsid> props, DOMObjectType type,
1873+
JS::MutableHandleVector<jsid> props,
1874+
DOMObjectType type,
18741875
const NativeProperties* nativeProperties) {
18751876
MOZ_ASSERT(type != eNamedPropertiesObject);
18761877

@@ -1902,7 +1903,8 @@ bool XrayOwnPropertyKeys(JSContext* cx, JS::Handle<JSObject*> wrapper,
19021903
bool XrayOwnNativePropertyKeys(JSContext* cx, JS::Handle<JSObject*> wrapper,
19031904
const NativePropertyHooks* nativePropertyHooks,
19041905
DOMObjectType type, JS::Handle<JSObject*> obj,
1905-
unsigned flags, JS::MutableHandleVector<jsid> props) {
1906+
unsigned flags,
1907+
JS::MutableHandleVector<jsid> props) {
19061908
MOZ_ASSERT(type != eNamedPropertiesObject);
19071909

19081910
if (type == eInterface &&
@@ -2739,7 +2741,8 @@ bool MayResolveGlobal(const JSAtomState& aNames, jsid aId,
27392741
}
27402742

27412743
bool EnumerateGlobal(JSContext* aCx, JS::HandleObject aObj,
2742-
JS::MutableHandleVector<jsid> aProperties, bool aEnumerableOnly) {
2744+
JS::MutableHandleVector<jsid> aProperties,
2745+
bool aEnumerableOnly) {
27432746
MOZ_ASSERT(JS_IsGlobalObject(aObj),
27442747
"Should have a global here, since we plan to enumerate standard "
27452748
"classes!");

dom/bindings/BindingUtils.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2192,7 +2192,8 @@ inline bool IdEquals(jsid id, const char* string) {
21922192
JS_FlatStringEqualsAscii(JSID_TO_FLAT_STRING(id), string);
21932193
}
21942194

2195-
inline bool AddStringToIDVector(JSContext* cx, JS::MutableHandleVector<jsid> vector,
2195+
inline bool AddStringToIDVector(JSContext* cx,
2196+
JS::MutableHandleVector<jsid> vector,
21962197
const char* name) {
21972198
return vector.growBy(1) &&
21982199
AtomizeAndPinJSString(cx, *(vector[vector.length() - 1]).address(),
@@ -2778,7 +2779,8 @@ bool ResolveGlobal(JSContext* aCx, JS::Handle<JSObject*> aObj,
27782779
bool MayResolveGlobal(const JSAtomState& aNames, jsid aId, JSObject* aMaybeObj);
27792780

27802781
bool EnumerateGlobal(JSContext* aCx, JS::HandleObject aObj,
2781-
JS::MutableHandleVector<jsid> aProperties, bool aEnumerableOnly);
2782+
JS::MutableHandleVector<jsid> aProperties,
2783+
bool aEnumerableOnly);
27822784

27832785
struct CreateGlobalOptionsGeneric {
27842786
static void TraceGlobal(JSTracer* aTrc, JSObject* aObj) {

dom/bindings/DOMJSProxyHandler.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -253,9 +253,9 @@ bool DOMProxyHandler::delete_(JSContext* cx, JS::Handle<JSObject*> proxy,
253253
return result.succeed();
254254
}
255255

256-
bool BaseDOMProxyHandler::ownPropertyKeys(JSContext* cx,
257-
JS::Handle<JSObject*> proxy,
258-
JS::MutableHandleVector<jsid> props) const {
256+
bool BaseDOMProxyHandler::ownPropertyKeys(
257+
JSContext* cx, JS::Handle<JSObject*> proxy,
258+
JS::MutableHandleVector<jsid> props) const {
259259
return ownPropNames(cx, proxy,
260260
JSITER_OWNONLY | JSITER_HIDDEN | JSITER_SYMBOLS, props);
261261
}
@@ -269,7 +269,8 @@ bool BaseDOMProxyHandler::getPrototypeIfOrdinary(
269269
}
270270

271271
bool BaseDOMProxyHandler::getOwnEnumerablePropertyKeys(
272-
JSContext* cx, JS::Handle<JSObject*> proxy, JS::MutableHandleVector<jsid> props) const {
272+
JSContext* cx, JS::Handle<JSObject*> proxy,
273+
JS::MutableHandleVector<jsid> props) const {
273274
return ownPropNames(cx, proxy, JSITER_OWNONLY, props);
274275
}
275276

dom/bindings/DOMJSProxyHandler.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,9 @@ class BaseDOMProxyHandler : public js::BaseProxyHandler {
5252
bool getOwnPropertyDescriptor(
5353
JSContext* cx, JS::Handle<JSObject*> proxy, JS::Handle<jsid> id,
5454
JS::MutableHandle<JS::PropertyDescriptor> desc) const override;
55-
virtual bool ownPropertyKeys(JSContext* cx, JS::Handle<JSObject*> proxy,
56-
JS::MutableHandleVector<jsid> props) const override;
55+
virtual bool ownPropertyKeys(
56+
JSContext* cx, JS::Handle<JSObject*> proxy,
57+
JS::MutableHandleVector<jsid> props) const override;
5758

5859
virtual bool getPrototypeIfOrdinary(
5960
JSContext* cx, JS::Handle<JSObject*> proxy, bool* isOrdinary,
@@ -73,7 +74,8 @@ class BaseDOMProxyHandler : public js::BaseProxyHandler {
7374
// or JSITER_OWNONLY | JSITER_HIDDEN | JSITER_SYMBOLS (for
7475
// ownPropertyKeys()).
7576
virtual bool ownPropNames(JSContext* cx, JS::Handle<JSObject*> proxy,
76-
unsigned flags, JS::MutableHandleVector<jsid> props) const = 0;
77+
unsigned flags,
78+
JS::MutableHandleVector<jsid> props) const = 0;
7779

7880
// Hook for subclasses to allow set() to ignore named props while other things
7981
// that look at property descriptors see them. This is intentionally not

dom/bindings/RemoteObjectProxy.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ bool RemoteObjectProxyBase::defineProperty(
3333
return ReportCrossOriginDenial(aCx, aId, NS_LITERAL_CSTRING("define"));
3434
}
3535

36-
bool RemoteObjectProxyBase::ownPropertyKeys(JSContext* aCx,
37-
JS::Handle<JSObject*> aProxy,
38-
JS::MutableHandleVector<jsid> aProps) const {
36+
bool RemoteObjectProxyBase::ownPropertyKeys(
37+
JSContext* aCx, JS::Handle<JSObject*> aProxy,
38+
JS::MutableHandleVector<jsid> aProps) const {
3939
// https://html.spec.whatwg.org/multipage/browsers.html#crossoriginownpropertykeys-(-o-)
4040
// step 2 and
4141
// https://html.spec.whatwg.org/multipage/browsers.html#crossoriginproperties-(-o-)

dom/bindings/RemoteObjectProxy.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@ class RemoteObjectProxyBase : public js::BaseProxyHandler,
6767
// SpiderMonkey extensions
6868
bool hasOwn(JSContext* aCx, JS::Handle<JSObject*> aProxy,
6969
JS::Handle<jsid> aId, bool* aBp) const override;
70-
bool getOwnEnumerablePropertyKeys(JSContext* aCx,
71-
JS::Handle<JSObject*> aProxy,
72-
JS::MutableHandleVector<jsid> aProps) const override;
70+
bool getOwnEnumerablePropertyKeys(
71+
JSContext* aCx, JS::Handle<JSObject*> aProxy,
72+
JS::MutableHandleVector<jsid> aProps) const override;
7373
const char* className(JSContext* aCx,
7474
JS::Handle<JSObject*> aProxy) const final;
7575

dom/bindings/WebIDLGlobalNameHash.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,8 +243,8 @@ bool WebIDLGlobalNameHash::ResolveForSystemGlobal(JSContext* aCx,
243243

244244
/* static */
245245
bool WebIDLGlobalNameHash::NewEnumerateSystemGlobal(
246-
JSContext* aCx, JS::Handle<JSObject*> aObj, JS::MutableHandleVector<jsid> aProperties,
247-
bool aEnumerableOnly) {
246+
JSContext* aCx, JS::Handle<JSObject*> aObj,
247+
JS::MutableHandleVector<jsid> aProperties, bool aEnumerableOnly) {
248248
MOZ_ASSERT(JS_IsGlobalObject(aObj));
249249

250250
if (!JS_NewEnumerateStandardClasses(aCx, aObj, aProperties,

dom/bindings/WebIDLGlobalNameHash.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,18 +59,18 @@ class WebIDLGlobalNameHash {
5959
};
6060
// Returns false if an exception has been thrown on aCx.
6161
static bool GetNames(JSContext* aCx, JS::Handle<JSObject*> aObj,
62-
NameType aNameType, JS::MutableHandleVector<jsid> aNames);
62+
NameType aNameType,
63+
JS::MutableHandleVector<jsid> aNames);
6364

6465
// Helpers for resolving & enumerating names on the system global.
6566
// NOTE: These are distinct as it currently lacks a ProtoAndIfaceCache, and is
6667
// an XPCOM global.
6768
static bool ResolveForSystemGlobal(JSContext* aCx, JS::Handle<JSObject*> aObj,
6869
JS::Handle<jsid> aId, bool* aResolvedp);
6970

70-
static bool NewEnumerateSystemGlobal(JSContext* aCx,
71-
JS::Handle<JSObject*> aObj,
72-
JS::MutableHandleVector<jsid> aProperties,
73-
bool aEnumerableOnly);
71+
static bool NewEnumerateSystemGlobal(
72+
JSContext* aCx, JS::Handle<JSObject*> aObj,
73+
JS::MutableHandleVector<jsid> aProperties, bool aEnumerableOnly);
7474

7575
private:
7676
friend struct WebIDLNameTableEntry;

0 commit comments

Comments
 (0)