<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>126639</bug_id>
          
          <creation_ts>2014-01-08 07:32:40 -0800</creation_ts>
          <short_desc>Switch uses of WTF::bind in MockMediaPlayerMediaSource to C++11 lambdas</short_desc>
          <delta_ts>2016-08-30 01:47:03 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>New Bugs</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Zan Dobersek">zan</reporter>
          <assigned_to name="Zan Dobersek">zan</assigned_to>
          <cc>andersca</cc>
    
    <cc>commit-queue</cc>
    
    <cc>eric.carlson</cc>
    
    <cc>glenn</cc>
    
    <cc>jer.noble</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>965469</commentid>
    <comment_count>0</comment_count>
    <who name="Zan Dobersek">zan</who>
    <bug_when>2014-01-08 07:32:40 -0800</bug_when>
    <thetext>Switch uses of WTF::bind in MockMediaPlayerMediaSource to C++11 lambdas</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>965471</commentid>
    <comment_count>1</comment_count>
      <attachid>220630</attachid>
    <who name="Zan Dobersek">zan</who>
    <bug_when>2014-01-08 07:34:17 -0800</bug_when>
    <thetext>Created attachment 220630
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>974285</commentid>
    <comment_count>2</comment_count>
      <attachid>220630</attachid>
    <who name="Sergio Villar Senin">svillar</who>
    <bug_when>2014-01-31 07:10:52 -0800</bug_when>
    <thetext>Comment on attachment 220630
Patch

lgtm</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>974298</commentid>
    <comment_count>3</comment_count>
      <attachid>220630</attachid>
    <who name="Jer Noble">jer.noble</who>
    <bug_when>2014-01-31 08:22:52 -0800</bug_when>
    <thetext>Comment on attachment 220630
Patch

r=me</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>974301</commentid>
    <comment_count>4</comment_count>
      <attachid>220630</attachid>
    <who name="Jer Noble">jer.noble</who>
    <bug_when>2014-01-31 08:25:08 -0800</bug_when>
    <thetext>Comment on attachment 220630
Patch

Actually, you should protect against this being freed before the lambda is called by passing in a RefPtr into the lambda.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>974400</commentid>
    <comment_count>5</comment_count>
    <who name="Zan Dobersek">zan</who>
    <bug_when>2014-01-31 11:55:32 -0800</bug_when>
    <thetext>(In reply to comment #4)
&gt; (From update of attachment 220630 [details])
&gt; 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&apos;s obvious it probably should be.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>974422</commentid>
    <comment_count>6</comment_count>
    <who name="Jer Noble">jer.noble</who>
    <bug_when>2014-01-31 12:39:45 -0800</bug_when>
    <thetext>(In reply to comment #5)
&gt; (In reply to comment #4)
&gt; &gt; (From update of attachment 220630 [details] [details])
&gt; &gt; Actually, you should protect against this being freed before the lambda is called by passing in a RefPtr into the lambda.
&gt; 
&gt; MockMediaPlayerMediaSource is not ref-counted and is not derived from a ref-counted class (MediaPlayerPrivateInterface).
&gt; 
&gt; It&apos;s obvious it probably should be.

In this situation, you can use a WeakPtrFactory and WeakPtrs without making the class RefCounted.  Though you&apos;re right this class should probably be RefCounted.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1224525</commentid>
    <comment_count>7</comment_count>
    <who name="Zan Dobersek">zan</who>
    <bug_when>2016-08-30 01:46:52 -0700</bug_when>
    <thetext>WTF::bind() uses have been removed, making the patch stale.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>220630</attachid>
            <date>2014-01-08 07:34:17 -0800</date>
            <delta_ts>2016-08-30 01:47:03 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-126639-20140108163415.patch</filename>
            <type>text/plain</type>
            <size>2338</size>
            <attacher name="Zan Dobersek">zan</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMTYxNDk3CmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViQ29yZS9D
aGFuZ2VMb2cgYi9Tb3VyY2UvV2ViQ29yZS9DaGFuZ2VMb2cKaW5kZXggZDdhOTgzZDk4YjEzYTQw
MzZjMTU3ZjJlNTY2MjQwYTI2Y2VkZWY3MS4uZjc4ZDExYWIyNzM0YzljYmFmNDIwMGY3YTVkYmE1
OWRjMDEyYjZhYyAxMDA2NDQKLS0tIGEvU291cmNlL1dlYkNvcmUvQ2hhbmdlTG9nCisrKyBiL1Nv
dXJjZS9XZWJDb3JlL0NoYW5nZUxvZwpAQCAtMSw1ICsxLDE3IEBACiAyMDE0LTAxLTA4ICBaYW4g
RG9iZXJzZWsgIDx6ZG9iZXJzZWtAaWdhbGlhLmNvbT4KIAorICAgICAgICBTd2l0Y2ggdXNlcyBv
ZiBXVEY6OmJpbmQgaW4gTW9ja01lZGlhUGxheWVyTWVkaWFTb3VyY2UgdG8gQysrMTEgbGFtYmRh
cworICAgICAgICBodHRwczovL2J1Z3Mud2Via2l0Lm9yZy9zaG93X2J1Zy5jZ2k/aWQ9MTI2NjM5
CisKKyAgIC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ZVQKICAgICBtX3BsYXllci0+dGltZUNoYW5nZWQoKTsKIAogICAgIGlmIChtX3BsYXlpbmcpCi0g
ICAgICAgIGNhbGxPbk1haW5UaHJlYWQoYmluZCgmTW9ja01lZGlhUGxheWVyTWVkaWFTb3VyY2U6
OmFkdmFuY2VDdXJyZW50VGltZSwgdGhpcykpOworICAgICAgICBjYWxsT25NYWluVGhyZWFkKFt0
aGlzXSB7CisgICAgICAgICAgICBhZHZhbmNlQ3VycmVudFRpbWUoKTsKKyAgICAgICAgfSk7CiB9
CiAKIHZvaWQgTW9ja01lZGlhUGxheWVyTWVkaWFTb3VyY2U6OmFkdmFuY2VDdXJyZW50VGltZSgp
Cg==
</data>

          </attachment>
      

    </bug>

</bugzilla>