nsresult rv = mServiceMgr->GetService( cid, nsIAppShellService::GetIID(), (nsISupports**)&mAppShell );
mServiceMgr->GetService( cid, nsIAppShellService::GetIID(), (nsISupports**)&mAppShell );
    static nsIAppShellService *GetAppShell() {        if ( !mAppShell ) {            if ( mServiceMgr ) {                nsCID cid = NS_APPSHELL_SERVICE_CID;                nsresult rv = mServiceMgr->GetService( cid,                                                       nsIAppShellService::GetIID(),                                                       (nsISupports**)&mAppShell );            }        }        return mAppShell;    }