Backed out changeset f1f0f69bc78f (bug 1324505)
authorMakoto Kato <m_kato@ga2.so-net.ne.jp>
Mon, 16 Jan 2017 19:32:59 +0900
changeset 461337 ee2a1ad506f08f363d32cc54d3cd4db000ac829d
parent 461336 948912e1d62dd5824730e6513d2068d578cea00c
child 461338 22426fbd559b7df850195ffa77af54cbec582eb6
child 461393 d4d3a7b6d57e06891f158ccb4bebf507a8d55d32
push id41655
push userbmo:npang@mozilla.com
push dateMon, 16 Jan 2017 14:31:16 +0000
bugs1324505
milestone53.0a1
backs outf1f0f69bc78f1f55d34caa1ac22527616bad06de
Backed out changeset f1f0f69bc78f (bug 1324505) MozReview-Commit-ID: 1DbtAJzgJYo
editor/libeditor/HTMLEditRules.cpp
--- a/editor/libeditor/HTMLEditRules.cpp
+++ b/editor/libeditor/HTMLEditRules.cpp
@@ -7859,20 +7859,17 @@ HTMLEditRules::PopListItem(nsIDOMNode* a
   nsCOMPtr<Element> listItem = do_QueryInterface(aListItem);
   // check parms
   NS_ENSURE_TRUE(listItem && aOutOfList, NS_ERROR_NULL_POINTER);
 
   // init out params
   *aOutOfList = false;
 
   nsCOMPtr<nsINode> curParent = listItem->GetParentNode();
-  if (NS_WARN_IF(!curParent)) {
-    return NS_ERROR_FAILURE;
-  }
-  int32_t offset = curParent->IndexOf(listItem);
+  int32_t offset = curParent ? curParent->IndexOf(listItem) : -1;
 
   if (!HTMLEditUtils::IsListItem(listItem)) {
     return NS_ERROR_FAILURE;
   }
 
   // if it's first or last list item, don't need to split the list
   // otherwise we do.
   nsCOMPtr<nsINode> curParPar = curParent->GetParentNode();