rem: var prefSvc2 = Components.classes["@mozilla.org/preferences-service;1"] .getService(Components.interfaces.nsIPrefService);  const nsIDirectoryServiceContractID = "@mozilla.org/file/directory_service;1"; const nsIProperties = Components.interfaces.nsIProperties; var directoryService =  Components.classes[nsIDirectoryServiceContractID] .getService(nsIProperties); var prefFile = directoryService.get("ProfDS", Components.interfaces.nsIFile); prefFile.append("prefs.js");  prefSvc2.resetPrefs(); prefSvc2.readUserPrefs(prefFile);  
context:   observe: function (aSubject, aTopic, aData)  {    switch (aTopic) {    case "Migration:Started":      break;    case "Migration:ItemBeforeMigrate":      var label = document.getElementById(aData + "_migrated");      if (label)        label.setAttribute("style", "font-weight: bold");      break;    case "Migration:ItemAfterMigrate":      var label = document.getElementById(aData + "_migrated");      if (label)        label.removeAttribute("style");      break;    case "Migration:Ended":      if (this._autoMigrate) {        if (this._newHomePage) {          try {            var prefSvc2 = Components.classes["@mozilla.org/preferences-service;1"]                                     .getService(Components.interfaces.nsIPrefService);            const nsIDirectoryServiceContractID = "@mozilla.org/file/directory_service;1";            const nsIProperties = Components.interfaces.nsIProperties;            var directoryService =  Components.classes[nsIDirectoryServiceContractID]                                          .getService(nsIProperties);            var prefFile = directoryService.get("ProfDS", Components.interfaces.nsIFile);            prefFile.append("prefs.js");            prefSvc2.resetPrefs();            prefSvc2.readUserPrefs(prefFile);            // set homepage properly            var prefSvc = Components.classes["@mozilla.org/preferences-service;1"]                                    .getService(Components.interfaces.nsIPrefBranch);            var str = Components.classes["@mozilla.org/supports-string;1"]                                .createInstance(Components.interfaces.nsISupportsString);            str.data = this._newHomePage;            prefSvc.setComplexValue("browser.startup.homepage",                                    Components.interfaces.nsISupportsString, str);            prefSvc2.savePrefFile(prefFile);          } catch(ex) {             dump(ex);           }        }        // We're done now.        this._wiz.canAdvance = true;        this._wiz.advance();        setTimeout(close, 5000);      }      else {        this._wiz.canAdvance = true;        var nextButton = this._wiz.getButton("next");        nextButton.click();      }      break;    }  },
meta: 5872	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5872/934242ec0d452500c92345f086566df9319b64d4/migration.js/buggy/browser/components/migration/content/migration.js