Closed Bug 1117264 Opened 5 years ago Closed 5 years ago

Mark virtual overridden functions as MOZ_OVERRIDE in dom/base code

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla37

People

(Reporter: ehsan, Assigned: ehsan)

References

Details

Attachments

(1 file)

No description provided.
Assignee: nobody → ehsan
Comment on attachment 8543467 [details] [diff] [review]
Mark virtual overridden functions as MOZ_OVERRIDE in dom/base code

Review of attachment 8543467 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/base/nsGlobalWindow.h
@@ +349,5 @@
>      return IsInnerWindow() || EnsureInnerWindow() ? GetWrapper() : nullptr;
>    }
>  
>    // nsIGlobalJSObjectHolder
> +  virtual JSObject *GetGlobalJSObject() MOZ_OVERRIDE;

JSObject*

@@ +650,3 @@
>  #endif // MOZ_B2G
>  
> +  virtual nsresult SetArguments(nsIArray *aArguments) MOZ_OVERRIDE;

nsIArray*

@@ +1138,5 @@
>    virtual nsresult
>    OpenNoNavigate(const nsAString& aUrl,
>                   const nsAString& aName,
>                   const nsAString& aOptions,
> +                 nsIDOMWindow **_retval) MOZ_OVERRIDE;

nsIDOMWindow**

@@ +1207,5 @@
>    // Language agnostic timeout function (all args passed).
>    // |interval| is in milliseconds.
>    nsresult SetTimeoutOrInterval(nsIScriptTimeoutHandler *aHandler,
>                                  int32_t interval,
> +                                bool aIsInterval, int32_t *aReturn) MOZ_OVERRIDE;

int32_t*

::: dom/base/nsGlobalWindowCommands.cpp
@@ +111,5 @@
>  class nsSelectionCommandsBase : public nsIControllerCommand
>  {
>  public:
>    NS_DECL_ISUPPORTS
> +  NS_IMETHOD IsCommandEnabled(const char * aCommandName, nsISupports *aCommandContext, bool *_retval) MOZ_OVERRIDE;

type* foobar

@@ +112,5 @@
>  {
>  public:
>    NS_DECL_ISUPPORTS
> +  NS_IMETHOD IsCommandEnabled(const char * aCommandName, nsISupports *aCommandContext, bool *_retval) MOZ_OVERRIDE;
> +  NS_IMETHOD GetCommandStateParams(const char * aCommandName, nsICommandParams *aParams, nsISupports *aCommandContext) MOZ_OVERRIDE;

and here

@@ +113,5 @@
>  public:
>    NS_DECL_ISUPPORTS
> +  NS_IMETHOD IsCommandEnabled(const char * aCommandName, nsISupports *aCommandContext, bool *_retval) MOZ_OVERRIDE;
> +  NS_IMETHOD GetCommandStateParams(const char * aCommandName, nsICommandParams *aParams, nsISupports *aCommandContext) MOZ_OVERRIDE;
> +  NS_IMETHOD DoCommandParams(const char * aCommandName, nsICommandParams *aParams, nsISupports *aCommandContext) MOZ_OVERRIDE;

and here too.

::: dom/base/nsJSEnvironment.cpp
@@ +2923,5 @@
>    // nsIArray
>    NS_DECL_NSIARRAY
>  
>    // nsIJSArgArray
> +  nsresult GetArgs(uint32_t *argc, void **argv) MOZ_OVERRIDE;

type* foobar

::: dom/base/nsJSTimeoutHandler.cpp
@@ +41,5 @@
>    nsJSScriptTimeoutHandler(JSContext* aCx, nsGlobalWindow *aWindow,
>                             const nsAString& aExpression, bool* aAllowEval,
>                             ErrorResult& aError);
>  
> +  virtual const char16_t *GetHandlerText() MOZ_OVERRIDE;

char16_t*

@@ +47,4 @@
>    {
>      return mFunction;
>    }
> +  virtual void GetLocation(const char **aFileName, uint32_t *aLineNo) MOZ_OVERRIDE

type* foobar

::: dom/base/nsObjectLoadingContent.cpp
@@ +365,3 @@
>  
>    // nsITimerCallback
> +  NS_IMETHOD Notify(nsITimer *timer) MOZ_OVERRIDE;

nsITimer*
Attachment #8543467 - Flags: review?(amarchesini) → review+
FWIW I personally think it's better to not get people fix style nits on the lines that they touch for various purposes especially on large patches like this.  I think it would be a much better use of everyone's time if someone just fixes the style globally in one go.
(But I addressed these comments anyway...)
https://hg.mozilla.org/mozilla-central/rev/a7e5b17a0e4b
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla37
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.