<?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>144969</bug_id>
          
          <creation_ts>2015-05-13 13:49:27 -0700</creation_ts>
          <short_desc>Work around HTMLMediaElement::documentDidResumeFromPageCache being called twice</short_desc>
          <delta_ts>2015-05-13 14:21:50 -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>Media</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Eric Carlson">eric.carlson</reporter>
          <assigned_to name="Eric Carlson">eric.carlson</assigned_to>
          <cc>commit-queue</cc>
    
    <cc>esprehn+autocc</cc>
    
    <cc>kangil.han</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1094574</commentid>
    <comment_count>0</comment_count>
    <who name="Eric Carlson">eric.carlson</who>
    <bug_when>2015-05-13 13:49:27 -0700</bug_when>
    <thetext>HTMLMediaElement::documentDidResumeFromPageCache is called twice when a page is restored from the page cache, which causes Document::addPlaybackTargetPickerClient to assert in a debug build and to add the client twice in a release build.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1094576</commentid>
    <comment_count>1</comment_count>
      <attachid>253057</attachid>
    <who name="Eric Carlson">eric.carlson</who>
    <bug_when>2015-05-13 13:56:39 -0700</bug_when>
    <thetext>Created attachment 253057
Proposed patch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1094577</commentid>
    <comment_count>2</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2015-05-13 13:57:34 -0700</bug_when>
    <thetext>&lt;rdar://problem/20942403&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1094578</commentid>
    <comment_count>3</comment_count>
      <attachid>253057</attachid>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2015-05-13 13:58:28 -0700</bug_when>
    <thetext>Comment on attachment 253057
Proposed patch.

View in context: https://bugs.webkit.org/attachment.cgi?id=253057&amp;action=review

&gt; Source/WebCore/dom/Document.cpp:6556
&gt; -    ASSERT(!m_clientToIDMap.contains(&amp;client));
&gt; +    if (m_clientToIDMap.contains(&amp;client))
&gt; +        return;

Seems worth a FIXME with a bug number.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1094585</commentid>
    <comment_count>4</comment_count>
    <who name="Eric Carlson">eric.carlson</who>
    <bug_when>2015-05-13 14:16:35 -0700</bug_when>
    <thetext>(In reply to comment #3)
&gt; Comment on attachment 253057 [details]
&gt; Proposed patch.
&gt; 
&gt; View in context:
&gt; https://bugs.webkit.org/attachment.cgi?id=253057&amp;action=review
&gt; 
&gt; &gt; Source/WebCore/dom/Document.cpp:6556
&gt; &gt; -    ASSERT(!m_clientToIDMap.contains(&amp;client));
&gt; &gt; +    if (m_clientToIDMap.contains(&amp;client))
&gt; &gt; +        return;
&gt; 
&gt; Seems worth a FIXME with a bug number.

Indeed. I filed https://webkit.org/b/144970, will reference it in code.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1094586</commentid>
    <comment_count>5</comment_count>
    <who name="Eric Carlson">eric.carlson</who>
    <bug_when>2015-05-13 14:21:34 -0700</bug_when>
    <thetext>Committed r184306: https://trac.webkit.org/r184306</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>253057</attachid>
            <date>2015-05-13 13:56:39 -0700</date>
            <delta_ts>2015-05-13 14:21:50 -0700</delta_ts>
            <desc>Proposed patch.</desc>
            <filename>restore_from_cache_patch.txt</filename>
            <type>text/plain</type>
            <size>1171</size>
            <attacher name="Eric Carlson">eric.carlson</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XZWJDb3JlL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBTb3VyY2UvV2Vi
Q29yZS9DaGFuZ2VMb2cJKHJldmlzaW9uIDE4NDMwMykKKysrIFNvdXJjZS9XZWJDb3JlL0NoYW5n
ZUxvZwkod29ya2luZyBjb3B5KQpAQCAtMSwzICsxLDEzIEBACisyMDE1LTA1LTEzICBFcmljIENh
cmxzb24gIDxlcmljLmNhcmxzb25AYXBwbGUuY29tPgorCisgICAgICAgIFdvcmsgYXJvdW5kIEhU
TUxNZWRpYUVsZW1lbnQ6OmRvY3VtZW50RGlkUmVzdW1lRnJvbVBhZ2VDYWNoZSBiZWluZyBjYWxs
ZWQgdHdpY2UKKyAgICAgICAgaHR0cHM6Ly9idWdzLndlYmtpdC5vcmcvc2hvd19idWcuY2dpP2lk
PTE0NDk2OQorCisgICAgICAgIFJldmlld2VkIGJ5IE5PQk9EWSAoT09QUyEpLgorCisgICAgICAg
ICogZG9tL0RvY3VtZW50LmNwcDoKKyAgICAgICAgKFdlYkNvcmU6OkRvY3VtZW50OjphZGRQbGF5
YmFja1RhcmdldFBpY2tlckNsaWVudCk6CisKIDIwMTUtMDUtMTMgIEJldGggRGFraW4gIDxiZGFr
aW5AYXBwbGUuY29tPgogCiAgICAgICAgIE5lZWQgU1BJIHRvIHNldCB0aGUgb3ZlcmxheSBzY3Jv
bGwgYmFyIHN0eWxlCkluZGV4OiBTb3VyY2UvV2ViQ29yZS9kb20vRG9jdW1lbnQuY3BwCj09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT0KLS0tIFNvdXJjZS9XZWJDb3JlL2RvbS9Eb2N1bWVudC5jcHAJKHJldmlzaW9uIDE4NDI4
NikKKysrIFNvdXJjZS9XZWJDb3JlL2RvbS9Eb2N1bWVudC5jcHAJKHdvcmtpbmcgY29weSkKQEAg
LTY1NTIsNyArNjU1Miw4IEBAIHZvaWQgRG9jdW1lbnQ6OmFkZFBsYXliYWNrVGFyZ2V0UGlja2Vy
Q2wKICAgICBpZiAoIXBhZ2UpCiAgICAgICAgIHJldHVybjsKIAotICAgIEFTU0VSVCghbV9jbGll
bnRUb0lETWFwLmNvbnRhaW5zKCZjbGllbnQpKTsKKyAgICBpZiAobV9jbGllbnRUb0lETWFwLmNv
bnRhaW5zKCZjbGllbnQpKQorICAgICAgICByZXR1cm47CiAKICAgICB1aW50NjRfdCBjb250ZXh0
SWQgPSBuZXh0UGxheWJhY2tUYXJnZXRDbGllbnRDb250ZXh0SWQoKTsKICAgICBtX2NsaWVudFRv
SURNYXAuYWRkKCZjbGllbnQsIGNvbnRleHRJZCk7Cg==
</data>

          </attachment>
      

    </bug>

</bugzilla>