bug 664084 - set but unused nsresult in nsHTMLTableAccessible.cpp:1208 r=surkov
authorTrevor Saunders <trev.saunders@gmail.com>
Mon, 13 Jun 2011 16:28:35 -0700
changeset 72284 06c3225b16563b9631e7b0aadfadeb0fc43be229
parent 72283 b06efa3e007336683dbc9111b55e997a134e49e9
child 72285 740916b2c1ea1c575f0bf17e37f71aa746c30fdb
push id159
push usereakhgari@mozilla.com
push dateTue, 16 Aug 2011 17:53:11 +0000
treeherdermozilla-beta@8786e3e49240 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssurkov
bugs664084
milestone7.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 664084 - set but unused nsresult in nsHTMLTableAccessible.cpp:1208 r=surkov From 98228e034f021e8ab897537f0aa280e622cf2fc3 Mon Sep 17 00:00:00 2001 --- accessible/src/html/nsHTMLTableAccessible.cpp | 8 ++------ 1 files changed, 2 insertions(+), 6 deletions(-)
accessible/src/html/nsHTMLTableAccessible.cpp
--- a/accessible/src/html/nsHTMLTableAccessible.cpp
+++ b/accessible/src/html/nsHTMLTableAccessible.cpp
@@ -1207,23 +1207,19 @@ nsHTMLTableAccessible::RemoveRowsOrColum
   nsITableLayout *tableLayout = GetTableLayout();
   NS_ENSURE_STATE(tableLayout);
 
   nsCOMPtr<nsIPresShell> presShell(GetPresShell());
   nsRefPtr<nsFrameSelection> tableSelection =
     const_cast<nsFrameSelection*>(presShell->ConstFrameSelection());
 
   PRBool doUnselectRow = (aTarget == nsISelectionPrivate::TABLESELECTION_ROW);
-
-  nsresult rv = NS_OK;
   PRInt32 count = 0;
-  if (doUnselectRow)
-    rv = GetColumnCount(&count);
-  else
-    rv = GetRowCount(&count);
+  nsresult rv = doUnselectRow ? GetColumnCount(&count) : GetRowCount(&count);
+  NS_ENSURE_SUCCESS(rv, rv);
 
   PRInt32 startRowIdx = doUnselectRow ? aIndex : 0;
   PRInt32 endRowIdx = doUnselectRow ? aIndex : count - 1;
   PRInt32 startColIdx = doUnselectRow ? 0 : aIndex;
   PRInt32 endColIdx = doUnselectRow ? count - 1 : aIndex;
 
   if (aIsOuter)
     return tableSelection->RestrictCellsToSelection(mContent,