Closed Bug 1060987 Opened 10 years ago Closed 10 years ago

Fix more bad implicit constructors in DOM

Categories

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

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla34

People

(Reporter: ehsan.akhgari, Assigned: ehsan.akhgari)

References

Details

Attachments

(1 file)

      No description provided.
Assignee: nobody → ehsan.akhgari
Blocks: explicit
Attachment #8481999 - Flags: review?(bugs)
That's quite a big patch.
Comment on attachment 8481999 [details] [diff] [review]
Fix more bad implicit constructors in DOM

And since baku is a DOM peer, he could look at this :)
Attachment #8481999 - Flags: review?(bugs) → review?(amarchesini)
Comment on attachment 8481999 [details] [diff] [review]
Fix more bad implicit constructors in DOM

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

Just because you are touching these lines, maybe we can fix these NITs.
r=me with this comments.

::: content/base/public/nsXMLNameSpaceMap.h
@@ +12,5 @@
>  #include "nsIAtom.h"
>  
>  struct nsNameSpaceEntry
>  {
> +  explicit nsNameSpaceEntry(nsIAtom *aPrefix)

type* aValue

::: content/base/src/ResponsiveImageSelector.h
@@ +22,5 @@
>  {
>    friend class ResponsiveImageCandidate;
>  public:
>    NS_DECL_ISUPPORTS
> +  explicit ResponsiveImageSelector(nsIContent *aContent);

type* aValue

::: content/base/src/nsCSPUtils.h
@@ +278,5 @@
>  /* =============== nsCSPReportURI ============ */
>  
>  class nsCSPReportURI : public nsCSPBaseSrc {
>    public:
> +    explicit nsCSPReportURI(nsIURI *aURI);

type* aValue

::: content/base/src/nsContentList.h
@@ +116,5 @@
>  
>  class nsSimpleContentList : public nsBaseContentList
>  {
>  public:
> +  explicit nsSimpleContentList(nsINode *aRoot) : nsBaseContentList(),

type* aValue

::: content/base/src/nsContentUtils.cpp
@@ +353,5 @@
>  
>  class EventListenerManagerMapEntry : public PLDHashEntryHdr
>  {
>  public:
> +  explicit EventListenerManagerMapEntry(const void *aKey)

type* aValue

@@ +1323,5 @@
>      typedef typename OutputIterator::value_type value_type;
>  
>    public:
> +    explicit CopyNormalizeNewlines(OutputIterator* aDestination,
> +                                   bool aLastCharCR=false) :

aLastCharCR = false

::: content/base/src/nsDocument.cpp
@@ +683,5 @@
>  };
>  
>  struct FindContentData
>  {
> +  explicit FindContentData(nsIDocument *aSubDoc)

type* aValue

@@ +8714,5 @@
>  }
>  
>  class nsUnblockOnloadEvent : public nsRunnable {
>  public:
> +  explicit nsUnblockOnloadEvent(nsDocument *doc) : mDoc(doc) {}

1. type* aValue
2. aDoc

@@ +9421,5 @@
>  
>  class nsDelayedEventDispatcher : public nsRunnable
>  {
>  public:
> +  explicit nsDelayedEventDispatcher(nsTArray<nsCOMPtr<nsIDocument> >& aDocuments)

>>&

::: content/base/src/nsDocument.h
@@ +121,5 @@
>  class nsIdentifierMapEntry : public nsStringHashKey
>  {
>  public:
>    typedef mozilla::dom::Element Element;
>    

extra space :)

@@ +127,4 @@
>      nsStringHashKey(&aKey), mNameContentList(nullptr)
>    {
>    }
> +  explicit nsIdentifierMapEntry(const nsAString *aKey) :

type* aValue

@@ +202,5 @@
>    struct ChangeCallbackEntry : public PLDHashEntryHdr {
>      typedef const ChangeCallback KeyType;
>      typedef const ChangeCallback* KeyTypePointer;
>  
> +    explicit ChangeCallbackEntry(const ChangeCallback* key) :

aKey

@@ +251,5 @@
>    CustomElementHashKey(int32_t aNamespaceID, nsIAtom *aAtom)
>      : mNamespaceID(aNamespaceID),
>        mAtom(aAtom)
>    {}
> +  explicit CustomElementHashKey(const CustomElementHashKey *aKey)

type* aValue

@@ +437,5 @@
>  class nsDOMStyleSheetList : public mozilla::dom::StyleSheetList,
>                              public nsStubDocumentObserver
>  {
>  public:
> +  explicit nsDOMStyleSheetList(nsIDocument *aDocument);

type* aValue

::: content/base/src/nsObjectLoadingContent.cpp
@@ +128,5 @@
>  ///
>  
>  class nsAsyncInstantiateEvent : public nsRunnable {
>  public:
> +  explicit nsAsyncInstantiateEvent(nsObjectLoadingContent *aContent)

type* aValue

@@ +161,5 @@
>  // is used to allow scripts to move a plugin around the document hierarchy
>  // without re-instantiating it.
>  class CheckPluginStopEvent : public nsRunnable {
>  public:
> +  explicit CheckPluginStopEvent(nsObjectLoadingContent *aContent)

type* aValue

@@ +458,5 @@
>  
>  // Sets a object's mInstantiating bit to false when destroyed
>  class AutoSetInstantiatingToFalse {
>  public:
> +  explicit AutoSetInstantiatingToFalse(nsObjectLoadingContent *aContent)

type* aValue

@@ +468,5 @@
>  
>  // Sets a object's mInstantiating bit to false when destroyed
>  class AutoSetLoadingToFalse {
>  public:
> +  explicit AutoSetLoadingToFalse(nsObjectLoadingContent *aContent)

type* aValue

::: content/base/src/nsXMLHttpRequest.cpp
@@ +3414,5 @@
>   */
>  class AsyncVerifyRedirectCallbackForwarder MOZ_FINAL : public nsIAsyncVerifyRedirectCallback
>  {
>  public:
> +  explicit AsyncVerifyRedirectCallbackForwarder(nsXMLHttpRequest *xhr)

type* aValue

::: content/html/content/src/HTMLTableElement.cpp
@@ +27,5 @@
>  class TableRowsCollection : public nsIHTMLCollection,
>                              public nsWrapperCache
>  {
>  public:
> +  explicit TableRowsCollection(HTMLTableElement *aParent);

type* aValue

::: content/html/content/src/nsGenericHTMLElement.cpp
@@ +171,5 @@
>    }
>  
>    NS_DECL_CYCLE_COLLECTING_ISUPPORTS
>  
> +  explicit nsGenericHTMLElementTearoff(nsGenericHTMLElement *aElement)

type* aValue

::: content/html/document/src/MediaDocument.h
@@ +83,5 @@
>  protected:
>    virtual ~MediaDocumentStreamListener();
>  
>  public:
> +  explicit MediaDocumentStreamListener(MediaDocument *aDocument);

type* aValue

::: content/html/document/src/PluginDocument.cpp
@@ +60,5 @@
>  
>  class PluginStreamListener : public MediaDocumentStreamListener
>  {
>  public:
> +  explicit PluginStreamListener(PluginDocument* doc)

1. type* aValue
2. aDoc

::: content/xul/content/src/nsXULElement.cpp
@@ +131,5 @@
>    NS_DECL_CYCLE_COLLECTING_ISUPPORTS
>    NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(nsXULElementTearoff,
>                                             nsIDOMElementCSSInlineStyle)
>  
> +  explicit nsXULElementTearoff(nsXULElement *aElement)

type* aValue

::: content/xul/document/src/XULDocument.h
@@ +53,4 @@
>      nsStringHashKey(&aKey)
>    {
>    }
> +  explicit nsRefMapEntry(const nsAString *aKey) :

type* aValue

::: dom/base/Navigator.h
@@ +109,5 @@
>                            , public nsIMozNavigatorNetwork
>                            , public nsWrapperCache
>  {
>  public:
> +  explicit Navigator(nsPIDOMWindow *aInnerWindow);

type* aValue

::: dom/base/nsDOMWindowList.h
@@ +15,5 @@
>  
>  class nsDOMWindowList : public nsIDOMWindowCollection
>  {
>  public:
> +  explicit nsDOMWindowList(nsIDocShell *aDocShell);

type* aValue

::: dom/base/nsGlobalWindow.cpp
@@ +8769,5 @@
>  
>  class nsPendingTimeoutRunner : public nsRunnable
>  {
>  public:
> +  explicit nsPendingTimeoutRunner(nsGlobalWindow *aWindow)

type* aValue

::: dom/base/nsJSEnvironment.cpp
@@ +300,5 @@
>   ****************************************************************/
>  
>  class AutoFree {
>  public:
> +  explicit AutoFree(void *aPtr) : mPtr(aPtr) {

type* aValue

::: dom/canvas/WebGLObjectModel.h
@@ +181,5 @@
>      {
>          AddRefOnPtr(mRawPtr);
>      }
>  
> +    explicit WebGLRefPtr(T *aRawPtr)

type* aValue

@@ +260,5 @@
>  // as well as comparison with the current context.
>  class WebGLContextBoundObject
>  {
>  public:
> +    explicit WebGLContextBoundObject(WebGLContext *context);

type* aValue

::: dom/canvas/WebGLRenderbuffer.h
@@ +25,5 @@
>      , public WebGLContextBoundObject
>      , public WebGLFramebufferAttachable
>  {
>  public:
> +    explicit WebGLRenderbuffer(WebGLContext *context);

type* aValue

::: dom/ipc/ContentChild.cpp
@@ +716,5 @@
>  class MemoryReportsWrapper MOZ_FINAL : public nsISupports {
>      ~MemoryReportsWrapper() {}
>  public:
>      NS_DECL_ISUPPORTS
> +    explicit MemoryReportsWrapper(InfallibleTArray<MemoryReport> *r) : mReports(r) { }

type* aValue

@@ +726,5 @@
>  {
>  public:
>      NS_DECL_ISUPPORTS
>  
> +    explicit MemoryReportCallback(const nsACString &aProcess)

type& aValue

::: dom/plugins/base/nsPluginHost.h
@@ +50,1 @@
>    

extra spaces

@@ +304,5 @@
>  
>  class MOZ_STACK_CLASS PluginDestructionGuard : protected PRCList
>  {
>  public:
> +  explicit PluginDestructionGuard(nsNPAPIPluginInstance *aInstance);

type* aValue

::: dom/src/json/nsJSON.h
@@ +21,5 @@
>  class MOZ_STACK_CLASS nsJSONWriter
>  {
>  public:
>    nsJSONWriter();
> +  explicit nsJSONWriter(nsIOutputStream *aStream);

type* aValue

::: dom/src/notification/DesktopNotification.h
@@ +40,5 @@
>  public:
>    NS_DECL_CYCLE_COLLECTING_ISUPPORTS
>    NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(DesktopNotificationCenter)
>  
> +  explicit DesktopNotificationCenter(nsPIDOMWindow *aWindow)

type* aValue

::: dom/xslt/xpath/txXPathObjectAdaptor.h
@@ +17,5 @@
>  
>  class txXPathObjectAdaptor : public txIXPathObject
>  {
>  public:
> +    explicit txXPathObjectAdaptor(txAExprResult *aValue) : mValue(aValue)

type* aValue

::: dom/xslt/xslt/txEXSLTFunctions.cpp
@@ +227,5 @@
>          HIGHEST,
>          LOWEST,
>          DATE_TIME
>      };
>      

extra spaces

::: dom/xslt/xslt/txMozillaXSLTProcessor.cpp
@@ +235,5 @@
>  
>  class txVariable : public txIGlobalParameter
>  {
>  public:
> +    explicit txVariable(nsIVariant *aValue) : mValue(aValue)

type* aValue

@@ +513,5 @@
>  class nsTransformBlockerEvent : public nsRunnable {
>  public:
>    nsRefPtr<txMozillaXSLTProcessor> mProcessor;
>  
> +  explicit nsTransformBlockerEvent(txMozillaXSLTProcessor *processor)

type* aValue
Attachment #8481999 - Flags: review?(amarchesini) → review+
https://hg.mozilla.org/mozilla-central/rev/ca7fdf3bb372
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: