Backed out changeset f1f0f69bc78f (bug 1324505)
authorMakoto Kato <m_kato@ga2.so-net.ne.jp>
Mon, 16 Jan 2017 19:32:59 +0900
changeset 374563 ee2a1ad506f08f363d32cc54d3cd4db000ac829d
parent 374562 948912e1d62dd5824730e6513d2068d578cea00c
child 374564 d4d3a7b6d57e06891f158ccb4bebf507a8d55d32
child 374579 22426fbd559b7df850195ffa77af54cbec582eb6
push id6996
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 20:48:21 +0000
treeherdermozilla-beta@d89512dab048 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1324505
milestone53.0a1
backs outf1f0f69bc78f1f55d34caa1ac22527616bad06de
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
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();