Work around HTMLMediaElement::documentDidResumeFromPageCache being called twice
authoreric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 13 May 2015 21:18:57 +0000 (21:18 +0000)
committereric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 13 May 2015 21:18:57 +0000 (21:18 +0000)
https://bugs.webkit.org/show_bug.cgi?id=144969

Reviewed by Alexey Proskuryakov.

* dom/Document.cpp:
(WebCore::Document::addPlaybackTargetPickerClient): Replace ASSERT with early
return to work around https://webkit.org/b/144970.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@184306 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/dom/Document.cpp

index d522d4c976c9c2280e8d3312c68717b519e2acf7..094a015f28a5021eb53b03648815534d61c51da9 100644 (file)
@@ -1,3 +1,14 @@
+2015-05-13  Eric Carlson  <eric.carlson@apple.com>
+
+        Work around HTMLMediaElement::documentDidResumeFromPageCache being called twice
+        https://bugs.webkit.org/show_bug.cgi?id=144969
+
+        Reviewed by Alexey Proskuryakov.
+
+        * dom/Document.cpp:
+        (WebCore::Document::addPlaybackTargetPickerClient): Replace ASSERT with early 
+        return to work around https://webkit.org/b/144970.
+
 2015-05-13  Timothy Horton  <timothy_horton@apple.com>
 
         Going back after resizing causes scroll knob to appear in the middle of the page
index 55aef3dc4ecfbc947e62a44720ffc23a1a3df1ab..ddcf878edd880594cdc184167ce70624b5836733 100644 (file)
@@ -6552,7 +6552,9 @@ void Document::addPlaybackTargetPickerClient(MediaPlaybackTargetClient& client)
     if (!page)
         return;
 
-    ASSERT(!m_clientToIDMap.contains(&client));
+    // FIXME: change this back to an ASSERT once https://webkit.org/b/144970 is fixed.
+    if (m_clientToIDMap.contains(&client))
+        return;
 
     uint64_t contextId = nextPlaybackTargetClientContextId();
     m_clientToIDMap.add(&client, contextId);