rem: var xulSortService = isupports.QueryInterface(Components.interfaces.nsIXULSortService); 
add: var xulSortService = isupports.QueryInterface(Components.interfaces.nsIXULSortService); 
context: function doSort(sortColName, naturalOrderResource){    var node = document.getElementById(sortColName);    // determine column resource to sort on    var sortResource = node.getAttribute('resource');    if (!sortResource)        return false;    var sortDirection="ascending";    var isSortActive = node.getAttribute('sortActive');    if (isSortActive == "true") {        sortDirection = "ascending";        var currentDirection = node.getAttribute('sortDirection');        if (currentDirection == "ascending") {            if (sortResource != naturalOrderResource)                sortDirection = "descending";        }        else if (currentDirection == "descending") {            if (naturalOrderResource)                sortResource = naturalOrderResource;        }    }    try {        var isupports = Components.classes["@mozilla.org/xul/xul-sort-service;1"].getService();        var xulSortService = isupports.QueryInterface(Components.interfaces.nsIXULSortService);       }    catch(ex) {        dump(ex);        return false;    }    try {        xulSortService.Sort(node, sortResource, sortDirection);    }    catch(ex) {    }    return true;}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/0b2dd2b2d2fd037df917e07645fa019a963332a5/nsTreeUtils.js/buggy/xpfe/global/resources/content/nsTreeUtils.js