bug 1133075 - add more MOZ_OVERRIDE r=froydnj, waldo, jrmuizel

This commit is contained in:
Trevor Saunders 2015-01-15 20:04:42 -05:00
parent 3a998abd7b
commit 8dedc8cddc
11 changed files with 45 additions and 32 deletions

View File

@ -194,7 +194,10 @@ public:
: mColor(aColor)
{}
virtual PatternType GetType() const { return PatternType::COLOR; }
virtual PatternType GetType() const MOZ_OVERRIDE
{
return PatternType::COLOR;
}
Color mColor;
};
@ -219,7 +222,10 @@ public:
{
}
virtual PatternType GetType() const { return PatternType::LINEAR_GRADIENT; }
virtual PatternType GetType() const MOZ_OVERRIDE
{
return PatternType::LINEAR_GRADIENT;
}
Point mBegin; //!< Start of the linear gradient
Point mEnd; /**< End of the linear gradient - NOTE: In the case
@ -256,7 +262,10 @@ public:
{
}
virtual PatternType GetType() const { return PatternType::RADIAL_GRADIENT; }
virtual PatternType GetType() const MOZ_OVERRIDE
{
return PatternType::RADIAL_GRADIENT;
}
Point mCenter1; //!< Center of the inner (focal) circle.
Point mCenter2; //!< Center of the outer circle.
@ -286,7 +295,10 @@ public:
, mSamplingRect(aSamplingRect)
{}
virtual PatternType GetType() const { return PatternType::SURFACE; }
virtual PatternType GetType() const MOZ_OVERRIDE
{
return PatternType::SURFACE;
}
RefPtr<SourceSurface> mSurface; //!< Surface to use for drawing
ExtendMode mExtendMode; /**< This determines how the image is extended
@ -383,7 +395,7 @@ public:
READ_WRITE
};
virtual SurfaceType GetType() const { return SurfaceType::DATA; }
virtual SurfaceType GetType() const MOZ_OVERRIDE { return SurfaceType::DATA; }
/** @deprecated
* Get the raw bitmap data of the surface.
* Can return null if there was OOM allocating surface data.
@ -415,7 +427,7 @@ public:
* Returns a DataSourceSurface with the same data as this one, but
* guaranteed to have surface->GetType() == SurfaceType::DATA.
*/
virtual TemporaryRef<DataSourceSurface> GetDataSurface();
virtual TemporaryRef<DataSourceSurface> GetDataSurface() MOZ_OVERRIDE;
protected:
bool mIsMapped;

View File

@ -57,7 +57,7 @@ class GenericRefCounted : public GenericRefCountedBase
}
public:
virtual void AddRef() {
virtual void AddRef() MOZ_OVERRIDE {
// Note: this method must be thread safe for GenericAtomicRefCounted.
MOZ_ASSERT(int32_t(refCnt) >= 0);
#ifndef MOZ_REFCOUNTED_LEAK_CHECKING
@ -71,7 +71,7 @@ class GenericRefCounted : public GenericRefCountedBase
#endif
}
virtual void Release() {
virtual void Release() MOZ_OVERRIDE {
// Note: this method must be thread safe for GenericAtomicRefCounted.
MOZ_ASSERT(int32_t(refCnt) > 0);
#ifndef MOZ_REFCOUNTED_LEAK_CHECKING

View File

@ -42,9 +42,9 @@ class InjectionDelegate {
// An implementation of the InjectionDelegate interface using the file
// descriptor table of the current process as the domain.
class FileDescriptorTableInjection : public InjectionDelegate {
bool Duplicate(int* result, int fd);
bool Move(int src, int dest);
void Close(int fd);
virtual bool Duplicate(int* result, int fd) MOZ_OVERRIDE;
virtual bool Move(int src, int dest) MOZ_OVERRIDE;
virtual void Close(int fd) MOZ_OVERRIDE;
};
// A single arc of the directed graph which describes an injective multimapping.

View File

@ -176,7 +176,7 @@ public:
// arbitrary MessageLoop to Quit.
class QuitTask : public Task {
public:
virtual void Run() {
virtual void Run() MOZ_OVERRIDE {
MessageLoop::current()->Quit();
}
};
@ -396,9 +396,9 @@ public:
int delay_ms, bool nestable);
// base::MessagePump::Delegate methods:
virtual bool DoWork();
virtual bool DoDelayedWork(base::TimeTicks* next_delayed_work_time);
virtual bool DoIdleWork();
virtual bool DoWork() MOZ_OVERRIDE;
virtual bool DoDelayedWork(base::TimeTicks* next_delayed_work_time) MOZ_OVERRIDE;
virtual bool DoIdleWork() MOZ_OVERRIDE;
Type type_;
int32_t id_;

View File

@ -133,10 +133,10 @@ class MessagePumpLibevent : public MessagePump {
// MessagePump methods:
virtual void Run(Delegate* delegate);
virtual void Quit();
virtual void ScheduleWork();
virtual void ScheduleDelayedWork(const TimeTicks& delayed_work_time);
virtual void Run(Delegate* delegate) MOZ_OVERRIDE;
virtual void Quit() MOZ_OVERRIDE;
virtual void ScheduleWork() MOZ_OVERRIDE;
virtual void ScheduleDelayedWork(const TimeTicks& delayed_work_time) MOZ_OVERRIDE;
protected:
@ -204,9 +204,9 @@ protected:
*/
virtual void OnError() {}
virtual void OnLineRead(int aFd, nsDependentCSubstring& aMessage) = 0;
virtual void OnFileCanWriteWithoutBlocking(int /* aFd */) {}
virtual void OnFileCanWriteWithoutBlocking(int /* aFd */) MOZ_OVERRIDE {}
private:
virtual void OnFileCanReadWithoutBlocking(int aFd) MOZ_FINAL;
virtual void OnFileCanReadWithoutBlocking(int aFd) MOZ_FINAL MOZ_OVERRIDE;
nsAutoPtr<char> mReceiveBuffer;
int mReceivedIndex;

View File

@ -98,7 +98,7 @@ class Channel : public Message::Sender {
//
// If you Send() a message on a Close()'d channel, we delete the message
// immediately.
virtual bool Send(Message* message);
virtual bool Send(Message* message) MOZ_OVERRIDE;
// Unsound_IsClosed() and Unsound_NumQueuedMessages() are safe to call from
// any thread, but the value returned may be out of date, because we don't

View File

@ -451,7 +451,7 @@ class MessageChannel : HasResultCodes
explicit DequeueTask(RefCountedTask* aTask)
: mTask(aTask)
{ }
void Run() { mTask->Run(); }
void Run() MOZ_OVERRIDE { mTask->Run(); }
private:
nsRefPtr<RefCountedTask> mTask;

View File

@ -1110,17 +1110,17 @@ struct CompartmentFilter {
};
struct AllCompartments : public CompartmentFilter {
virtual bool match(JSCompartment *c) const { return true; }
virtual bool match(JSCompartment *c) const MOZ_OVERRIDE { return true; }
};
struct ContentCompartmentsOnly : public CompartmentFilter {
virtual bool match(JSCompartment *c) const {
virtual bool match(JSCompartment *c) const MOZ_OVERRIDE {
return !IsSystemCompartment(c);
}
};
struct ChromeCompartmentsOnly : public CompartmentFilter {
virtual bool match(JSCompartment *c) const {
virtual bool match(JSCompartment *c) const MOZ_OVERRIDE {
return IsSystemCompartment(c);
}
};
@ -1128,13 +1128,13 @@ struct ChromeCompartmentsOnly : public CompartmentFilter {
struct SingleCompartment : public CompartmentFilter {
JSCompartment *ours;
explicit SingleCompartment(JSCompartment *c) : ours(c) {}
virtual bool match(JSCompartment *c) const { return c == ours; }
virtual bool match(JSCompartment *c) const MOZ_OVERRIDE { return c == ours; }
};
struct CompartmentsWithPrincipals : public CompartmentFilter {
JSPrincipals *principals;
explicit CompartmentsWithPrincipals(JSPrincipals *p) : principals(p) {}
virtual bool match(JSCompartment *c) const {
virtual bool match(JSCompartment *c) const MOZ_OVERRIDE {
return JS_GetCompartmentPrincipals(c) == principals;
}
};

View File

@ -120,7 +120,7 @@ class nsIParser : public nsParserBase {
* @param aChannel out param that will contain the result
* @return NS_OK if successful
*/
NS_IMETHOD GetChannel(nsIChannel** aChannel) = 0;
NS_IMETHOD GetChannel(nsIChannel** aChannel) MOZ_OVERRIDE = 0;
/**
* Get the DTD associated with this parser
@ -163,7 +163,7 @@ class nsIParser : public nsParserBase {
*/
NS_IMETHOD_(void) ContinueInterruptedParsingAsync() = 0;
NS_IMETHOD_(bool) IsParserEnabled() = 0;
NS_IMETHOD_(bool) IsParserEnabled() MOZ_OVERRIDE = 0;
NS_IMETHOD_(bool) IsComplete() = 0;
NS_IMETHOD Parse(nsIURI* aURL,

View File

@ -56,7 +56,7 @@ public:
{
}
virtual void Shutdown()
virtual void Shutdown() MOZ_OVERRIDE
{
if (mPtr) {
*mPtr = nullptr;

View File

@ -31,7 +31,8 @@ public:
{
}
virtual nsresult NS_FASTCALL operator()(const nsIID&, void**) const;
virtual nsresult NS_FASTCALL operator()(const nsIID&, void**) const
MOZ_OVERRIDE;
private:
nsISupports* MOZ_NON_OWNING_REF mSource;