rem: if(doc) torbutton_hookdoc(aProgress.DOMWindow, doc); else torbutton_log(3, "No DOM at location event!"); 
add: if(doc && doc.domain) torbutton_hookdoc(aProgress.DOMWindow, doc); else torbutton_log(2, "No DOM yet at location event"); 
context:   onLocationChange: function(aProgress, aRequest, aURI)  {    torbutton_log(1, 'onLocationChange');   // This fires when the location bar changes i.e load event is confirmed   // or when the user switches tabs    if(aProgress) {        torbutton_log(1, "location progress");        var doc = aProgress.DOMWindow.document;        if(doc) torbutton_hookdoc(aProgress.DOMWindow, doc);                else torbutton_log(3, "No DOM at location event!");    } else {        torbutton_log(3, "No aProgress for location!");    }    return 0;  },
meta: 3444	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/3444/40dcb9049bb6b7aafbc03e59afa063688fdd530e/torbutton.js/buggy/src/chrome/content/torbutton.js