rem: else if (typeof document != 'undefined') 
add: else if (typeof netscape != 'undefined' && 'security' in netscape) 
context: function JavaScriptOptions(){  this.orig   = {};  this.orig.strict = this.strict = false;  this.orig.werror = this.werror = false;  this.privileges = 'UniversalXPConnect UniversalPreferencesRead ' +                     'UniversalPreferencesWrite';  if (typeof options == 'function')  {    // shell    var optString = options();    if (optString)    {      var optList = optString.split(',');      for (var iOpt = 0; iOpt < optList.length; iOpt++)      {        optName = optList[iOpt];        this[optName] = true;      }    }  }  else if (typeof document != 'undefined')  {    // browser    netscape.security.PrivilegeManager.enablePrivilege(this.privileges);    var preferences = Components.classes['@mozilla.org/preferences-service;1'];    if (!preferences)    {      throw 'JavaScriptOptions: unable to get @mozilla.org/preferences-service;1';    }    var prefService = preferences.      getService(Components.interfaces.nsIPrefService);    if (!prefService)    {      throw 'JavaScriptOptions: unable to get nsIPrefService';    }    var pref = prefService.getBranch('');    if (!pref)    {      throw 'JavaScriptOptions: unable to get prefService branch';    }    try    {        this.orig.strict = this.strict =             pref.getBoolPref('javascript.options.strict');    }    catch(e)    {    }    try    {        this.orig.werror = this.werror =             pref.getBoolPref('javascript.options.werror');    }    catch(e)    {    }  }}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/8395/e873572a9620f2ba5ce782b08fb11d64d7ac8cf6/shell.js/clean/js/tests/js1_6/shell.js