rem: e.sourceObject.frame.contentWindow.location.href = 
add: getContentWindow(e.sourceObject.frame).location.href = 
context: function cmdGotoURL(e){    const EXT_PROTO_SVC = "@mozilla.org/uriloader/external-protocol-service;1";    if (e.url.search(/^ircs?:/i) == 0)    {        gotoIRCURL(e.url);        return;    }    if (e.url.search(/^x-cz-command:/i) == 0)    {        var ary = e.url.match(/^x-cz-command:(.*)$/i);        e.sourceObject.frame.contentWindow.location.href =             "javascript:void(view.dispatch('" + decodeURI(ary[1]) + "', null, true))";        return;    }    try    {        var uri = client.iosvc.newURI(e.url, "UTF-8", null);    }    catch (ex)    {        var localeURLKey = "msg.localeurl." + e.url;        if (localeURLKey != getMsg(localeURLKey))            dispatch(e.command.name + " " + getMsg(localeURLKey));        else            display(getMsg(MSG_ERR_INVALID_URL, e.url), MT_ERROR);        dispatch("focus-input");        return;    }    if ((e.command.name == "goto-url-external") || (client.host == "XULrunner"))    {        const extProtoSvc = getService(EXT_PROTO_SVC,                                       "nsIExternalProtocolService");        extProtoSvc.loadUrl(uri);        dispatch("focus-input");        return;    }    if (e.command.name == "goto-url-newwin")    {        openTopWin(e.url);        dispatch("focus-input");        return;    }    var window = getWindowByType("navigator:browser");    if (!window)    {        openTopWin(e.url);        dispatch("focus-input");        return;    }    if (client.prefs["link.focus"])    {        try        {            window.focus();        }        catch (ex)        {            dd(formatException(ex));        }            }    if (e.command.name == "goto-url-newtab")    {        try        {            if (client.host == "Mozilla")                window.openNewTabWith(e.url, false, false);            else                window.openNewTabWith(e.url, null, null, null, null, false);        }        catch (ex)        {            dd(formatException(ex));        }        dispatch("focus-input");        return;    }    var location = window.content.document.location;    if (location.href.indexOf("chrome://chatzilla/content/") == 0)    {        // don't replace chatzilla running in a tab        openTopWin(e.url);        dispatch("focus-input");        return;    }    try    {        location.href = e.url;    }    catch (ex)    {        dd(formatException(ex));    }    dispatch("focus-input");}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/8395/a3e839fe5b35a608da653750f2126d4c87be6b9f/commands.js/buggy/extensions/irc/xul/content/commands.js