зеркало из https://github.com/mozilla/pjs.git
Backed out changeset abd5a41c0b70
This commit is contained in:
Родитель
e246f1bee7
Коммит
07c46af0fe
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче