зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1308862 - Null check for the innerWindow. r=jwwang
MozReview-Commit-ID: DXrN3cnqV7U --HG-- extra : rebase_source : a77e55182e9265ebec8a42d3770df7c41c69b286
This commit is contained in:
Родитель
3c1524e5e0
Коммит
2e9466d27e
|
@ -126,11 +126,14 @@ NS_IMPL_ISUPPORTS(WindowDestroyObserver, nsIObserver);
|
||||||
HTMLTrackElement::HTMLTrackElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo)
|
HTMLTrackElement::HTMLTrackElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo)
|
||||||
: nsGenericHTMLElement(aNodeInfo)
|
: nsGenericHTMLElement(aNodeInfo)
|
||||||
, mLoadResourceDispatched(false)
|
, mLoadResourceDispatched(false)
|
||||||
|
, mWindowDestroyObserver(nullptr)
|
||||||
{
|
{
|
||||||
nsISupports* parentObject = OwnerDoc()->GetParentObject();
|
nsISupports* parentObject = OwnerDoc()->GetParentObject();
|
||||||
NS_ENSURE_TRUE_VOID(parentObject);
|
NS_ENSURE_TRUE_VOID(parentObject);
|
||||||
nsCOMPtr<nsPIDOMWindowInner> window = do_QueryInterface(parentObject);
|
nsCOMPtr<nsPIDOMWindowInner> window = do_QueryInterface(parentObject);
|
||||||
mWindowDestroyObserver = new WindowDestroyObserver(this, window->WindowID());
|
if (window) {
|
||||||
|
mWindowDestroyObserver = new WindowDestroyObserver(this, window->WindowID());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
HTMLTrackElement::~HTMLTrackElement()
|
HTMLTrackElement::~HTMLTrackElement()
|
||||||
|
|
Загрузка…
Ссылка в новой задаче