rem: var preferences = Components.classes['@mozilla.org/preferences;1']; 
add: var preferences = Components.classes['@mozilla.org/preferences-service;1']; 
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;1'];    if (!preferences)    {      throw 'JavaScriptOptions: unable to get @mozilla.org/preference;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: 5872	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5872/d186d0067710bbabf641699f29048d4a9c3d955d/shell.js/clean/js/tests/js1_4/shell.js