[Webkit-unassigned] [Bug 205460] Update TrackBase to store m_mediaElement as a WeakPtr

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Dec 20 13:20:27 PST 2019


https://bugs.webkit.org/show_bug.cgi?id=205460

--- Comment #15 from Chris Dumez <cdumez at apple.com> ---
(In reply to Darin Adler from comment #14)
> (In reply to Chris Dumez from comment #13)
> > My opinions is that methods should take an an HTMLMediaElement& or a
> > HTMLMediaElement* in parameter. Then, here when saving it as a data member,
> > we would call makeWeakPtr().
> > It should be up to the class that store the data to decide which pointer
> > type to use for storage, not the call site IMHO.
> 
> I agree.
> 
> With one outstanding question:
> 
> How does that relate to Ryosuke's proposal to always use RefPtr and Ref for
> local variables from now on instead of raw pointers and references? Aren't
> arguments just local variables?

I admit I have not usually been following Ryosuke's proposal myself. I will let Ryosuke comment on this then :) Maybe we'd pass a Ref<>&& / RefPtr<>&& in parameter and convert that to a WeakPtr internally as needed for storage?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20191220/fde6916c/attachment.htm>


More information about the webkit-unassigned mailing list