зеркало из https://github.com/mozilla/pjs.git
Fixing 27486, r=beard
This commit is contained in:
Родитель
4d6b7b8d11
Коммит
69b4d53f01
|
@ -208,6 +208,8 @@ public:
|
||||||
NS_IMETHOD GetFrameName(nsString& aResult) const;
|
NS_IMETHOD GetFrameName(nsString& aResult) const;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
NS_IMETHOD Destroy(nsIPresContext* aPresContext);
|
||||||
|
|
||||||
NS_IMETHOD ContentChanged(nsIPresContext* aPresContext,
|
NS_IMETHOD ContentChanged(nsIPresContext* aPresContext,
|
||||||
nsIContent* aChild,
|
nsIContent* aChild,
|
||||||
nsISupports* aSubContent);
|
nsISupports* aSubContent);
|
||||||
|
@ -401,6 +403,24 @@ nsObjectFrame::Init(nsIPresContext* aPresContext,
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NS_IMETHODIMP
|
||||||
|
nsObjectFrame::Destroy(nsIPresContext* aPresContext)
|
||||||
|
{
|
||||||
|
// we need to finish with the plugin before native window is destroyed
|
||||||
|
// doing this in the destructor is too late.
|
||||||
|
if(mInstanceOwner != nsnull)
|
||||||
|
{
|
||||||
|
nsIPluginInstance *inst;
|
||||||
|
mInstanceOwner->GetInstance(inst);
|
||||||
|
if(inst != nsnull)
|
||||||
|
{
|
||||||
|
inst->Stop();
|
||||||
|
inst->SetWindow(nsnull);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nsObjectFrameSuper::Destroy(aPresContext);
|
||||||
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsObjectFrame::GetFrameType(nsIAtom** aType) const
|
nsObjectFrame::GetFrameType(nsIAtom** aType) const
|
||||||
{
|
{
|
||||||
|
@ -1414,8 +1434,6 @@ nsPluginInstanceOwner::~nsPluginInstanceOwner()
|
||||||
if (nsnull != mInstance)
|
if (nsnull != mInstance)
|
||||||
{
|
{
|
||||||
mPluginHost->StopPluginInstance(mInstance);
|
mPluginHost->StopPluginInstance(mInstance);
|
||||||
mInstance->Stop();
|
|
||||||
mInstance->SetWindow(nsnull);
|
|
||||||
NS_RELEASE(mInstance);
|
NS_RELEASE(mInstance);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -208,6 +208,8 @@ public:
|
||||||
NS_IMETHOD GetFrameName(nsString& aResult) const;
|
NS_IMETHOD GetFrameName(nsString& aResult) const;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
NS_IMETHOD Destroy(nsIPresContext* aPresContext);
|
||||||
|
|
||||||
NS_IMETHOD ContentChanged(nsIPresContext* aPresContext,
|
NS_IMETHOD ContentChanged(nsIPresContext* aPresContext,
|
||||||
nsIContent* aChild,
|
nsIContent* aChild,
|
||||||
nsISupports* aSubContent);
|
nsISupports* aSubContent);
|
||||||
|
@ -401,6 +403,24 @@ nsObjectFrame::Init(nsIPresContext* aPresContext,
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NS_IMETHODIMP
|
||||||
|
nsObjectFrame::Destroy(nsIPresContext* aPresContext)
|
||||||
|
{
|
||||||
|
// we need to finish with the plugin before native window is destroyed
|
||||||
|
// doing this in the destructor is too late.
|
||||||
|
if(mInstanceOwner != nsnull)
|
||||||
|
{
|
||||||
|
nsIPluginInstance *inst;
|
||||||
|
mInstanceOwner->GetInstance(inst);
|
||||||
|
if(inst != nsnull)
|
||||||
|
{
|
||||||
|
inst->Stop();
|
||||||
|
inst->SetWindow(nsnull);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nsObjectFrameSuper::Destroy(aPresContext);
|
||||||
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsObjectFrame::GetFrameType(nsIAtom** aType) const
|
nsObjectFrame::GetFrameType(nsIAtom** aType) const
|
||||||
{
|
{
|
||||||
|
@ -1414,8 +1434,6 @@ nsPluginInstanceOwner::~nsPluginInstanceOwner()
|
||||||
if (nsnull != mInstance)
|
if (nsnull != mInstance)
|
||||||
{
|
{
|
||||||
mPluginHost->StopPluginInstance(mInstance);
|
mPluginHost->StopPluginInstance(mInstance);
|
||||||
mInstance->Stop();
|
|
||||||
mInstance->SetWindow(nsnull);
|
|
||||||
NS_RELEASE(mInstance);
|
NS_RELEASE(mInstance);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче