Bug 1092333 - nsDOMStringMap::NamedDeleter doesn't always write its out-parameter. r=bzbarsky, a=lmandel
authorJulian Seward <jseward@acm.org>
Tue, 04 Nov 2014 10:11:08 +0100
changeset 233933 120b2b6378eaa183e5bd1b3262d89b41f26a9c9c
parent 233932 d8f242cbe2a2bee0594fdb12d8525afef9e56801
child 233934 af8e75d893b984dedb7ef9a30d541d9f026c1131
push id4187
push userbhearsum@mozilla.com
push dateFri, 28 Nov 2014 15:29:12 +0000
treeherdermozilla-beta@f23cc6a30c11 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbzbarsky, lmandel
bugs1092333
milestone35.0a2
Bug 1092333 - nsDOMStringMap::NamedDeleter doesn't always write its out-parameter. r=bzbarsky, a=lmandel
content/html/content/src/nsDOMStringMap.cpp
--- a/content/html/content/src/nsDOMStringMap.cpp
+++ b/content/html/content/src/nsDOMStringMap.cpp
@@ -121,21 +121,23 @@ nsDOMStringMap::NamedSetter(const nsAStr
   }
 }
 
 void
 nsDOMStringMap::NamedDeleter(const nsAString& aProp, bool& found)
 {
   // Currently removing property, attribute is already removed.
   if (mRemovingProp) {
+    found = false;
     return;
   }
   
   nsAutoString attr;
   if (!DataPropToAttr(aProp, attr)) {
+    found = false;
     return;
   }
 
   nsCOMPtr<nsIAtom> attrAtom = do_GetAtom(attr);
   MOZ_ASSERT(attrAtom, "Should be infallible");
 
   found = mElement->HasAttr(kNameSpaceID_None, attrAtom);