Attachment #8933289: Switch to WeakPtr for bug #1419363

View | Details | Raw Unified | Return to bug 1419363
Collapse All | Expand All

(-)a/dom/html/HTMLMediaElement.cpp (-1 / +4 lines)
Line     Link Here 
 Lines 5237-5247   public: Link Here 
5237
  {
5237
  {
5238
    NS_ASSERTION(NS_IsMainThread(), "Should be on main thread.");
5238
    NS_ASSERTION(NS_IsMainThread(), "Should be on main thread.");
5239
5239
5240
    if (!mElement) {
5241
      return;
5242
    }
5240
    mElement->NotifyMediaStreamTracksAvailable(aStream);
5243
    mElement->NotifyMediaStreamTracksAvailable(aStream);
5241
  }
5244
  }
5242
5245
5243
private:
5246
private:
5244
  HTMLMediaElement* mElement;
5247
  WeakPtr<HTMLMediaElement> mElement;
5245
};
5248
};
5246
5249
5247
class HTMLMediaElement::MediaStreamTrackListener :
5250
class HTMLMediaElement::MediaStreamTrackListener :

Return to bug 1419363