add: try { var mapiRegistry = Components.classes[ "@mozilla.org/mapiregistry;1" ]. getService( Components.interfaces.nsIMapiRegistry ); } catch(ex){ mapiRegistry = null; }  
context: function mailnewsOverlayInit() {    const prefbase = "system.windows.lock_ui.";    var mailnewsEnableMapi = document.getElementById("mailnewsEnableMapi");    if (mapiRegistry) {    // initialise preference component.    // While the data is coming from the system registry, we use a set    // of parallel preferences to indicate if the ui should be locked.        try {             var prefService = Components.classes["@mozilla.org/preferences-service;1"]                          .getService()                          .QueryInterface(Components.interfaces.nsIPrefService);            var prefBranch = prefService.getBranch(prefbase);            if (prefBranch && prefBranch.prefIsLocked("defaultMailClient")) {                if (prefBranch.getBoolPref("defaultMailClient"))                    mapiRegistry.setDefaultMailClient();                else                    mapiRegistry.unsetDefaultMailClient();                mailnewsEnableMapi.setAttribute("disabled", "true");           }        }        catch(ex) {}        if (mapiRegistry.isDefaultMailClient)            mailnewsEnableMapi.setAttribute("checked", "true");        else            mailnewsEnableMapi.setAttribute("checked", "false");    }    else        mailnewsEnableMapi.setAttribute("disabled", "true");}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/c9287642f051d03e33dc7e144da189bbeec2fe42/pref-mailnewsOverlay.js/buggy/mailnews/mapi/resources/content/pref-mailnewsOverlay.js