Bug 550234 Followup to remove final use of obsolete nsINavHistoryResultViewer r=IanN
authorNeil Rashbrook <neil@parkwaycc.co.uk>
Fri, 07 Sep 2012 10:40:18 +0100
changeset 12252 1bdd4637a53c42c72a0b54519f9d3257ad20f8d2
parent 12251 f6cce22f417f78cd50db60326aaf97c7dbf03420
child 12253 29d6d9143faddc9865705b99bdc87e199a1b5d26
push id738
push userbugzilla@standard8.plus.com
push dateMon, 08 Oct 2012 19:38:39 +0000
treeherdercomm-aurora@6694e4ec3767 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersIanN
bugs550234
Bug 550234 Followup to remove final use of obsolete nsINavHistoryResultViewer r=IanN
suite/common/history/tree.xml
--- a/suite/common/history/tree.xml
+++ b/suite/common/history/tree.xml
@@ -44,21 +44,21 @@
         ]]></getter>
         <setter><![CDATA[
           return this.treeBoxObject.view = val;
         ]]></setter>
       </property>
 
       <property name="sortingMode" readonly="true">
         <getter><![CDATA[
-          try {
+          var result = this.getResult();
+          if (result)
             // If we have a result then simply return its sorting mode.
-            return this.view.QueryInterface(Components.interfaces.nsINavHistoryResultViewer).result.sortingMode;
-          }
-          catch (e) {
+            return result.sortingMode;
+          else {
             // Find the sorted column from the persisted attributes.
             const NHQO = Components.interfaces.nsINavHistoryQueryOptions;
             var sortedColumn = this.columns.getSortedColumn();
             if (!sortedColumn)
               return NHQO.SORT_BY_NONE;
 
             var sortDescending =
               sortedColumn.element.getAttribute("sortDirection") != "ascending";