rem: var pref = Components.classes["@mozilla.org/preferences-service;1"] .getService(Components.interfaces.nsIPrefBranch); if (pref) { gUseGlobalPrintSettings = pref.getBoolPref("print.use_global_printsettings"); 
add: var ifreq = _content.QueryInterface(Components.interfaces.nsIInterfaceRequestor); var webBrowserPrint = ifreq.getInterface(Components.interfaces.nsIWebBrowserPrint); if (webBrowserPrint) { gPrintSettings = GetPrintSettings(webBrowserPrint); webBrowserPrint.print(gPrintSettings, null); 
context: function BrowserPrint(){  try {    var pref = Components.classes["@mozilla.org/preferences-service;1"]                         .getService(Components.interfaces.nsIPrefBranch);    if (pref) {      gUseGlobalPrintSettings = pref.getBoolPref("print.use_global_printsettings");    }    var printOptionsService = Components.classes["@mozilla.org/gfx/printoptions;1"]                                             .getService(Components.interfaces.nsIPrintOptions);    if (gPrintSettings == null) {      gPrintSettings = printOptionsService.CreatePrintSettings();    }    // if we are using the global settings then get them     // before calling print    if (gUseGlobalPrintSettings) {      gPrintSettings = printOptionsService.printSettingsValues;    }    // using _content.print() until printing becomes scriptable on docShell    _content.printWithSettings(gPrintSettings);    // now set our setting into the global settings    // after the changes were made    if (gUseGlobalPrintSettings) {      printOptionsService.printSettingsValues = gPrintSettings;    }  } 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: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/9658379654be61450ad8e0fb7bd60e4caa5c05c7/browser.js/clean/suite/browser/browser.js