RESOLVED WONTFIX 126639
Switch uses of WTF::bind in MockMediaPlayerMediaSource to C++11 lambdas
https://bugs.webkit.org/show_bug.cgi?id=126639
Summary Switch uses of WTF::bind in MockMediaPlayerMediaSource to C++11 lambdas
Zan Dobersek
Reported 2014-01-08 07:32:40 PST
Switch uses of WTF::bind in MockMediaPlayerMediaSource to C++11 lambdas
Attachments
Patch (2.28 KB, patch)
2014-01-08 07:34 PST, Zan Dobersek
no flags
Zan Dobersek
Comment 1 2014-01-08 07:34:17 PST
Sergio Villar Senin
Comment 2 2014-01-31 07:10:52 PST
Comment on attachment 220630 [details] Patch lgtm
Jer Noble
Comment 3 2014-01-31 08:22:52 PST
Comment on attachment 220630 [details] Patch r=me
Jer Noble
Comment 4 2014-01-31 08:25:08 PST
Comment on attachment 220630 [details] Patch Actually, you should protect against this being freed before the lambda is called by passing in a RefPtr into the lambda.
Zan Dobersek
Comment 5 2014-01-31 11:55:32 PST
(In reply to comment #4) > (From update of attachment 220630 [details]) > Actually, you should protect against this being freed before the lambda is called by passing in a RefPtr into the lambda. MockMediaPlayerMediaSource is not ref-counted and is not derived from a ref-counted class (MediaPlayerPrivateInterface). It's obvious it probably should be.
Jer Noble
Comment 6 2014-01-31 12:39:45 PST
(In reply to comment #5) > (In reply to comment #4) > > (From update of attachment 220630 [details] [details]) > > Actually, you should protect against this being freed before the lambda is called by passing in a RefPtr into the lambda. > > MockMediaPlayerMediaSource is not ref-counted and is not derived from a ref-counted class (MediaPlayerPrivateInterface). > > It's obvious it probably should be. In this situation, you can use a WeakPtrFactory and WeakPtrs without making the class RefCounted. Though you're right this class should probably be RefCounted.
Zan Dobersek
Comment 7 2016-08-30 01:46:52 PDT
WTF::bind() uses have been removed, making the patch stale.
Note You need to log in before you can comment on or make changes to this bug.