rem: gPrintSettings = GetPrintSettings(); 
add: try { gPrintSettings = GetPrintSettings(); } catch(e) { gPrintSettings = PrintUtils.getPrintSettings(); } 
context: function FinishPrintPreview(){  try {    var ifreq = content.QueryInterface(Components.interfaces.nsIInterfaceRequestor);    var webBrowserPrint = ifreq.getInterface(Components.interfaces.nsIWebBrowserPrint);         if (webBrowserPrint) {      gPrintSettings = GetPrintSettings();      // Don't print the fake title and url      gPrintSettings.docURL=" ";      gPrintSettings.title=" ";            webBrowserPrint.printPreview(gPrintSettings, null, gWebProgress.value);    }    showPrintPreviewToolbar();    content.focus();  } catch (e) {    // Pressing cancel is expressed as an NS_ERROR_ABORT return value,    // causing an exception to be thrown which we catch here.    // Unfortunately this will also consume helpful failures, so add a    // dump(e); // if you need to debug  }}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/096d348175653196b080c88d297b9941fe3404b3/calPrintEngine.js/clean/calendar/resources/content/calPrintEngine.js