Backed out changeset 84d5d34e1445 (bug 1163148) for Crashes/Assertion failure in HTMLFieldSetElement.cpp on a CLOSED TREE
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Fri, 15 May 2015 16:01:29 +0200
changeset 263619 ca67ae37b6113ae9a327eaacc7bd4c182d14faaf
parent 263618 e5ecf069259d47a5e771d15cc7e926422be9fba1
child 263620 5943d32f35155feb6144f5b06d7e413888d9072e
push id8157
push userjlund@mozilla.com
push dateMon, 29 Jun 2015 20:36:23 +0000
treeherdermozilla-aurora@d480e05bd276 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1163148
milestone41.0a1
backs out84d5d34e1445d39944d6090628e026887c2ddc42
Backed out changeset 84d5d34e1445 (bug 1163148) for Crashes/Assertion failure in HTMLFieldSetElement.cpp on a CLOSED TREE
dom/html/HTMLFieldSetElement.cpp
dom/html/HTMLFieldSetElement.h
--- a/dom/html/HTMLFieldSetElement.cpp
+++ b/dom/html/HTMLFieldSetElement.cpp
@@ -14,16 +14,18 @@
 
 NS_IMPL_NS_NEW_HTML_ELEMENT(FieldSet)
 
 namespace mozilla {
 namespace dom {
 
 HTMLFieldSetElement::HTMLFieldSetElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo)
   : nsGenericHTMLFormElement(aNodeInfo)
+  , mElements(nullptr)
+  , mFirstLegend(nullptr)
   , mInvalidElementsCount(0)
 {
   // <fieldset> is always barred from constraint validation.
   SetBarredFromConstraintValidation(true);
 
   // We start out enabled and valid.
   AddStatesSilently(NS_EVENT_STATE_ENABLED | NS_EVENT_STATE_VALID);
 }
@@ -34,18 +36,17 @@ HTMLFieldSetElement::~HTMLFieldSetElemen
   for (uint32_t i = 0; i < length; ++i) {
     mDependentElements[i]->ForgetFieldSet(this);
   }
 }
 
 // nsISupports
 
 NS_IMPL_CYCLE_COLLECTION_INHERITED(HTMLFieldSetElement, nsGenericHTMLFormElement,
-                                   mValidity, mElements, mDependentElements,
-                                   mFirstLegend)
+                                   mValidity, mElements)
 
 NS_IMPL_ADDREF_INHERITED(HTMLFieldSetElement, Element)
 NS_IMPL_RELEASE_INHERITED(HTMLFieldSetElement, Element)
 
 // QueryInterface implementation for HTMLFieldSetElement
 NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(HTMLFieldSetElement)
   NS_INTERFACE_TABLE_INHERITED(HTMLFieldSetElement,
                                nsIDOMHTMLFieldSetElement,
--- a/dom/html/HTMLFieldSetElement.h
+++ b/dom/html/HTMLFieldSetElement.h
@@ -125,19 +125,19 @@ private:
   // This function is used to generate the nsContentList (listed form elements).
   static bool MatchListedElements(nsIContent* aContent, int32_t aNamespaceID,
                                     nsIAtom* aAtom, void* aData);
 
   // listed form controls elements.
   nsRefPtr<nsContentList> mElements;
 
   // List of elements which have this fieldset as first fieldset ancestor.
-  nsTArray<nsRefPtr<nsGenericHTMLFormElement>> mDependentElements;
+  nsTArray<nsGenericHTMLFormElement*> mDependentElements;
 
-  nsCOMPtr<nsIContent> mFirstLegend;
+  nsIContent* mFirstLegend;
 
   /**
    * Number of invalid and candidate for constraint validation
    * elements in the fieldSet the last time UpdateValidity has been called.
    *
    * @note Should only be used by UpdateValidity() and IntrinsicState()!
    */
   int32_t mInvalidElementsCount;