Bug 719117 - Use down-cast instead of separate member with correct type. r=roc

This commit is contained in:
Mats Palmgren 2012-05-26 02:43:44 +02:00
parent 21302991da
commit 24ade09d2a

View File

@ -320,7 +320,6 @@ public:
nsStopPluginRunnable(nsPluginInstanceOwner* aInstanceOwner,
nsObjectLoadingContent* aContent)
: mInstanceOwner(aInstanceOwner)
, mContentKungFuDeathGrip(aContent)
, mContent(aContent)
{
NS_ASSERTION(aInstanceOwner, "need an owner");
@ -336,8 +335,7 @@ public:
private:
nsCOMPtr<nsITimer> mTimer;
nsRefPtr<nsPluginInstanceOwner> mInstanceOwner;
nsCOMPtr<nsIObjectLoadingContent> mContentKungFuDeathGrip;
nsObjectLoadingContent* mContent;
nsCOMPtr<nsIObjectLoadingContent> mContent;
};
NS_IMPL_ISUPPORTS_INHERITED1(nsStopPluginRunnable, nsRunnable, nsITimerCallback)
@ -376,7 +374,8 @@ nsStopPluginRunnable::Run()
mTimer = nsnull;
mContent->DoStopPlugin(mInstanceOwner, false, true);
static_cast<nsObjectLoadingContent*>(mContent.get())->
DoStopPlugin(mInstanceOwner, false, true);
return NS_OK;
}