rem: if (!obj.messages) { dd ("** INVALID OBJECT passed to setCurrentObject **"); 
add: if (!ASSERT(obj.messages, "INVALID OBJECT passed to setCurrentObject **")) 
context: function setCurrentObject (obj){    if (!obj.messages)    {        dd ("** INVALID OBJECT passed to setCurrentObject **");        return;    }    if ("currentObject" in client && client.currentObject == obj)        return;            var tb, userList;    if ("currentObject" in client && client.currentObject)    {        tb = getTabForObject(client.currentObject);    }    if (tb)    {        tb.selected = false;        tb.setAttribute ("state", "normal");    }        /* Unselect currently selected users. */    userList = document.getElementById("user-list");    if (isVisible("user-list-box"))    {        /* Remove currently selected items before this tree gets rerooted,         * because it seems to remember the selections for eternity if not. */        if (userList.treeBoxObject.selection)            userList.treeBoxObject.selection.clearSelection ();        if (obj.TYPE == "IRCChannel")            client.rdf.setTreeRoot ("user-list", obj.getGraphResource());        else            client.rdf.setTreeRoot ("user-list", client.rdf.resNullChan);    }        client.currentObject = obj;    tb = getTabForObject(obj, true);    if (tb)    {        tb.selected = true;        tb.setAttribute ("state", "current");    }        var vk = Number(tb.getAttribute("viewKey"));    delete client.activityList[vk];    client.deck.selectedIndex = vk;    updateNetwork();    updateChannel();    updateTitle ();    if (client.PRINT_DIRECTION == 1)        scrollDown(obj.frame, false);        onTopicEditEnd();    if (client.currentObject.TYPE == "IRCChannel")        client.statusBar["channel-topic"].setAttribute ("editable", "true");    else        client.statusBar["channel-topic"].removeAttribute ("editable");    var status = document.getElementById("offline-status");    if (client.currentObject == client)    {        status.setAttribute ("hidden", "true");    }    else    {        status.removeAttribute ("hidden");        var details = getObjectDetails(client.currentObject);        if ("network" in details && details.network.isConnected())            status.removeAttribute ("offline");            else            status.setAttribute ("offline", "true");    }}
meta: 3298	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/3298/377dd328ba12f71ca976ba1a877bf8881dae0beb/static.js/buggy/xul/content/static.js