add:        gWebProgress = new Object();  var printPreviewParams    = new Object(); var notifyOnOpen          = new Object(); var printingPromptService = Components.classes["@mozilla.org/embedcomp/printingprompt-service;1"] .getService(Components.interfaces.nsIPrintingPromptService); if (printingPromptService) {   try { printingPromptService.showProgress(this, webBrowserPrint, gPrintSettings, gPrintPreviewObs, false, gWebProgress, printPreviewParams, notifyOnOpen); if (printPreviewParams.value) { var webNav = getWebNavigation(); printPreviewParams.value.docTitle = webNav.document.title; printPreviewParams.value.docURL   = webNav.currentURI.spec; }    if (!notifyOnOpen.value.valueOf() || gWebProgress.value == null) { FinishPrintPreview(); } } catch (e) {} } 
context: function BrowserPrintPreview(){  gInPrintPreviewMode = true;  var browser = getBrowser();  browser.setAttribute("handleCtrlPageUpDown", "false");  var mainWin = document.getElementById("main-window");  // save previous close handler to restoreon exiting print preview mode  if (mainWin.hasAttribute("onclose"))    gOldCloseHandler = mainWin.getAttribute("onclose");  else    gOldCloseHandler = null;  mainWin.setAttribute("onclose", "BrowserExitPrintPreview(); return false;");   try {    var ifreq = _content.QueryInterface(      Components.interfaces.nsIInterfaceRequestor);    var webBrowserPrint = ifreq.getInterface(      Components.interfaces.nsIWebBrowserPrint);         if (webBrowserPrint) {      gPrintSettings = GetPrintSettings();      webBrowserPrint.printPreview(gPrintSettings, null, null);    }    // show the toolbar after we go into print preview mode so    // that we can initialize the toolbar with total num pages    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: 5872	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5872/1ba1fcde852cd6217681074b74050b0fdd187f8c/browser.js/buggy/xpfe/browser/resources/content/browser.js