Bug 1118803 - Mark virtual overridden functions as MOZ_OVERRIDE in misc DOM code; r=baku

This commit is contained in:
Ehsan Akhgari 2015-01-07 12:00:44 -05:00
parent ed5599ee91
commit abb608a46d
21 changed files with 56 additions and 52 deletions

View File

@ -34,10 +34,10 @@ public:
static already_AddRefed<AlarmHalService> GetInstance();
// Implementing hal::AlarmObserver
void Notify(const void_t& aVoid);
void Notify(const void_t& aVoid) MOZ_OVERRIDE;
// Implementing hal::SystemTimezoneChangeObserver
void Notify(const hal::SystemTimezoneChangeInformation& aSystemTimezoneChangeInfo);
void Notify(const hal::SystemTimezoneChangeInformation& aSystemTimezoneChangeInfo) MOZ_OVERRIDE;
private:
virtual ~AlarmHalService();

View File

@ -33,7 +33,7 @@ public:
void Shutdown();
// For IObserver.
void Notify(const hal::BatteryInformation& aBatteryInfo);
void Notify(const hal::BatteryInformation& aBatteryInfo) MOZ_OVERRIDE;
/**
* WebIDL Interface

View File

@ -54,18 +54,18 @@ public:
protected:
~FallbackCameraControl();
virtual nsresult StartPreviewImpl() { return NS_ERROR_NOT_INITIALIZED; }
virtual nsresult StopPreviewImpl() { return NS_ERROR_NOT_INITIALIZED; }
virtual nsresult AutoFocusImpl() { return NS_ERROR_NOT_INITIALIZED; }
virtual nsresult StartFaceDetectionImpl() { return NS_ERROR_NOT_INITIALIZED; }
virtual nsresult StopFaceDetectionImpl() { return NS_ERROR_NOT_INITIALIZED; }
virtual nsresult TakePictureImpl() { return NS_ERROR_NOT_INITIALIZED; }
virtual nsresult StartPreviewImpl() MOZ_OVERRIDE { return NS_ERROR_NOT_INITIALIZED; }
virtual nsresult StopPreviewImpl() MOZ_OVERRIDE { return NS_ERROR_NOT_INITIALIZED; }
virtual nsresult AutoFocusImpl() MOZ_OVERRIDE { return NS_ERROR_NOT_INITIALIZED; }
virtual nsresult StartFaceDetectionImpl() MOZ_OVERRIDE { return NS_ERROR_NOT_INITIALIZED; }
virtual nsresult StopFaceDetectionImpl() MOZ_OVERRIDE { return NS_ERROR_NOT_INITIALIZED; }
virtual nsresult TakePictureImpl() MOZ_OVERRIDE { return NS_ERROR_NOT_INITIALIZED; }
virtual nsresult StartRecordingImpl(DeviceStorageFileDescriptor* aFileDescriptor,
const StartRecordingOptions* aOptions = nullptr) MOZ_OVERRIDE
{ return NS_ERROR_NOT_INITIALIZED; }
virtual nsresult StopRecordingImpl() { return NS_ERROR_NOT_INITIALIZED; }
virtual nsresult PushParametersImpl() { return NS_ERROR_NOT_INITIALIZED; }
virtual nsresult PullParametersImpl() { return NS_ERROR_NOT_INITIALIZED; }
virtual nsresult StopRecordingImpl() MOZ_OVERRIDE { return NS_ERROR_NOT_INITIALIZED; }
virtual nsresult PushParametersImpl() MOZ_OVERRIDE { return NS_ERROR_NOT_INITIALIZED; }
virtual nsresult PullParametersImpl() MOZ_OVERRIDE { return NS_ERROR_NOT_INITIALIZED; }
private:
FallbackCameraControl(const FallbackCameraControl&) MOZ_DELETE;

View File

@ -28,11 +28,11 @@ private:
// MOZ_FINAL suppresses -Werror,-Wdelete-non-virtual-dtor
~CellBroadcastParent() {};
virtual void ActorDestroy(ActorDestroyReason aWhy);
virtual void ActorDestroy(ActorDestroyReason aWhy) MOZ_OVERRIDE;
};
} // namespace cellbroadcast
} // namespace dom
} // namespace mozilla
#endif // mozilla_dom_cellbroadcast_CellBroadcastParent_h
#endif // mozilla_dom_cellbroadcast_CellBroadcastParent_h

View File

@ -139,7 +139,7 @@ public:
SECKEYPublicKey* GetPublicKey() const;
// For nsNSSShutDownObject
virtual void virtualDestroyNSSReference();
virtual void virtualDestroyNSSReference() MOZ_OVERRIDE;
void destructorSafeDestroyNSSReference();
// Serialization and deserialization convenience methods

View File

@ -2104,12 +2104,14 @@ private:
return NS_OK;
}
virtual void Resolve() {
virtual void Resolve() MOZ_OVERRIDE
{
mKey->SetSymKey(mKeyData);
mResultPromise->MaybeResolve(mKey);
}
virtual void Cleanup() {
virtual void Cleanup() MOZ_OVERRIDE
{
mKey = nullptr;
}
};
@ -2744,7 +2746,8 @@ private:
return NS_OK;
}
virtual void Resolve() MOZ_OVERRIDE {
virtual void Resolve() MOZ_OVERRIDE
{
mTask->SetData(mResult);
mTask->DispatchWithPromise(mResultPromise);
mResolved = true;
@ -2777,7 +2780,8 @@ private:
nsRefPtr<ImportKeyTask> mTask;
bool mResolved;
virtual void Resolve() MOZ_OVERRIDE {
virtual void Resolve() MOZ_OVERRIDE
{
mTask->SetKeyData(KeyEncryptTask::mResult);
mTask->DispatchWithPromise(KeyEncryptTask::mResultPromise);
mResolved = true;

View File

@ -2202,21 +2202,21 @@ nsDOMDeviceStorageCursor::GetTypes(nsIArray** aTypes)
}
NS_IMETHODIMP
nsDOMDeviceStorageCursor::GetPrincipal(nsIPrincipal * *aRequestingPrincipal)
nsDOMDeviceStorageCursor::GetPrincipal(nsIPrincipal** aRequestingPrincipal)
{
NS_IF_ADDREF(*aRequestingPrincipal = mPrincipal);
return NS_OK;
}
NS_IMETHODIMP
nsDOMDeviceStorageCursor::GetWindow(nsIDOMWindow * *aRequestingWindow)
nsDOMDeviceStorageCursor::GetWindow(nsIDOMWindow** aRequestingWindow)
{
NS_IF_ADDREF(*aRequestingWindow = GetOwner());
return NS_OK;
}
NS_IMETHODIMP
nsDOMDeviceStorageCursor::GetElement(nsIDOMElement * *aRequestingElement)
nsDOMDeviceStorageCursor::GetElement(nsIDOMElement** aRequestingElement)
{
*aRequestingElement = nullptr;
return NS_OK;
@ -2900,7 +2900,7 @@ public:
NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(DeviceStorageRequest,
nsIContentPermissionRequest)
NS_IMETHOD Run()
NS_IMETHOD Run() MOZ_OVERRIDE
{
MOZ_ASSERT(NS_IsMainThread());
@ -2912,7 +2912,7 @@ public:
return nsContentPermissionUtils::AskPermission(this, mWindow);
}
NS_IMETHODIMP GetTypes(nsIArray** aTypes)
NS_IMETHODIMP GetTypes(nsIArray** aTypes) MOZ_OVERRIDE
{
nsCString type;
nsresult rv =
@ -2932,25 +2932,25 @@ public:
return nsContentPermissionUtils::CreatePermissionArray(type, access, emptyOptions, aTypes);
}
NS_IMETHOD GetPrincipal(nsIPrincipal * *aRequestingPrincipal)
NS_IMETHOD GetPrincipal(nsIPrincipal * *aRequestingPrincipal) MOZ_OVERRIDE
{
NS_IF_ADDREF(*aRequestingPrincipal = mPrincipal);
return NS_OK;
}
NS_IMETHOD GetWindow(nsIDOMWindow * *aRequestingWindow)
NS_IMETHOD GetWindow(nsIDOMWindow * *aRequestingWindow) MOZ_OVERRIDE
{
NS_IF_ADDREF(*aRequestingWindow = mWindow);
return NS_OK;
}
NS_IMETHOD GetElement(nsIDOMElement * *aRequestingElement)
NS_IMETHOD GetElement(nsIDOMElement * *aRequestingElement) MOZ_OVERRIDE
{
*aRequestingElement = nullptr;
return NS_OK;
}
NS_IMETHOD Cancel()
NS_IMETHOD Cancel() MOZ_OVERRIDE
{
nsCOMPtr<nsIRunnable> event
= new PostErrorEvent(mRequest.forget(),
@ -2958,7 +2958,7 @@ public:
return NS_DispatchToMainThread(event);
}
NS_IMETHOD Allow(JS::HandleValue aChoices)
NS_IMETHOD Allow(JS::HandleValue aChoices) MOZ_OVERRIDE
{
MOZ_ASSERT(NS_IsMainThread());
MOZ_ASSERT(aChoices.isUndefined());

View File

@ -133,7 +133,7 @@ public:
MOZ_COUNT_CTOR(GeolocationSettingsCallback);
}
NS_IMETHOD Handle(const nsAString& aName, JS::Handle<JS::Value> aResult)
NS_IMETHOD Handle(const nsAString& aName, JS::Handle<JS::Value> aResult) MOZ_OVERRIDE
{
MOZ_ASSERT(NS_IsMainThread());
@ -159,7 +159,7 @@ public:
return NS_OK;
}
NS_IMETHOD HandleError(const nsAString& aName)
NS_IMETHOD HandleError(const nsAString& aName) MOZ_OVERRIDE
{
if (aName.EqualsASCII(GEO_SETTINGS_ENABLED)) {
GPSLOG("Unable to get value for '" GEO_SETTINGS_ENABLED "'");

View File

@ -5210,7 +5210,7 @@ public:
void
NoteBackgroundThread(nsIEventTarget* aBackgroundThread);
NS_INLINE_DECL_REFCOUNTING(QuotaClient)
NS_INLINE_DECL_REFCOUNTING(QuotaClient, MOZ_OVERRIDE)
virtual mozilla::dom::quota::Client::Type
GetType() MOZ_OVERRIDE;

View File

@ -36,7 +36,7 @@ protected:
}
virtual void
ActorDestroy(ActorDestroyReason why);
ActorDestroy(ActorDestroyReason aWhy) MOZ_OVERRIDE;
virtual bool
RecvPMobileConnectionRequestConstructor(PMobileConnectionRequestParent* aActor,
@ -152,7 +152,7 @@ protected:
}
virtual void
ActorDestroy(ActorDestroyReason why);
ActorDestroy(ActorDestroyReason aWhy) MOZ_OVERRIDE;
nsresult
SendReply(const MobileConnectionReply& aReply);

View File

@ -44,7 +44,7 @@ protected:
}
virtual void
ActorDestroy(ActorDestroyReason why);
ActorDestroy(ActorDestroyReason aWhy) MOZ_OVERRIDE;
virtual bool
RecvPSmsRequestConstructor(PSmsRequestParent* aActor,

View File

@ -37,7 +37,7 @@ public:
void Shutdown();
// For IObserver
void Notify(const hal::NetworkInformation& aNetworkInfo);
void Notify(const hal::NetworkInformation& aNetworkInfo) MOZ_OVERRIDE;
// WebIDL

View File

@ -52,7 +52,7 @@ public:
TCPSocketParent() {}
virtual bool RecvOpen(const nsString& aHost, const uint16_t& aPort,
const bool& useSSL, const nsString& aBinaryType);
const bool& useSSL, const nsString& aBinaryType) MOZ_OVERRIDE;
virtual bool RecvStartTLS() MOZ_OVERRIDE;
virtual bool RecvSuspend() MOZ_OVERRIDE;

View File

@ -150,9 +150,9 @@ class AlertServiceObserver: public nsIObserver
void Disconnect() { mNotification = nullptr; }
NS_IMETHODIMP
Observe(nsISupports *aSubject,
const char *aTopic,
const char16_t *aData)
Observe(nsISupports* aSubject,
const char* aTopic,
const char16_t* aData) MOZ_OVERRIDE
{
// forward to parent

View File

@ -64,7 +64,7 @@ public:
const nsAString& aIcon,
const nsAString& aData,
const nsAString& aBehavior,
JSContext* aCx)
JSContext* aCx) MOZ_OVERRIDE
{
MOZ_ASSERT(!aID.IsEmpty());
@ -99,7 +99,7 @@ public:
return NS_OK;
}
NS_IMETHOD Done(JSContext* aCx)
NS_IMETHOD Done(JSContext* aCx) MOZ_OVERRIDE
{
JSAutoCompartment ac(aCx, mGlobal);
JS::Rooted<JS::Value> result(aCx, JS::ObjectValue(*mNotifications));

View File

@ -35,7 +35,7 @@ public:
void Init();
// Implement WakeLockObserver
void Notify(const hal::WakeLockInformation& aWakeLockInfo);
void Notify(const hal::WakeLockInformation& aWakeLockInfo) MOZ_OVERRIDE;
/**
* Acquire a wake lock on behalf of a given process (aContentParent).

View File

@ -225,7 +225,7 @@ public:
{ }
NS_IMETHOD
Run();
Run() MOZ_OVERRIDE;
void
AdvanceState()
@ -299,7 +299,7 @@ public:
nsIUsageCallback* aCallback);
NS_IMETHOD
Run();
Run() MOZ_OVERRIDE;
void
AdvanceState()
@ -369,7 +369,7 @@ public:
{ }
NS_IMETHOD
Run();
Run() MOZ_OVERRIDE;
void
AdvanceState()

View File

@ -33,7 +33,7 @@ public:
nsDeviceSensors();
void Notify(const mozilla::hal::SensorData& aSensorData);
void Notify(const mozilla::hal::SensorData& aSensorData) MOZ_OVERRIDE;
private:
virtual ~nsDeviceSensors();

View File

@ -26,7 +26,7 @@ protected:
virtual ~TelephonyParent() {}
virtual void
ActorDestroy(ActorDestroyReason why);
ActorDestroy(ActorDestroyReason aWhy) MOZ_OVERRIDE;
virtual bool
RecvPTelephonyRequestConstructor(PTelephonyRequestParent* aActor, const IPCTelephonyRequest& aRequest) MOZ_OVERRIDE;
@ -98,7 +98,7 @@ protected:
virtual ~TelephonyRequestParent() {}
virtual void
ActorDestroy(ActorDestroyReason why);
ActorDestroy(ActorDestroyReason aWhy) MOZ_OVERRIDE;
nsresult
SendResponse(const IPCTelephonyResponse& aResponse);

View File

@ -42,7 +42,7 @@ public:
{
return mWindow;
}
JSObject* WrapObject(JSContext* aCx);
virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE;
void Set(Date& aDate);
void Set(double aTime);

View File

@ -196,7 +196,7 @@ public:
{}
NS_IMETHODIMP
Notify(nsITimer* aTimer)
Notify(nsITimer* aTimer) MOZ_OVERRIDE
{
// Notify mock EIT broadcasting.
nsITVProgramData** programDataList =
@ -242,7 +242,7 @@ public:
{}
NS_IMETHODIMP
Notify(nsITimer* aTimer)
Notify(nsITimer* aTimer) MOZ_OVERRIDE
{
return mSourceListener->NotifyChannelScanComplete(mTunerId, mSourceType);
}