Skip to content

Commit a893959

Browse files
committed
Bug 1182996 - Fix and add missing namespace comments. rs=ehsan
The bulk of this commit was generated by running: run-clang-tidy.py \ -checks='-*,llvm-namespace-comment' \ -header-filter=^/.../mozilla-central/.* \ -fix
1 parent e4231f7 commit a893959

File tree

1,709 files changed

+3141
-2926
lines changed

Some content is hidden

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

1,709 files changed

+3141
-2926
lines changed

accessible/generic/OuterDocAccessible.h

+1
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ Accessible::AsOuterDoc()
5252
{
5353
return IsOuterDoc() ? static_cast<OuterDocAccessible*>(this) : nullptr;
5454
}
55+
5556
} // namespace a11y
5657
} // namespace mozilla
5758

accessible/windows/msaa/AccessibleWrap.h

+1
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,7 @@ WrapperFor(ProxyAccessible* aProxy)
223223
{
224224
return reinterpret_cast<AccessibleWrap*>(aProxy->GetWrapper());
225225
}
226+
226227
} // namespace a11y
227228
} // namespace mozilla
228229

browser/components/migration/nsIEHistoryEnumerator.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ namespace {
3737
return PR_ImplodeTime(&prt);
3838
}
3939

40-
} // Anonymous namespace.
40+
} // namespace
4141

4242
////////////////////////////////////////////////////////////////////////////////
4343
//// nsIEHistoryEnumerator

caps/BasePrincipal.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ class MOZ_STACK_CLASS PopulateFromSuffixIterator final
108108
OriginAttributes* mOriginAttributes;
109109
};
110110

111-
} // anonymous namespace
111+
} // namespace
112112

113113
bool
114114
OriginAttributes::PopulateFromSuffix(const nsACString& aStr)

caps/DomainPolicy.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ namespace mozilla {
1515

1616
namespace ipc {
1717
class URIParams;
18-
};
18+
} // namespace ipc
1919

2020
enum DomainSetChangeType{
2121
ACTIVATE_POLICY,

caps/nsScriptSecurityManager.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class nsSystemPrincipal;
2424

2525
namespace mozilla {
2626
class OriginAttributes;
27-
}
27+
} // namespace mozilla
2828

2929
/////////////////////////////
3030
// nsScriptSecurityManager //

chrome/RegistryMessageUtils.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,6 @@ struct ParamTraits<OverrideMapping>
197197
}
198198
};
199199

200-
}
200+
} // namespace IPC
201201

202202
#endif // RegistryMessageUtils_h

chrome/nsChromeRegistryChrome.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
namespace mozilla {
1616
namespace dom {
1717
class PContentParent;
18-
}
19-
}
18+
} // namespace dom
19+
} // namespace mozilla
2020

2121
class nsIPrefBranch;
2222
struct ChromePackage;

docshell/base/IHistory.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ namespace mozilla {
1515

1616
namespace dom {
1717
class Link;
18-
}
18+
} // namespace dom
1919

2020
// 0057c9d3-b98e-4933-bdc5-0275d06705e1
2121
#define IHISTORY_IID \

docshell/base/nsDocShell.cpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -8420,7 +8420,8 @@ class MOZ_STACK_CLASS PresentationEventForgetter
84208420
mRestorePresentationEvent;
84218421
nsRefPtr<nsDocShell::RestorePresentationEvent> mEvent;
84228422
};
8423-
}
8423+
8424+
} // namespace
84248425

84258426
nsresult
84268427
nsDocShell::RestoreFromHistory()
@@ -9448,7 +9449,7 @@ class nsCopyFaviconCallback final : public nsIFaviconDataCallback
94489449
NS_IMPL_ISUPPORTS(nsCopyFaviconCallback, nsIFaviconDataCallback)
94499450
#endif
94509451

9451-
} // anonymous namespace
9452+
} // namespace
94529453

94539454
void
94549455
nsDocShell::CopyFavicon(nsIURI* aOldURI,

docshell/base/nsDocShell.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@
6060
namespace mozilla {
6161
namespace dom {
6262
class EventTarget;
63-
}
64-
}
63+
} // namespace dom
64+
} // namespace mozilla
6565

6666
class nsDocShell;
6767
class nsDOMNavigationTiming;

docshell/shistory/nsSHEntryShared.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ namespace {
2727

2828
uint64_t gSHEntrySharedID = 0;
2929

30-
} // anonymous namespace
30+
} // namespace
3131

3232
#define CONTENT_VIEWER_TIMEOUT_SECONDS "browser.sessionhistory.contentViewerTimeout"
3333
// Default this to time out unused content viewers after 30 minutes

docshell/shistory/nsSHistory.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ EvictContentViewerForTransaction(nsISHTransaction* aTrans)
227227
}
228228
}
229229

230-
} // anonymous namespace
230+
} // namespace
231231

232232
nsSHistory::nsSHistory()
233233
: mIndex(-1)
@@ -1046,7 +1046,7 @@ class TransactionAndDistance
10461046
int32_t mDistance;
10471047
};
10481048

1049-
} // anonymous namespace
1049+
} // namespace
10501050

10511051
// static
10521052
void

dom/alarm/AlarmHalService.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,6 @@ AlarmHalService::Notify(const int64_t& aClockDeltaMS)
116116
mSystemClockChangedCb->OnSystemClockChanged(aClockDeltaMS);
117117
}
118118

119-
} // alarm
120-
} // dom
121-
} // mozilla
119+
} // namespace alarm
120+
} // namespace dom
121+
} // namespace mozilla

dom/animation/AnimationTimeline.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ namespace {
2828
AnimationTimeline* mTimeline;
2929
#endif
3030
};
31-
}
31+
} // namespace
3232

3333
static PLDHashOperator
3434
AppendAnimationToSequence(nsRefPtrHashKey<dom::Animation>* aKey,

dom/asmjscache/AsmJSCache.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1618,7 +1618,7 @@ OpenFile(nsIPrincipal* aPrincipal,
16181618
return JS::AsmJSCache_Success;
16191619
}
16201620

1621-
} // anonymous namespace
1621+
} // namespace
16221622

16231623
typedef uint32_t AsmJSCookieType;
16241624
static const uint32_t sAsmJSCookie = 0x600d600d;

dom/asmjscache/AsmJSCache.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ namespace dom {
1919

2020
namespace quota {
2121
class Client;
22-
}
22+
} // namespace quota
2323

2424
namespace asmjscache {
2525

dom/audiochannel/AudioChannelAgent.h

+1
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,5 @@ class AudioChannelAgent : public nsIAudioChannelAgent
6565
} // namespace dom
6666
} // namespace mozilla
6767

68+
6869
#endif

dom/base/AnonymousContent.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -138,5 +138,5 @@ AnonymousContent::WrapObject(JSContext* aCx,
138138
return AnonymousContentBinding::Wrap(aCx, this, aGivenProto, aReflector);
139139
}
140140

141-
} // dom namespace
142-
} // mozilla namespace
141+
} // namespace dom
142+
} // namespace mozilla

dom/base/AnonymousContent.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class AnonymousContent final
5858
nsCOMPtr<Element> mContentNode;
5959
};
6060

61-
} // dom namespace
62-
} // mozilla namespace
61+
} // namespace dom
62+
} // namespace mozilla
6363

6464
#endif // mozilla_dom_AnonymousContent_h

dom/base/BlobSet.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ class BlobSet {
8383
uint64_t mDataBufferLen;
8484
};
8585

86-
} // dom namespace
87-
} // mozilla namespace
86+
} // namespace dom
87+
} // namespace mozilla
8888

8989
#endif // mozilla_dom_BlobSet_h

dom/base/ChildIterator.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -345,5 +345,6 @@ AllChildrenIterator::GetNextChild()
345345

346346
return nullptr;
347347
}
348+
348349
} // namespace dom
349350
} // namespace mozilla

dom/base/ChromeUtils.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,6 @@ ChromeUtils::OriginAttributesToSuffix(dom::GlobalObject& aGlobal,
2828
OriginAttributes attrs(aAttrs);
2929
attrs.CreateSuffix(aSuffix);
3030
}
31+
3132
} // namespace dom
3233
} // namespace mozilla

dom/base/ChromeUtils.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ namespace mozilla {
1616

1717
namespace devtools {
1818
class HeapSnapshot;
19-
}
19+
} // namespace devtools
2020

2121
namespace dom {
2222

dom/base/Console.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1469,7 +1469,7 @@ FlushOutput(JSContext* aCx, Sequence<JS::Value>& aSequence, nsString &aOutput)
14691469
return true;
14701470
}
14711471

1472-
} // anonymous namespace
1472+
} // namespace
14731473

14741474
bool
14751475
Console::ProcessArguments(JSContext* aCx,

dom/base/Console.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ class Console final : public nsIObserver
221221
friend class ConsoleProfileRunnable;
222222
};
223223

224-
} // dom namespace
225-
} // mozilla namespace
224+
} // namespace dom
225+
} // namespace mozilla
226226

227227
#endif /* mozilla_dom_Console_h */

dom/base/DOMMatrix.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ class DOMMatrix final : public DOMMatrixReadOnly
248248
void Ensure3DMatrix();
249249
};
250250

251-
}
252-
}
251+
} // namespace dom
252+
} // namespace mozilla
253253

254254
#endif /*MOZILLA_DOM_DOMMATRIX_H_*/

dom/base/DOMPoint.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class DOMPoint final : public DOMPointReadOnly
7373
void SetW(double aW) { mW = aW; }
7474
};
7575

76-
}
77-
}
76+
} // namespace dom
77+
} // namespace mozilla
7878

7979
#endif /*MOZILLA_DOMPOINT_H_*/

dom/base/DOMQuad.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class DOMQuad final : public nsWrapperCache
6565
mutable nsRefPtr<QuadBounds> mBounds; // allocated lazily
6666
};
6767

68-
}
69-
}
68+
} // namespace dom
69+
} // namespace mozilla
7070

7171
#endif /*MOZILLA_DOMRECT_H_*/

dom/base/DOMRect.h

+2-3
Original file line numberDiff line numberDiff line change
@@ -210,8 +210,7 @@ class DOMRectList final : public nsIDOMClientRectList,
210210
nsCOMPtr<nsISupports> mParent;
211211
};
212212

213-
}
214-
215-
}
213+
} // namespace dom
214+
} // namespace mozilla
216215

217216
#endif /*MOZILLA_DOMRECT_H_*/

dom/base/ElementInlines.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Element::UnregisterActivityObserver()
2525
OwnerDoc()->UnregisterActivityObserver(this);
2626
}
2727

28-
}
29-
}
28+
} // namespace dom
29+
} // namespace mozilla
3030

3131
#endif // mozilla_dom_ElementInlines_h

dom/base/File.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1333,5 +1333,5 @@ BlobSet::AppendBlobImpls(const nsTArray<nsRefPtr<BlobImpl>>& aBlobImpls)
13331333
return NS_OK;
13341334
}
13351335

1336-
} // dom namespace
1337-
} // mozilla namespace
1336+
} // namespace dom
1337+
} // namespace mozilla

dom/base/File.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ namespace dom {
4242

4343
namespace indexedDB {
4444
class FileInfo;
45-
};
45+
} // namespace indexedDB
4646

4747
struct BlobPropertyBag;
4848
struct ChromeFilePropertyBag;
@@ -1038,7 +1038,7 @@ class FileList final : public nsIDOMFileList,
10381038
nsCOMPtr<nsISupports> mParent;
10391039
};
10401040

1041-
} // dom namespace
1042-
} // file namespace
1041+
} // namespace dom
1042+
} // namespace mozilla
10431043

10441044
#endif // mozilla_dom_File_h

dom/base/FragmentOrElement.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -2335,7 +2335,7 @@ class StringBuilder
23352335
uint32_t mLength;
23362336
};
23372337

2338-
} // anonymous namespace
2338+
} // namespace
23392339

23402340
static void
23412341
AppendEncodedCharacters(const nsTextFragment* aText, StringBuilder& aBuilder)

dom/base/FragmentOrElement.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ class nsIURI;
3535
namespace mozilla {
3636
namespace dom {
3737
class Element;
38-
}
39-
}
38+
} // namespace dom
39+
} // namespace mozilla
4040

4141
/**
4242
* A class that implements nsIWeakReference

dom/base/ImageEncoder.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ namespace mozilla {
2020

2121
namespace layers {
2222
class Image;
23-
}
23+
} // namespace layers
2424

2525
namespace dom {
2626

dom/base/Navigator.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -778,7 +778,7 @@ VibrateWindowListener::RemoveListener()
778778
true /* use capture */);
779779
}
780780

781-
} // anonymous namespace
781+
} // namespace
782782

783783
void
784784
Navigator::AddIdleObserver(MozIdleObserver& aIdleObserver, ErrorResult& aRv)

dom/base/Navigator.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ class WakeLock;
4141
class ArrayBufferViewOrBlobOrStringOrFormData;
4242
struct MobileIdOptions;
4343
class ServiceWorkerContainer;
44-
}
45-
}
44+
} // namespace dom
45+
} // namespace mozilla
4646

4747
//*****************************************************************************
4848
// Navigator: Script "navigator" object
@@ -75,7 +75,7 @@ class MozGetUserMediaDevicesSuccessCallback;
7575

7676
namespace network {
7777
class Connection;
78-
} // namespace Connection;
78+
} // namespace network
7979

8080
#ifdef MOZ_B2G_BT
8181
namespace bluetooth {

0 commit comments

Comments
 (0)