Bug 432832 - "aNode is null" error hovering history sidebar, r=mano
authorMarco Bonardo <mak77@bonardo.net>
Tue, 02 Sep 2008 01:26:41 +0200
changeset 18561 aa4bd40eef6c56ccc9864e6e73d18bfdad2b8380
parent 18560 9599ebdf16b02762d8da588130e9cdb8d832f651
child 18562 6b6054736cb2837fabf68ac42238ca122ddd66f8
push id1644
push usermak77@bonardo.net
push dateMon, 01 Sep 2008 23:30:02 +0000
treeherdermozilla-central@aa4bd40eef6c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmano
bugs432832
milestone1.9.1b1pre
Bug 432832 - "aNode is null" error hovering history sidebar, r=mano
browser/components/places/content/treeView.js
--- a/browser/components/places/content/treeView.js
+++ b/browser/components/places/content/treeView.js
@@ -882,19 +882,19 @@ PlacesTreeView.prototype = {
     if (columnType != "title")
       return;
 
     var node = this._visibleElements[aRow].node;
     var properties = this._visibleElements[aRow].properties;
 
     if (!properties) {
       properties = new Array();
+      var itemId = node.itemId;
       var nodeType = node.type;
       if (PlacesUtils.containerTypes.indexOf(nodeType) != -1) {
-        var itemId = node.itemId;
         if (nodeType == Ci.nsINavHistoryResultNode.RESULT_TYPE_QUERY) {
           properties.push(this._getAtomFor("query"));
           if (PlacesUtils.nodeIsTagQuery(node))
             properties.push(this._getAtomFor("tagContainer"));
           else if (PlacesUtils.nodeIsDay(node))
             properties.push(this._getAtomFor("dayContainer"));
           else if (PlacesUtils.nodeIsHost(node))
             properties.push(this._getAtomFor("hostContainer"));
@@ -904,17 +904,19 @@ PlacesTreeView.prototype = {
           if (PlacesUtils.annotations.itemHasAnnotation(itemId,
                                                         LMANNO_FEEDURI))
             properties.push(this._getAtomFor("livemark"));
         }
 
         if (itemId != -1) {
           var oqAnno;
           try {
-            oqAnno = PlacesUtils.annotations.getItemAnnotation(itemId, ORGANIZER_QUERY_ANNO);
+            oqAnno = PlacesUtils.annotations
+                                .getItemAnnotation(itemId,
+                                                   ORGANIZER_QUERY_ANNO);
             properties.push(this._getAtomFor("OrganizerQuery_" + oqAnno));
           }
           catch (ex) { /* not a special query */ }
         }
       }
       else if (nodeType == Ci.nsINavHistoryResultNode.RESULT_TYPE_SEPARATOR)
         properties.push(this._getAtomFor("separator"));
       else if (itemId != -1) { // bookmark nodes