nsresult GMPParent::Init(nsIFile* aPluginDir) { MOZ_ASSERT(aPluginDir); MOZ_ASSERT(GMPThread() == NS_GetCurrentThread()); mDirectory = aPluginDir; nsAutoString leafname; nsresult rv = aPluginDir->GetLeafName(leafname); if (NS_FAILED(rv)) { return rv; } MOZ_ASSERT(leafname.Length() > 4); mName = Substring(leafname, 4); return ReadGMPMetaData(); }
nsresult GMPParent::Init(GeckoMediaPluginService *aService, nsIFile* aPluginDir) { MOZ_ASSERT(aPluginDir); MOZ_ASSERT(aService); MOZ_ASSERT(GMPThread() == NS_GetCurrentThread()); mService = aService; mDirectory = aPluginDir; nsAutoString leafname; nsresult rv = aPluginDir->GetLeafName(leafname); if (NS_FAILED(rv)) { return rv; } LOGD(("%s::%s: %p for %s", __CLASS__, __FUNCTION__, this, NS_LossyConvertUTF16toASCII(leafname).get())); MOZ_ASSERT(leafname.Length() > 4); mName = Substring(leafname, 4); return ReadGMPMetaData(); }