Title: [244801] trunk/Source
Revision
244801
Author
[email protected]
Date
2019-04-30 13:21:11 -0700 (Tue, 30 Apr 2019)

Log Message

Unreviewed, rolling out r244773.
https://bugs.webkit.org/show_bug.cgi?id=197436

Causing assertion failures on debug queues (Requested by
ShawnRoberts on #webkit).

Reverted changeset:

"Make Document audio producers use WeakPtr"
https://bugs.webkit.org/show_bug.cgi?id=197382
https://trac.webkit.org/changeset/244773

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (244800 => 244801)


--- trunk/Source/WTF/ChangeLog	2019-04-30 20:20:37 UTC (rev 244800)
+++ trunk/Source/WTF/ChangeLog	2019-04-30 20:21:11 UTC (rev 244801)
@@ -1,3 +1,17 @@
+2019-04-30  Commit Queue  <[email protected]>
+
+        Unreviewed, rolling out r244773.
+        https://bugs.webkit.org/show_bug.cgi?id=197436
+
+        Causing assertion failures on debug queues (Requested by
+        ShawnRoberts on #webkit).
+
+        Reverted changeset:
+
+        "Make Document audio producers use WeakPtr"
+        https://bugs.webkit.org/show_bug.cgi?id=197382
+        https://trac.webkit.org/changeset/244773
+
 2019-04-30  Youenn Fablet  <[email protected]>
 
         Make Document audio producers use WeakPtr

Modified: trunk/Source/WTF/wtf/WeakHashSet.h (244800 => 244801)


--- trunk/Source/WTF/wtf/WeakHashSet.h	2019-04-30 20:20:37 UTC (rev 244800)
+++ trunk/Source/WTF/wtf/WeakHashSet.h	2019-04-30 20:21:11 UTC (rev 244801)
@@ -25,7 +25,6 @@
 
 #pragma once
 
-#include <wtf/Algorithms.h>
 #include <wtf/HashSet.h>
 #include <wtf/HashTraits.h>
 #include <wtf/WeakPtr.h>
@@ -124,11 +123,6 @@
         return true;
     }
 
-    bool hasNullReferences() const
-    {
-        return WTF::anyOf(m_set, [] (auto& value) { return !value->get(); });
-    }
-
     unsigned computeSize() const
     {
         const_cast<WeakReferenceSet&>(m_set).removeIf([] (auto& value) { return !value->get(); });

Modified: trunk/Source/WebCore/ChangeLog (244800 => 244801)


--- trunk/Source/WebCore/ChangeLog	2019-04-30 20:20:37 UTC (rev 244800)
+++ trunk/Source/WebCore/ChangeLog	2019-04-30 20:21:11 UTC (rev 244801)
@@ -1,5 +1,19 @@
 2019-04-30  Commit Queue  <[email protected]>
 
+        Unreviewed, rolling out r244773.
+        https://bugs.webkit.org/show_bug.cgi?id=197436
+
+        Causing assertion failures on debug queues (Requested by
+        ShawnRoberts on #webkit).
+
+        Reverted changeset:
+
+        "Make Document audio producers use WeakPtr"
+        https://bugs.webkit.org/show_bug.cgi?id=197382
+        https://trac.webkit.org/changeset/244773
+
+2019-04-30  Commit Queue  <[email protected]>
+
         Unreviewed, rolling out r244774.
         https://bugs.webkit.org/show_bug.cgi?id=197431
 

Modified: trunk/Source/WebCore/Modules/mediastream/MediaStreamTrack.h (244800 => 244801)


--- trunk/Source/WebCore/Modules/mediastream/MediaStreamTrack.h	2019-04-30 20:20:37 UTC (rev 244800)
+++ trunk/Source/WebCore/Modules/mediastream/MediaStreamTrack.h	2019-04-30 20:21:11 UTC (rev 244801)
@@ -51,7 +51,8 @@
     : public RefCounted<MediaStreamTrack>
     , public ActiveDOMObject
     , public EventTargetWithInlineData
-    , public MediaProducer
+    , public CanMakeWeakPtr<MediaStreamTrack>
+    , private MediaProducer
     , private MediaStreamTrackPrivate::Observer
 #if !RELEASE_LOG_DISABLED
     , private LoggerHelper

Modified: trunk/Source/WebCore/dom/Document.cpp (244800 => 244801)


--- trunk/Source/WebCore/dom/Document.cpp	2019-04-30 20:20:37 UTC (rev 244800)
+++ trunk/Source/WebCore/dom/Document.cpp	2019-04-30 20:21:11 UTC (rev 244801)
@@ -3902,13 +3902,13 @@
 
 void Document::addAudioProducer(MediaProducer& audioProducer)
 {
-    m_audioProducers.add(audioProducer);
+    m_audioProducers.add(&audioProducer);
     updateIsPlayingMedia();
 }
 
 void Document::removeAudioProducer(MediaProducer& audioProducer)
 {
-    m_audioProducers.remove(audioProducer);
+    m_audioProducers.remove(&audioProducer);
     updateIsPlayingMedia();
 }
 
@@ -3926,11 +3926,9 @@
 
 void Document::updateIsPlayingMedia(uint64_t sourceElementID)
 {
-    ASSERT(!m_audioProducers.hasNullReferences());
-
     MediaProducer::MediaStateFlags state = MediaProducer::IsNotPlaying;
-    for (auto& audioProducer : m_audioProducers)
-        state |= audioProducer.mediaState();
+    for (auto* audioProducer : m_audioProducers)
+        state |= audioProducer->mediaState();
 
 #if ENABLE(MEDIA_SESSION)
     if (HTMLMediaElement* sourceElement = HTMLMediaElement::elementWithID(sourceElementID)) {
@@ -3971,8 +3969,8 @@
 
 void Document::pageMutedStateDidChange()
 {
-    for (auto& audioProducer : m_audioProducers)
-        audioProducer.pageMutedStateDidChange();
+    for (auto* audioProducer : m_audioProducers)
+        audioProducer->pageMutedStateDidChange();
 }
 
 static bool isNodeInSubtree(Node& node, Node& container, Document::NodeRemoval nodeRemoval)

Modified: trunk/Source/WebCore/dom/Document.h (244800 => 244801)


--- trunk/Source/WebCore/dom/Document.h	2019-04-30 20:20:37 UTC (rev 244800)
+++ trunk/Source/WebCore/dom/Document.h	2019-04-30 20:21:11 UTC (rev 244801)
@@ -66,7 +66,6 @@
 #include <wtf/Logger.h>
 #include <wtf/ObjectIdentifier.h>
 #include <wtf/UniqueRef.h>
-#include <wtf/WeakHashSet.h>
 #include <wtf/WeakPtr.h>
 #include <wtf/text/AtomicStringHash.h>
 
@@ -1892,7 +1891,7 @@
 
     Ref<CSSFontSelector> m_fontSelector;
 
-    WeakHashSet<MediaProducer> m_audioProducers;
+    HashSet<MediaProducer*> m_audioProducers;
 
     HashSet<ShadowRoot*> m_inDocumentShadowRoots;
 

Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (244800 => 244801)


--- trunk/Source/WebCore/html/HTMLMediaElement.cpp	2019-04-30 20:20:37 UTC (rev 244800)
+++ trunk/Source/WebCore/html/HTMLMediaElement.cpp	2019-04-30 20:21:11 UTC (rev 244801)
@@ -1768,9 +1768,9 @@
             if (!weakThis)
                 return;
 
-            auto currentMediaTime = this->currentMediaTime();
+            auto currentMediaTime = weakThis->currentMediaTime();
             INFO_LOG(LOGIDENTIFIER, " lambda, currentMediaTime: ", currentMediaTime);
-            this->updateActiveTextTrackCues(currentMediaTime);
+            weakThis->updateActiveTextTrackCues(currentMediaTime);
         }, nextInterestingTime);
     }
 

Modified: trunk/Source/WebCore/html/HTMLMediaElement.h (244800 => 244801)


--- trunk/Source/WebCore/html/HTMLMediaElement.h	2019-04-30 20:20:37 UTC (rev 244800)
+++ trunk/Source/WebCore/html/HTMLMediaElement.h	2019-04-30 20:21:11 UTC (rev 244801)
@@ -573,8 +573,6 @@
 
     enum class AutoplayEventPlaybackState { None, PreventedAutoplay, StartedWithUserGesture, StartedWithoutUserGesture };
 
-    using HTMLElement::weakPtrFactory;
-
 protected:
     HTMLMediaElement(const QualifiedName&, Document&, bool createdByParser);
     virtual void finishInitialization();

Modified: trunk/Source/WebCore/page/MediaProducer.h (244800 => 244801)


--- trunk/Source/WebCore/page/MediaProducer.h	2019-04-30 20:20:37 UTC (rev 244800)
+++ trunk/Source/WebCore/page/MediaProducer.h	2019-04-30 20:21:11 UTC (rev 244801)
@@ -25,11 +25,9 @@
 
 #pragma once
 
-#include <wtf/WeakPtr.h>
-
 namespace WebCore {
 
-class MediaProducer : public CanMakeWeakPtr<MediaProducer> {
+class MediaProducer {
 public:
     enum MediaState {
         IsNotPlaying = 0,
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to