Bug 839447 - Part 3: Add a missing addref; r=mounir
authorMs2ger <ms2ger@gmail.com>
Tue, 19 Feb 2013 11:38:53 +0100
changeset 132159 b8b9100f6c418c164a8a2a1d6e70bed8019af0f9
parent 132158 0577eb1893c44ccce6f6085603f4b12021c01d5f
child 132160 a0c57dffd179b3718e696579cc14dd10d408a591
push id2323
push userbbajaj@mozilla.com
push dateMon, 01 Apr 2013 19:47:02 +0000
treeherdermozilla-beta@7712be144d91 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmounir
bugs839447
milestone21.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 839447 - Part 3: Add a missing addref; r=mounir
content/html/content/src/HTMLOptionElement.cpp
--- a/content/html/content/src/HTMLOptionElement.cpp
+++ b/content/html/content/src/HTMLOptionElement.cpp
@@ -95,18 +95,17 @@ NS_HTML_CONTENT_INTERFACE_TABLE_TAIL_CLA
 
 
 NS_IMPL_ELEMENT_CLONE(HTMLOptionElement)
 
 
 NS_IMETHODIMP
 HTMLOptionElement::GetForm(nsIDOMHTMLFormElement** aForm)
 {
-  NS_ENSURE_ARG_POINTER(aForm);
-  *aForm = GetForm();
+  NS_ADDREF(*aForm = GetForm());
   return NS_OK;
 }
 
 nsHTMLFormElement*
 HTMLOptionElement::GetForm()
 {
   nsHTMLSelectElement* selectControl = GetSelect();
   return selectControl ? selectControl->GetForm() : nullptr;