rem: var prefSvc; 
context:   observe: function(aSubject, aTopic, aData) {    switch (aTopic) {    case "Migration:Progress":      document.getElementById("progressBar").value = aData;      break;    case "Migration:Started":      break;    case "Migration:ItemBeforeMigrate":      var label = document.getElementById(aData + "_migrated");      if (label)        label.setAttribute("class", "migration-in-progress");      break;    case "Migration:ItemAfterMigrate":      var label = document.getElementById(aData + "_migrated");      if (label)        label.setAttribute("class", "migration-finished");      break;    case "Migration:Ended":      if (this._autoMigrate) {        if (this._newHomePage) {          var prefSvc;          try {            // set homepage properly - we must also ensure the pref branch            // saves the file in the correct place, because the migrating code            // sometimes changes it to be able to load old pref files.            prefSvc = Components.classes["@mozilla.org/preferences-service;1"]                                .getService(Components.interfaces                                                      .nsIPrefService);            var prefBranch = prefSvc.getBranch(null);            var str = Components.classes["@mozilla.org/supports-string;1"]                                .createInstance(nsISupportsString);            str.data = this._newHomePage;            prefBranch.setComplexValue("browser.startup.homepage",                                       nsISupportsString,                                       str);            var dirSvc = Components.classes["@mozilla.org/file/directory_service;1"]                                   .getService(Components.interfaces.nsIProperties);            var prefFile = dirSvc.get("ProfDS", Components.interfaces.nsIFile);            prefFile.append("prefs.js");            prefSvc.savePrefFile(prefFile);          } catch(ex) {            dump(ex);          }        }        // We're done now.        this._wiz.canAdvance = true;        this._wiz.advance();        setTimeout(function() {window.close();}, 5000);      }      else {        this._wiz.canAdvance = true;        this._wiz.advance();      }      break;    }  },
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/9421/f2c2b55aaa0279a45003d65768b29039eb2fb03d/migration.js/buggy/suite/profile/migration/migration.js