Backed out changeset abd5a41c0b70

This commit is contained in:
Johnny Stenback 2009-01-25 11:19:51 -08:00
Родитель 7bb77ff7d5
Коммит 09acce98d8
2 изменённых файлов: 7 добавлений и 10 удалений

Просмотреть файл

@ -841,6 +841,8 @@ NS_IMETHODIMP nsNPAPIPluginInstance::Stop(void)
}
if (!mStarted) {
// Break our cycle with the peer that owns us.
mPeer = nsnull;
return NS_OK;
}
@ -859,6 +861,8 @@ NS_IMETHODIMP nsNPAPIPluginInstance::Stop(void)
OnPluginDestroy(&fNPP);
if (fCallbacks->destroy == NULL) {
// Break our cycle with the peer that owns us.
mPeer = nsnull;
return NS_ERROR_FAILURE;
}
@ -886,6 +890,9 @@ NS_IMETHODIMP nsNPAPIPluginInstance::Stop(void)
nsJSNPRuntime::OnPluginDestroy(&fNPP);
// Break our cycle with the peer that owns us.
mPeer = nsnull;
if (error != NPERR_NO_ERROR)
return NS_ERROR_FAILURE;
else

Просмотреть файл

@ -5909,16 +5909,6 @@ nsPluginHostImpl::StopPluginInstance(nsIPluginInstance* aInstance)
}
}
}
nsCOMPtr<nsIPluginInstancePeer> peer;
aInstance->GetPeer(getter_AddRefs(peer));
if (peer) {
// Break the reference cycle between the instance, peer, and
// owner.
((nsPluginInstancePeerImpl*)peer.get())->SetOwner(nsnull);
}
return NS_OK;
}