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.
Created attachment 253057 [details] Proposed patch.
<rdar://problem/20942403>
Comment on attachment 253057 [details] Proposed patch. View in context: https://bugs.webkit.org/attachment.cgi?id=253057&action=review > Source/WebCore/dom/Document.cpp:6556 > - ASSERT(!m_clientToIDMap.contains(&client)); > + if (m_clientToIDMap.contains(&client)) > + return; Seems worth a FIXME with a bug number.
(In reply to comment #3) > Comment on attachment 253057 [details] > Proposed patch. > > View in context: > https://bugs.webkit.org/attachment.cgi?id=253057&action=review > > > Source/WebCore/dom/Document.cpp:6556 > > - ASSERT(!m_clientToIDMap.contains(&client)); > > + if (m_clientToIDMap.contains(&client)) > > + return; > > Seems worth a FIXME with a bug number. Indeed. I filed https://webkit.org/b/144970, will reference it in code.
Committed r184306: https://trac.webkit.org/r184306