rem: dd ("** UNDEFINED  passed to getTabForObject **"); 
add: dd ("** UNDEFINED passed to getTabForObject **"); 
context: function getTabForObject (source, create){    var name;    if (!source)    {        dd ("** UNDEFINED  passed to getTabForObject **");        dd (getStackTrace());        return null;    }        create = (typeof create != "undefined") ? Boolean(create) : false;    switch (source.TYPE)    {        case "IRCChanUser":        case "IRCUser":            name = source.nick;            break;                    case "IRCNetwork":        case "IRCChannel":        case "IRCClient":            name = source.name;            break;        default:            dd ("** INVALID OBJECT passed to getTabForObject **");            return null;    }    var tb, id = "tb[" + name + "]";    var matches = 1;    for (var i in client.viewsArray)    {        if (client.viewsArray[i].source == source)        {            tb = client.viewsArray[i].tb;            break;        }        else            if (client.viewsArray[i].tb.getAttribute("id") == id)                id = "tb[" + name + "<" + (++matches) + ">]";    }    if (!tb && create) /* not found, create one */    {        var views = document.getElementById ("views-tbar-inner");        tb = document.createElement ("tab");        tb.setAttribute ("ondraggesture",                         "nsDragAndDrop.startDrag(event, tabDNDObserver);");        tb.setAttribute ("href", source.getURL());        tb.setAttribute ("name", source.name);        tb.setAttribute ("onclick", "onTabClick('" + id + "');");        tb.setAttribute ("crop", "right");                tb.setAttribute ("class", "tab-bottom view-button");        tb.setAttribute ("id", id);        tb.setAttribute ("state", "normal");        var spacer = document.createElement ("box");        spacer.setAttribute ("id", id + "-spacer");        spacer.setAttribute ("class", "tabs-bottom view-button-spacer");        spacer.setAttribute ("index", client.viewsArray.length);        views.appendChild (spacer);        client.viewsArray.push ({source: source, tb: tb, spacer: spacer});        tb.setAttribute ("viewKey", client.viewsArray.length - 1);        if (matches > 1)            tb.setAttribute("label", name + "<" + matches + ">");        else            tb.setAttribute("label", name);        views.appendChild (tb);            }    return tb;    }
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/b8511d02e8bcb51d475c1c9a02b7a6f680ba5830/static.js/buggy/extensions/irc/xul/content/static.js