mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
Bug 1308862 - Null check for the innerWindow. r=jwwang
MozReview-Commit-ID: DXrN3cnqV7U --HG-- extra : rebase_source : a77e55182e9265ebec8a42d3770df7c41c69b286
This commit is contained in:
parent
3c1524e5e0
commit
2e9466d27e
@ -126,11 +126,14 @@ NS_IMPL_ISUPPORTS(WindowDestroyObserver, nsIObserver);
|
||||
HTMLTrackElement::HTMLTrackElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo)
|
||||
: nsGenericHTMLElement(aNodeInfo)
|
||||
, mLoadResourceDispatched(false)
|
||||
, mWindowDestroyObserver(nullptr)
|
||||
{
|
||||
nsISupports* parentObject = OwnerDoc()->GetParentObject();
|
||||
NS_ENSURE_TRUE_VOID(parentObject);
|
||||
nsCOMPtr<nsPIDOMWindowInner> window = do_QueryInterface(parentObject);
|
||||
mWindowDestroyObserver = new WindowDestroyObserver(this, window->WindowID());
|
||||
if (window) {
|
||||
mWindowDestroyObserver = new WindowDestroyObserver(this, window->WindowID());
|
||||
}
|
||||
}
|
||||
|
||||
HTMLTrackElement::~HTMLTrackElement()
|
||||
|
Loading…
Reference in New Issue
Block a user