CPluginManager::GetURL(nsISupports* pluginInst, const char* url, const char* target, nsIPluginStreamListener* streamListener, const char* altHost, const char* referrer, PRBool forceJSEnabled) { if (altHost != NULL || referrer != NULL || forceJSEnabled != PR_FALSE) { return NPERR_INVALID_PARAM; }  nsIPluginInstance* inst = NULL; nsresult rslt = pluginInst->QueryInterface(NS_GET_IID(nsIPluginInstance), (void**)&inst); if (rslt != NS_OK) return rslt; CPluginInstancePeer* instancePeer = NULL; rslt = inst->GetPeer((nsIPluginInstancePeer**)&instancePeer); if (rslt != NS_OK) { inst->Release(); return rslt; } NPP npp = instancePeer->GetNPPInstance();  NPError err; if (streamListener) { CPluginInputStream* inStr = new CPluginInputStream(streamListener); if (inStr == NULL) { instancePeer->Release(); inst->Release(); return NS_ERROR_OUT_OF_MEMORY; } inStr->AddRef();  err = NPN_GetURLNotify(npp, url, target, inStr); } else { err = NPN_GetURL(npp, url, target); } instancePeer->Release(); inst->Release(); return fromNPError[err]; }
GetURL(const char** result) { *result = mURL; return NS_OK; }
CPluginManager::GetURL(nsISupports* pluginInst,                        const char* url,                        const char* target,                       nsIPluginStreamListener* streamListener,                       const char* altHost,                       const char* referrer,                       PRBool forceJSEnabled){    if (altHost != NULL || referrer != NULL || forceJSEnabled != PR_FALSE) {        return NPERR_INVALID_PARAM;    }    nsIPluginInstance* inst = NULL;    nsresult rslt = pluginInst->QueryInterface(NS_GET_IID(nsIPluginInstance), (void**)&inst);    if (rslt != NS_OK) return rslt;	CPluginInstancePeer* instancePeer = NULL;    rslt = inst->GetPeer((nsIPluginInstancePeer**)&instancePeer);    if (rslt != NS_OK) {        inst->Release();        return rslt;    }    NPP npp = instancePeer->GetNPPInstance();    NPError err;    if (streamListener) {        CPluginInputStream* inStr = new CPluginInputStream(streamListener);        if (inStr == NULL) {            instancePeer->Release();            inst->Release();            return NS_ERROR_OUT_OF_MEMORY;        }        inStr->AddRef();            err = NPN_GetURLNotify(npp, url, target, inStr);    }    else {        err = NPN_GetURL(npp, url, target);    }    instancePeer->Release();    inst->Release();    return fromNPError[err];}