NS_INIT_REFCNT();  mLocation = ::strdup(location); if (mLocation) {  char* colon = ::strchr(mLocation, ':'); if (colon) { if (colon[1] == '/' && colon[2] == '/') { char* slash = ::strchr(colon + 3, '/'); if (slash) *slash = '\0'; } } }  if (theComponentManager) { theComponentManager->CreateInstance(kLiveConnectCID, nsnull, NS_GET_IID(nsILiveconnect), (void**)&mConnection); } else { mConnection = theLiveConnectManager; NS_IF_ADDREF(mConnection); }
NS_INIT_REFCNT();
MRJSecurityContext::MRJSecurityContext(const char* location)    :   mLocation(nsnull), mConnection(nsnull){    NS_INIT_REFCNT();        mLocation = ::strdup(location);    if (mLocation) {        // find the 3rd slash of the URL, hopefully it's in canonical form.        char* colon = ::strchr(mLocation, ':');        if (colon) {            if (colon[1] == '/' && colon[2] == '/') {                char* slash = ::strchr(colon + 3, '/');                if (slash) *slash = '\0';            }        }    }    if (theComponentManager) {        theComponentManager->CreateInstance(kLiveConnectCID, nsnull, NS_GET_IID(nsILiveconnect),                                            (void**)&mConnection);    } else {        mConnection = theLiveConnectManager;        NS_IF_ADDREF(mConnection);    }}