Skip to content

Commit

Permalink
Bug 1119268 - Mark virtual overridden functions as MOZ_OVERRIDE in mi…
Browse files Browse the repository at this point in the history
…sc code; r=bsmedberg
  • Loading branch information
ehsan committed Jan 12, 2015
1 parent a02f830 commit e156f47
Show file tree
Hide file tree
Showing 9 changed files with 65 additions and 65 deletions.
4 changes: 2 additions & 2 deletions caps/nsNullPrincipalURI.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ class nsNullPrincipalURI MOZ_FINAL : public nsIURI
NS_DECL_NSIURI

// nsISizeOf
virtual size_t SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf) const;
virtual size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const;
virtual size_t SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf) const MOZ_OVERRIDE;
virtual size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const MOZ_OVERRIDE;

explicit nsNullPrincipalURI(const nsCString &aSpec);

Expand Down
72 changes: 36 additions & 36 deletions caps/nsPrincipal.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,25 +49,25 @@ class nsPrincipal MOZ_FINAL : public nsBasePrincipal
public:
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_NSISERIALIZABLE
NS_IMETHOD Equals(nsIPrincipal* other, bool* _retval);
NS_IMETHOD EqualsConsideringDomain(nsIPrincipal* other, bool* _retval);
NS_IMETHOD GetHashValue(uint32_t* aHashValue);
NS_IMETHOD GetURI(nsIURI** aURI);
NS_IMETHOD GetDomain(nsIURI** aDomain);
NS_IMETHOD SetDomain(nsIURI* aDomain);
NS_IMETHOD GetOrigin(char** aOrigin);
NS_IMETHOD Subsumes(nsIPrincipal* other, bool* _retval);
NS_IMETHOD SubsumesConsideringDomain(nsIPrincipal* other, bool* _retval);
NS_IMETHOD CheckMayLoad(nsIURI* uri, bool report, bool allowIfInheritsPrincipal);
NS_IMETHOD GetJarPrefix(nsACString& aJarPrefix);
NS_IMETHOD GetAppStatus(uint16_t* aAppStatus);
NS_IMETHOD GetAppId(uint32_t* aAppStatus);
NS_IMETHOD GetIsInBrowserElement(bool* aIsInBrowserElement);
NS_IMETHOD GetUnknownAppId(bool* aUnknownAppId);
NS_IMETHOD GetIsNullPrincipal(bool* aIsNullPrincipal);
NS_IMETHOD GetBaseDomain(nsACString& aBaseDomain);
NS_IMETHOD Equals(nsIPrincipal* other, bool* _retval) MOZ_OVERRIDE;
NS_IMETHOD EqualsConsideringDomain(nsIPrincipal* other, bool* _retval) MOZ_OVERRIDE;
NS_IMETHOD GetHashValue(uint32_t* aHashValue) MOZ_OVERRIDE;
NS_IMETHOD GetURI(nsIURI** aURI) MOZ_OVERRIDE;
NS_IMETHOD GetDomain(nsIURI** aDomain) MOZ_OVERRIDE;
NS_IMETHOD SetDomain(nsIURI* aDomain) MOZ_OVERRIDE;
NS_IMETHOD GetOrigin(char** aOrigin) MOZ_OVERRIDE;
NS_IMETHOD Subsumes(nsIPrincipal* other, bool* _retval) MOZ_OVERRIDE;
NS_IMETHOD SubsumesConsideringDomain(nsIPrincipal* other, bool* _retval) MOZ_OVERRIDE;
NS_IMETHOD CheckMayLoad(nsIURI* uri, bool report, bool allowIfInheritsPrincipal) MOZ_OVERRIDE;
NS_IMETHOD GetJarPrefix(nsACString& aJarPrefix) MOZ_OVERRIDE;
NS_IMETHOD GetAppStatus(uint16_t* aAppStatus) MOZ_OVERRIDE;
NS_IMETHOD GetAppId(uint32_t* aAppStatus) MOZ_OVERRIDE;
NS_IMETHOD GetIsInBrowserElement(bool* aIsInBrowserElement) MOZ_OVERRIDE;
NS_IMETHOD GetUnknownAppId(bool* aUnknownAppId) MOZ_OVERRIDE;
NS_IMETHOD GetIsNullPrincipal(bool* aIsNullPrincipal) MOZ_OVERRIDE;
NS_IMETHOD GetBaseDomain(nsACString& aBaseDomain) MOZ_OVERRIDE;
#ifdef DEBUG
virtual void dumpImpl();
virtual void dumpImpl() MOZ_OVERRIDE;
#endif

nsPrincipal();
Expand Down Expand Up @@ -132,25 +132,25 @@ class nsExpandedPrincipal : public nsIExpandedPrincipal, public nsBasePrincipal
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_NSIEXPANDEDPRINCIPAL
NS_DECL_NSISERIALIZABLE
NS_IMETHOD Equals(nsIPrincipal* other, bool* _retval);
NS_IMETHOD EqualsConsideringDomain(nsIPrincipal* other, bool* _retval);
NS_IMETHOD GetHashValue(uint32_t* aHashValue);
NS_IMETHOD GetURI(nsIURI** aURI);
NS_IMETHOD GetDomain(nsIURI** aDomain);
NS_IMETHOD SetDomain(nsIURI* aDomain);
NS_IMETHOD GetOrigin(char** aOrigin);
NS_IMETHOD Subsumes(nsIPrincipal* other, bool* _retval);
NS_IMETHOD SubsumesConsideringDomain(nsIPrincipal* other, bool* _retval);
NS_IMETHOD CheckMayLoad(nsIURI* uri, bool report, bool allowIfInheritsPrincipal);
NS_IMETHOD GetJarPrefix(nsACString& aJarPrefix);
NS_IMETHOD GetAppStatus(uint16_t* aAppStatus);
NS_IMETHOD GetAppId(uint32_t* aAppStatus);
NS_IMETHOD GetIsInBrowserElement(bool* aIsInBrowserElement);
NS_IMETHOD GetUnknownAppId(bool* aUnknownAppId);
NS_IMETHOD GetIsNullPrincipal(bool* aIsNullPrincipal);
NS_IMETHOD GetBaseDomain(nsACString& aBaseDomain);
NS_IMETHOD Equals(nsIPrincipal* other, bool* _retval) MOZ_OVERRIDE;
NS_IMETHOD EqualsConsideringDomain(nsIPrincipal* other, bool* _retval) MOZ_OVERRIDE;
NS_IMETHOD GetHashValue(uint32_t* aHashValue) MOZ_OVERRIDE;
NS_IMETHOD GetURI(nsIURI** aURI) MOZ_OVERRIDE;
NS_IMETHOD GetDomain(nsIURI** aDomain) MOZ_OVERRIDE;
NS_IMETHOD SetDomain(nsIURI* aDomain) MOZ_OVERRIDE;
NS_IMETHOD GetOrigin(char** aOrigin) MOZ_OVERRIDE;
NS_IMETHOD Subsumes(nsIPrincipal* other, bool* _retval) MOZ_OVERRIDE;
NS_IMETHOD SubsumesConsideringDomain(nsIPrincipal* other, bool* _retval) MOZ_OVERRIDE;
NS_IMETHOD CheckMayLoad(nsIURI* uri, bool report, bool allowIfInheritsPrincipal) MOZ_OVERRIDE;
NS_IMETHOD GetJarPrefix(nsACString& aJarPrefix) MOZ_OVERRIDE;
NS_IMETHOD GetAppStatus(uint16_t* aAppStatus) MOZ_OVERRIDE;
NS_IMETHOD GetAppId(uint32_t* aAppStatus) MOZ_OVERRIDE;
NS_IMETHOD GetIsInBrowserElement(bool* aIsInBrowserElement) MOZ_OVERRIDE;
NS_IMETHOD GetUnknownAppId(bool* aUnknownAppId) MOZ_OVERRIDE;
NS_IMETHOD GetIsNullPrincipal(bool* aIsNullPrincipal) MOZ_OVERRIDE;
NS_IMETHOD GetBaseDomain(nsACString& aBaseDomain) MOZ_OVERRIDE;
#ifdef DEBUG
virtual void dumpImpl();
virtual void dumpImpl() MOZ_OVERRIDE;
#endif

virtual void GetScriptLocation(nsACString &aStr) MOZ_OVERRIDE;
Expand Down
10 changes: 5 additions & 5 deletions docshell/base/IHistory.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,14 +132,14 @@ NS_DEFINE_STATIC_IID_ACCESSOR(IHistory, IHISTORY_IID)

#define NS_DECL_IHISTORY \
NS_IMETHOD RegisterVisitedCallback(nsIURI *aURI, \
mozilla::dom::Link *aContent); \
mozilla::dom::Link *aContent) MOZ_OVERRIDE; \
NS_IMETHOD UnregisterVisitedCallback(nsIURI *aURI, \
mozilla::dom::Link *aContent); \
mozilla::dom::Link *aContent) MOZ_OVERRIDE; \
NS_IMETHOD VisitURI(nsIURI *aURI, \
nsIURI *aLastVisitedURI, \
uint32_t aFlags); \
NS_IMETHOD SetURITitle(nsIURI* aURI, const nsAString& aTitle); \
NS_IMETHOD NotifyVisited(nsIURI* aURI);
uint32_t aFlags) MOZ_OVERRIDE; \
NS_IMETHOD SetURITitle(nsIURI* aURI, const nsAString& aTitle) MOZ_OVERRIDE; \
NS_IMETHOD NotifyVisited(nsIURI* aURI) MOZ_OVERRIDE;

} // namespace mozilla

Expand Down
4 changes: 2 additions & 2 deletions dom/audiochannel/tests/TestAudioChannelService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,14 @@ class Agent : public nsIAudioChannelAgentCallback,
return mAgent->SetVisibilityState(visible);
}

NS_IMETHODIMP CanPlayChanged(int32_t canPlay)
NS_IMETHODIMP CanPlayChanged(int32_t canPlay) MOZ_OVERRIDE
{
mCanPlay = static_cast<AudioChannelState>(canPlay);
mWaitCallback = false;
return NS_OK;
}

NS_IMETHODIMP WindowVolumeChanged()
NS_IMETHODIMP WindowVolumeChanged() MOZ_OVERRIDE
{
return NS_OK;
}
Expand Down
2 changes: 1 addition & 1 deletion extensions/cookie/nsPermissionManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ class AppClearDataObserver MOZ_FINAL : public nsIObserver {

// nsIObserver implementation.
NS_IMETHODIMP
Observe(nsISupports *aSubject, const char *aTopic, const char16_t *data)
Observe(nsISupports *aSubject, const char *aTopic, const char16_t *data) MOZ_OVERRIDE
{
MOZ_ASSERT(!nsCRT::strcmp(aTopic, "webapps-clear-data"));

Expand Down
12 changes: 6 additions & 6 deletions extensions/universalchardet/src/xpcom/nsUdetXPCOMWrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ class nsXPCOMDetector :
NS_DECL_ISUPPORTS
public:
nsXPCOMDetector();
NS_IMETHOD Init(nsICharsetDetectionObserver* aObserver);
NS_IMETHOD DoIt(const char* aBuf, uint32_t aLen, bool *oDontFeedMe);
NS_IMETHOD Done();
NS_IMETHOD Init(nsICharsetDetectionObserver* aObserver) MOZ_OVERRIDE;
NS_IMETHOD DoIt(const char* aBuf, uint32_t aLen, bool *oDontFeedMe) MOZ_OVERRIDE;
NS_IMETHOD Done() MOZ_OVERRIDE;
protected:
virtual ~nsXPCOMDetector();
virtual void Report(const char* aCharset);
virtual void Report(const char* aCharset) MOZ_OVERRIDE;
private:
nsCOMPtr<nsICharsetDetectionObserver> mObserver;
};
Expand All @@ -49,10 +49,10 @@ class nsXPCOMStringDetector :
public:
nsXPCOMStringDetector();
NS_IMETHOD DoIt(const char* aBuf, uint32_t aLen,
const char** oCharset, nsDetectionConfident &oConf);
const char** oCharset, nsDetectionConfident &oConf) MOZ_OVERRIDE;
protected:
virtual ~nsXPCOMStringDetector();
virtual void Report(const char* aCharset);
virtual void Report(const char* aCharset) MOZ_OVERRIDE;
private:
nsCOMPtr<nsICharsetDetectionObserver> mObserver;
const char* mResult;
Expand Down
18 changes: 9 additions & 9 deletions hal/sandbox/SandboxHal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ class HalParent : public PHalParent
return true;
}

void Notify(const NetworkInformation& aNetworkInfo) {
void Notify(const NetworkInformation& aNetworkInfo) MOZ_OVERRIDE {
unused << SendNotifyNetworkChange(aNetworkInfo);
}

Expand Down Expand Up @@ -612,7 +612,7 @@ class HalParent : public PHalParent
return true;
}

void Notify(const ScreenConfiguration& aScreenConfiguration) {
void Notify(const ScreenConfiguration& aScreenConfiguration) MOZ_OVERRIDE {
unused << SendNotifyScreenConfigurationChange(aScreenConfiguration);
}

Expand Down Expand Up @@ -778,7 +778,7 @@ class HalParent : public PHalParent
return true;
}

void Notify(const SensorData& aSensorData) {
void Notify(const SensorData& aSensorData) MOZ_OVERRIDE {
unused << SendNotifySensorChange(aSensorData);
}

Expand Down Expand Up @@ -817,7 +817,7 @@ class HalParent : public PHalParent
return true;
}

void Notify(const WakeLockInformation& aWakeLockInfo)
void Notify(const WakeLockInformation& aWakeLockInfo) MOZ_OVERRIDE
{
unused << SendNotifyWakeLockChange(aWakeLockInfo);
}
Expand All @@ -837,7 +837,7 @@ class HalParent : public PHalParent
return true;
}

void Notify(const SwitchEvent& aSwitchEvent)
void Notify(const SwitchEvent& aSwitchEvent) MOZ_OVERRIDE
{
unused << SendNotifySwitchChange(aSwitchEvent);
}
Expand All @@ -850,12 +850,12 @@ class HalParent : public PHalParent
return true;
}

void Notify(const int64_t& aClockDeltaMS)
void Notify(const int64_t& aClockDeltaMS) MOZ_OVERRIDE
{
unused << SendNotifySystemClockChange(aClockDeltaMS);
}

void Notify(const SystemTimezoneChangeInformation& aSystemTimezoneChangeInfo)
void Notify(const SystemTimezoneChangeInformation& aSystemTimezoneChangeInfo) MOZ_OVERRIDE
{
unused << SendNotifySystemTimezoneChange(aSystemTimezoneChangeInfo);
}
Expand Down Expand Up @@ -938,14 +938,14 @@ class HalChild : public PHalChild {
}

virtual bool
RecvNotifySystemClockChange(const int64_t& aClockDeltaMS) {
RecvNotifySystemClockChange(const int64_t& aClockDeltaMS) MOZ_OVERRIDE {
hal::NotifySystemClockChange(aClockDeltaMS);
return true;
}

virtual bool
RecvNotifySystemTimezoneChange(
const SystemTimezoneChangeInformation& aSystemTimezoneChangeInfo) {
const SystemTimezoneChangeInformation& aSystemTimezoneChangeInfo) MOZ_OVERRIDE {
hal::NotifySystemTimezoneChange(aSystemTimezoneChangeInfo);
return true;
}
Expand Down
2 changes: 1 addition & 1 deletion image/src/MultipartImage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class NextPartObserver : public IProgressObserver
{
public:
MOZ_DECLARE_REFCOUNTED_TYPENAME(NextPartObserver)
NS_INLINE_DECL_REFCOUNTING(NextPartObserver)
NS_INLINE_DECL_REFCOUNTING(NextPartObserver, MOZ_OVERRIDE)

explicit NextPartObserver(MultipartImage* aOwner)
: mOwner(aOwner)
Expand Down
6 changes: 3 additions & 3 deletions storage/test/test_async_callbacks_with_spun_event_loops.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class UnownedCallback MOZ_FINAL : public mozIStorageStatementCallback
}

public:
NS_IMETHOD HandleResult(mozIStorageResultSet* aResultSet)
NS_IMETHOD HandleResult(mozIStorageResultSet* aResultSet) MOZ_OVERRIDE
{
sResult = true;
spin_events_loop_until_true(&mCompleted);
Expand All @@ -68,7 +68,7 @@ class UnownedCallback MOZ_FINAL : public mozIStorageStatementCallback
return NS_OK;
}

NS_IMETHOD HandleError(mozIStorageError* aError)
NS_IMETHOD HandleError(mozIStorageError* aError) MOZ_OVERRIDE
{
sError = true;
spin_events_loop_until_true(&mCompleted);
Expand All @@ -78,7 +78,7 @@ class UnownedCallback MOZ_FINAL : public mozIStorageStatementCallback
return NS_OK;
}

NS_IMETHOD HandleCompletion(uint16_t aReason)
NS_IMETHOD HandleCompletion(uint16_t aReason) MOZ_OVERRIDE
{
mCompleted = true;
return NS_OK;
Expand Down

0 comments on commit e156f47

Please sign in to comment.