Bug 1289780- [Static analysis][Uninitialized scalar field] In constructors nsReferencedElement & nsNameSpaceEntry. r=bz
authorPaul Bignier <paul.bignier@gmail.com>
Wed, 27 Jul 2016 08:15:00 -0400
changeset 354742 563d80710d402381b07d7bfc3aa870412fd32e82
parent 354741 0e8f7203191d83d7adc0bd4b49a6e8ccaf1463ee
child 354743 9ca5e5bbcf2d33ff0135f4ae1b5e29e488283e45
push id6570
push userraliiev@mozilla.com
push dateMon, 14 Nov 2016 12:26:13 +0000
treeherdermozilla-beta@f455459b2ae5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz
bugs1289780
milestone51.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1289780- [Static analysis][Uninitialized scalar field] In constructors nsReferencedElement & nsNameSpaceEntry. r=bz
dom/base/nsReferencedElement.h
dom/base/nsXMLNameSpaceMap.h
--- a/dom/base/nsReferencedElement.h
+++ b/dom/base/nsReferencedElement.h
@@ -31,17 +31,19 @@ class nsIURI;
  * the changed-to element.
  * Override IsPersistent to return true if you want to keep tracking after
  * the first change.
  */
 class nsReferencedElement {
 public:
   typedef mozilla::dom::Element Element;
 
-  nsReferencedElement() {}
+  nsReferencedElement()
+    : mReferencingImage(false)
+  {}
   ~nsReferencedElement() {
     Unlink();
   }
 
   /**
    * Find which element, if any, is referenced.
    */
   Element* get() { return mElement; }
--- a/dom/base/nsXMLNameSpaceMap.h
+++ b/dom/base/nsXMLNameSpaceMap.h
@@ -13,17 +13,17 @@
 #include "nsIAtom.h"
 
 struct nsNameSpaceEntry
 {
   explicit nsNameSpaceEntry(nsIAtom* aPrefix)
     : prefix(aPrefix) {}
 
   nsCOMPtr<nsIAtom> prefix;
-  int32_t nameSpaceID;
+  MOZ_INIT_OUTSIDE_CTOR int32_t nameSpaceID;
 };
 
 /**
  * nsXMLNameSpaceMap contains a set of prefixes which are mapped onto
  * namespaces.  It allows the set to be searched by prefix or by namespace ID.
  */
 class nsXMLNameSpaceMap
 {