Skip to content

Commit e7f10a0

Browse files
committed
Bug 1293603 (part 2) - Make Run() declarations consistent. r=erahm.
This patch makes most Run() declarations in subclasses of nsIRunnable have the same form: |NS_IMETHOD Run() override|. As a result of these changes, I had to add |override| to a couple of other functions to satisfy clang's -Winconsistent-missing-override warning. --HG-- extra : rebase_source : 815d0018b0b13329bb5698c410f500dddcc3ee12
1 parent 9dc11c1 commit e7f10a0

File tree

255 files changed

+443
-445
lines changed

Some content is hidden

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

255 files changed

+443
-445
lines changed

docshell/base/nsDocShell.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9605,7 +9605,7 @@ class InternalLoadEvent : public Runnable
96059605
}
96069606

96079607
NS_IMETHOD
9608-
Run()
9608+
Run() override
96099609
{
96109610
return mDocShell->InternalLoad(mURI, mOriginalURI,
96119611
mLoadReplace,
@@ -13684,7 +13684,7 @@ class OnLinkClickEvent : public Runnable
1368413684
nsIInputStream* aHeadersDataStream,
1368513685
bool aIsTrusted);
1368613686

13687-
NS_IMETHOD Run()
13687+
NS_IMETHOD Run() override
1368813688
{
1368913689
nsAutoPopupStatePusher popupStatePusher(mPopupState);
1369013690

docshell/shistory/nsSHEntryShared.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ class DestroyViewerEvent : public mozilla::Runnable
257257
{
258258
}
259259

260-
NS_IMETHOD Run()
260+
NS_IMETHOD Run() override
261261
{
262262
if (mViewer) {
263263
mViewer->Destroy();

dom/audiochannel/AudioChannelService.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ class AudioPlaybackRunnable final : public Runnable
112112
, mReason(aReason)
113113
{}
114114

115-
NS_IMETHOD Run()
115+
NS_IMETHOD Run() override
116116
{
117117
nsCOMPtr<nsIObserverService> observerService =
118118
services::GetObserverService();

dom/base/DOMRequest.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -321,8 +321,8 @@ class FireSuccessAsyncTask : public mozilla::Runnable
321321
return NS_OK;
322322
}
323323

324-
NS_IMETHODIMP
325-
Run()
324+
NS_IMETHOD
325+
Run() override
326326
{
327327
mReq->FireSuccess(JS::Handle<JS::Value>::fromMarkedLocation(mResult.address()));
328328
return NS_OK;
@@ -343,8 +343,8 @@ class FireErrorAsyncTask : public mozilla::Runnable
343343
{
344344
}
345345

346-
NS_IMETHODIMP
347-
Run()
346+
NS_IMETHOD
347+
Run() override
348348
{
349349
mReq->FireError(mError);
350350
return NS_OK;

dom/base/FragmentOrElement.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1276,7 +1276,7 @@ class ContentUnbinder : public Runnable
12761276
}
12771277
}
12781278

1279-
NS_IMETHOD Run()
1279+
NS_IMETHOD Run() override
12801280
{
12811281
nsAutoScriptBlocker scriptBlocker;
12821282
uint32_t len = mSubtreeRoots.Length();

dom/base/ImageEncoder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class SurfaceHelper : public Runnable {
3333

3434
// It retrieves a SourceSurface reference and convert color format on main
3535
// thread and passes DataSourceSurface to caller thread.
36-
NS_IMETHOD Run() {
36+
NS_IMETHOD Run() override {
3737
// It guarantees the reference will be released on main thread.
3838
nsCountedRef<nsMainThreadSourceSurfaceRef> surface;
3939
surface.own(mImage->GetAsSourceSurface().take());

dom/base/ImportManager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ class AsyncEvent : public Runnable {
389389
MOZ_ASSERT(mNode);
390390
}
391391

392-
NS_IMETHOD Run() {
392+
NS_IMETHOD Run() override {
393393
return nsContentUtils::DispatchTrustedEvent(mNode->OwnerDoc(),
394394
mNode,
395395
mSuccess ? NS_LITERAL_STRING("load")

dom/base/WebSocket.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ class CallDispatchConnectionCloseEvents final : public CancelableRunnable
271271
aWebSocketImpl->AssertIsOnTargetThread();
272272
}
273273

274-
NS_IMETHOD Run()
274+
NS_IMETHOD Run() override
275275
{
276276
mWebSocketImpl->AssertIsOnTargetThread();
277277
mWebSocketImpl->DispatchConnectionCloseEvents();

dom/base/nsContentUtils.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4858,7 +4858,7 @@ class AnonymousContentDestroyer : public Runnable {
48584858
mParent = mContent->GetParent();
48594859
mDoc = mContent->OwnerDoc();
48604860
}
4861-
NS_IMETHOD Run() {
4861+
NS_IMETHOD Run() override {
48624862
mContent->UnbindFromTree();
48634863
return NS_OK;
48644864
}

dom/base/nsDOMMutationObserver.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -860,7 +860,7 @@ nsDOMMutationObserver::HandleMutation()
860860
class AsyncMutationHandler : public mozilla::Runnable
861861
{
862862
public:
863-
NS_IMETHOD Run()
863+
NS_IMETHOD Run() override
864864
{
865865
nsDOMMutationObserver::HandleMutations();
866866
return NS_OK;

dom/base/nsDocument.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1360,7 +1360,7 @@ class nsIDocument::SelectorCacheKeyDeleter final : public Runnable
13601360
}
13611361

13621362
public:
1363-
NS_IMETHOD Run()
1363+
NS_IMETHOD Run() override
13641364
{
13651365
return NS_OK;
13661366
}
@@ -9105,7 +9105,7 @@ nsDocument::UnblockOnload(bool aFireSync)
91059105
class nsUnblockOnloadEvent : public Runnable {
91069106
public:
91079107
explicit nsUnblockOnloadEvent(nsDocument* aDoc) : mDoc(aDoc) {}
9108-
NS_IMETHOD Run() {
9108+
NS_IMETHOD Run() override {
91099109
mDoc->DoUnblockOnload();
91109110
return NS_OK;
91119111
}
@@ -9990,7 +9990,7 @@ class nsDelayedEventDispatcher : public Runnable
99909990
}
99919991
virtual ~nsDelayedEventDispatcher() {}
99929992

9993-
NS_IMETHOD Run()
9993+
NS_IMETHOD Run() override
99949994
{
99959995
FireOrClearDelayedEvents(mDocuments, true);
99969996
return NS_OK;
@@ -11445,7 +11445,7 @@ class nsCallRequestFullScreen : public Runnable
1144511445
explicit nsCallRequestFullScreen(UniquePtr<FullscreenRequest>&& aRequest)
1144611446
: mRequest(Move(aRequest)) { }
1144711447

11448-
NS_IMETHOD Run()
11448+
NS_IMETHOD Run() override
1144911449
{
1145011450
mRequest->GetDocument()->RequestFullScreen(Move(mRequest));
1145111451
return NS_OK;

dom/base/nsFocusManager.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1995,7 +1995,7 @@ class FocusBlurEvent : public Runnable
19951995
{
19961996
}
19971997

1998-
NS_IMETHOD Run()
1998+
NS_IMETHOD Run() override
19991999
{
20002000
InternalFocusEvent event(true, mEventMessage);
20012001
event.mFlags.mBubbles = false;
@@ -3490,7 +3490,7 @@ class PointerUnlocker : public Runnable
34903490
}
34913491
}
34923492

3493-
NS_IMETHOD Run()
3493+
NS_IMETHOD Run() override
34943494
{
34953495
if (PointerUnlocker::sActiveUnlocker == this) {
34963496
PointerUnlocker::sActiveUnlocker = nullptr;

dom/base/nsFrameLoader.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2741,7 +2741,7 @@ class nsAsyncMessageToChild : public nsSameProcessAsyncMessageBase,
27412741
{
27422742
}
27432743

2744-
NS_IMETHOD Run()
2744+
NS_IMETHOD Run() override
27452745
{
27462746
nsInProcessTabChildGlobal* tabChild =
27472747
static_cast<nsInProcessTabChildGlobal*>(mFrameLoader->mChildMessageManager.get());

dom/base/nsFrameMessageManager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1917,7 +1917,7 @@ class nsAsyncMessageToSameProcessChild : public nsSameProcessAsyncMessageBase,
19171917
nsAsyncMessageToSameProcessChild(JSContext* aCx, JS::Handle<JSObject*> aCpows)
19181918
: nsSameProcessAsyncMessageBase(aCx, aCpows)
19191919
{ }
1920-
NS_IMETHOD Run()
1920+
NS_IMETHOD Run() override
19211921
{
19221922
nsFrameMessageManager* ppm = nsFrameMessageManager::GetChildProcessManager();
19231923
ReceiveMessage(static_cast<nsIContentFrameMessageManager*>(ppm), nullptr, ppm);

dom/base/nsFrameMessageManager.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ class nsFrameMessageManager final : public nsIContentFrameMessageManager,
320320

321321
class MyAsyncMessage : public nsSameProcessAsyncMessageBase, public Runnable
322322
{
323-
NS_IMETHOD Run() {
323+
NS_IMETHOD Run() override {
324324
ReceiveMessage(..., ...);
325325
return NS_OK;
326326
}

dom/base/nsGlobalWindow.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8481,7 +8481,7 @@ class nsCloseEvent : public Runnable {
84818481
return rv;
84828482
}
84838483

8484-
NS_IMETHOD Run() {
8484+
NS_IMETHOD Run() override {
84858485
if (mWindow) {
84868486
if (mIndirect) {
84878487
return PostCloseEvent(mWindow, false);
@@ -8851,7 +8851,7 @@ class nsPendingTimeoutRunner : public Runnable
88518851
NS_ASSERTION(mWindow, "mWindow is null.");
88528852
}
88538853

8854-
NS_IMETHOD Run()
8854+
NS_IMETHOD Run() override
88558855
{
88568856
nsGlobalWindow::RunPendingTimeoutsRecursive(mWindow, mWindow);
88578857

@@ -8952,7 +8952,7 @@ class WindowDestroyedEvent : public Runnable
89528952
mWindow = do_GetWeakReference(aWindow);
89538953
}
89548954

8955-
NS_IMETHOD Run()
8955+
NS_IMETHOD Run() override
89568956
{
89578957
nsCOMPtr<nsIObserverService> observerService =
89588958
services::GetObserverService();
@@ -9378,7 +9378,7 @@ class ChildCommandDispatcher : public Runnable
93789378
const nsAString& aAction)
93799379
: mWindow(aWindow), mTabChild(aTabChild), mAction(aAction) {}
93809380

9381-
NS_IMETHOD Run()
9381+
NS_IMETHOD Run() override
93829382
{
93839383
nsCOMPtr<nsPIWindowRoot> root = mWindow->GetTopWindowRoot();
93849384
if (!root) {
@@ -9407,7 +9407,7 @@ class CommandDispatcher : public Runnable
94079407
const nsAString& aAction)
94089408
: mDispatcher(aDispatcher), mAction(aAction) {}
94099409

9410-
NS_IMETHOD Run()
9410+
NS_IMETHOD Run() override
94119411
{
94129412
return mDispatcher->UpdateCommands(mAction);
94139413
}
@@ -10199,7 +10199,7 @@ class HashchangeCallback : public Runnable
1019910199
mNewURL.Assign(aNewURL);
1020010200
}
1020110201

10202-
NS_IMETHOD Run()
10202+
NS_IMETHOD Run() override
1020310203
{
1020410204
NS_PRECONDITION(NS_IsMainThread(), "Should be called on the main thread.");
1020510205
return mWindow->FireHashchange(mOldURL, mNewURL);
@@ -10804,7 +10804,7 @@ class NotifyIdleObserverRunnable : public Runnable
1080410804
mCallOnidle(aCallOnidle)
1080510805
{ }
1080610806

10807-
NS_IMETHOD Run()
10807+
NS_IMETHOD Run() override
1080810808
{
1080910809
if (mIdleWindow->ContainsIdleObserver(mIdleObserver, mTimeInS)) {
1081010810
return mCallOnidle ? mIdleObserver->Onidle() : mIdleObserver->Onactive();

dom/base/nsInProcessTabChildGlobal.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ class nsAsyncScriptLoad : public Runnable
311311
bool aRunInGlobalScope)
312312
: mTabChild(aTabChild), mURL(aURL), mRunInGlobalScope(aRunInGlobalScope) {}
313313

314-
NS_IMETHOD Run()
314+
NS_IMETHOD Run() override
315315
{
316316
mTabChild->LoadFrameScript(mURL, mRunInGlobalScope);
317317
return NS_OK;

dom/base/nsJSEnvironment.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ class ScriptErrorEvent : public Runnable
430430
, mError(aRuntime, aError)
431431
{}
432432

433-
NS_IMETHOD Run()
433+
NS_IMETHOD Run() override
434434
{
435435
nsEventStatus status = nsEventStatus_eIgnore;
436436
nsPIDOMWindowInner* win = mWindow;

dom/base/nsScriptLoader.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1196,7 +1196,7 @@ class nsScriptRequestProcessor : public Runnable
11961196
: mLoader(aLoader)
11971197
, mRequest(aRequest)
11981198
{}
1199-
NS_IMETHODIMP Run()
1199+
NS_IMETHOD Run() override
12001200
{
12011201
return mLoader->ProcessRequest(mRequest);
12021202
}

dom/bluetooth/bluedroid/BluetoothOppManager.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ class BluetoothOppManager::SendSocketDataTask final : public Runnable
112112
MOZ_ASSERT(!NS_IsMainThread());
113113
}
114114

115-
NS_IMETHOD Run()
115+
NS_IMETHOD Run() override
116116
{
117117
MOZ_ASSERT(NS_IsMainThread());
118118

@@ -137,7 +137,7 @@ class BluetoothOppManager::ReadFileTask final : public Runnable
137137
mAvailablePacketSize = aRemoteMaxPacketSize - kPutRequestHeaderSize;
138138
}
139139

140-
NS_IMETHOD Run()
140+
NS_IMETHOD Run() override
141141
{
142142
MOZ_ASSERT(!NS_IsMainThread());
143143

dom/bluetooth/bluez/BluetoothDBusService.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,7 @@ class SinkPropertyChangedHandler : public Runnable
577577
}
578578

579579
NS_IMETHOD
580-
Run()
580+
Run() override
581581
{
582582
MOZ_ASSERT(NS_IsMainThread());
583583
MOZ_ASSERT(mSignal.name().EqualsLiteral("PropertyChanged"));
@@ -607,7 +607,7 @@ class InputPropertyChangedHandler : public Runnable
607607
}
608608

609609
NS_IMETHOD
610-
Run()
610+
Run() override
611611
{
612612
MOZ_ASSERT(NS_IsMainThread());
613613
MOZ_ASSERT(mSignal.name().EqualsLiteral("PropertyChanged"));
@@ -1736,7 +1736,7 @@ class PrepareAdapterRunnable : public Runnable
17361736
PrepareAdapterRunnable()
17371737
{ }
17381738

1739-
NS_IMETHOD Run()
1739+
NS_IMETHOD Run() override
17401740
{
17411741
MOZ_ASSERT(NS_IsMainThread());
17421742

@@ -2149,7 +2149,7 @@ class StartDBusConnectionTask : public Runnable
21492149
class StartBluetoothRunnable final : public Runnable
21502150
{
21512151
public:
2152-
NS_IMETHOD Run()
2152+
NS_IMETHOD Run() override
21532153
{
21542154
// This could block. It should never be run on the main thread.
21552155
MOZ_ASSERT(!NS_IsMainThread()); // BT thread
@@ -2216,7 +2216,7 @@ BluetoothDBusService::StartInternal(BluetoothReplyRunnable* aRunnable)
22162216
class DisableBluetoothRunnable final : public Runnable
22172217
{
22182218
public:
2219-
NS_IMETHOD Run()
2219+
NS_IMETHOD Run() override
22202220
{
22212221
if (NS_IsMainThread()) {
22222222
// Clear |sControllerArray| here while we're on the main thread
@@ -2309,7 +2309,7 @@ class DeleteDBusConnectionTask final : public Runnable
23092309
class StopBluetoothRunnable final : public Runnable
23102310
{
23112311
public:
2312-
NS_IMETHOD Run()
2312+
NS_IMETHOD Run() override
23132313
{
23142314
MOZ_ASSERT(!NS_IsMainThread()); // BT thread
23152315

@@ -3551,8 +3551,8 @@ class OnUpdateSdpRecordsRunnable : public Runnable
35513551
MOZ_ASSERT(mManager);
35523552
}
35533553

3554-
nsresult
3555-
Run()
3554+
NS_IMETHOD
3555+
Run() override
35563556
{
35573557
MOZ_ASSERT(NS_IsMainThread());
35583558

@@ -3583,7 +3583,7 @@ class OnGetServiceChannelRunnable : public Runnable
35833583
MOZ_ASSERT(aManager);
35843584
}
35853585

3586-
NS_IMETHOD Run()
3586+
NS_IMETHOD Run() override
35873587
{
35883588
MOZ_ASSERT(NS_IsMainThread());
35893589

dom/bluetooth/bluez/BluetoothOppManager.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ class SendSocketDataTask : public Runnable
107107
MOZ_ASSERT(!NS_IsMainThread());
108108
}
109109

110-
NS_IMETHOD Run()
110+
NS_IMETHOD Run() override
111111
{
112112
MOZ_ASSERT(NS_IsMainThread());
113113

@@ -132,7 +132,7 @@ class ReadFileTask : public Runnable
132132
mAvailablePacketSize = aRemoteMaxPacketSize - kPutRequestHeaderSize;
133133
}
134134

135-
NS_IMETHOD Run()
135+
NS_IMETHOD Run() override
136136
{
137137
MOZ_ASSERT(!NS_IsMainThread());
138138

0 commit comments

Comments
 (0)