зеркало из https://github.com/mozilla/pjs.git
Use QI for type-safety check in StopMediaInstance/StartMediaInstance. r=chris.double sr=roc
This commit is contained in:
Родитель
98b2a31dfa
Коммит
15dac51c42
|
@ -6080,8 +6080,12 @@ StopPluginInstance(PresShell *aShell, nsIContent *aContent)
|
||||||
static void
|
static void
|
||||||
StopMediaInstance(PresShell *aShell, nsIContent *aContent)
|
StopMediaInstance(PresShell *aShell, nsIContent *aContent)
|
||||||
{
|
{
|
||||||
nsHTMLMediaElement* element = static_cast<nsHTMLMediaElement*>(aContent);
|
nsCOMPtr<nsIDOMHTMLMediaElement> domMediaElem(do_QueryInterface(aContent));
|
||||||
element->Freeze();
|
if (!domMediaElem)
|
||||||
|
return;
|
||||||
|
|
||||||
|
nsHTMLMediaElement* mediaElem = static_cast<nsHTMLMediaElement*>(aContent);
|
||||||
|
mediaElem->Freeze();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -6133,8 +6137,12 @@ StartPluginInstance(PresShell *aShell, nsIContent *aContent)
|
||||||
static void
|
static void
|
||||||
StartMediaInstance(PresShell *aShell, nsIContent *aContent)
|
StartMediaInstance(PresShell *aShell, nsIContent *aContent)
|
||||||
{
|
{
|
||||||
nsHTMLMediaElement* element = static_cast<nsHTMLMediaElement*>(aContent);
|
nsCOMPtr<nsIDOMHTMLMediaElement> domMediaElem(do_QueryInterface(aContent));
|
||||||
element->Thaw();
|
if (!domMediaElem)
|
||||||
|
return;
|
||||||
|
|
||||||
|
nsHTMLMediaElement* mediaElem = static_cast<nsHTMLMediaElement*>(aContent);
|
||||||
|
mediaElem->Thaw();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче