Title: [186254] trunk/Source/WebCore
Revision
186254
Author
cdu...@apple.com
Date
2015-07-02 19:40:00 -0700 (Thu, 02 Jul 2015)

Log Message

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

caused crashes in webaudio tests (Requested by cdumez on
#webkit).

Reverted changeset:

"Ensure media playback is stopped during page close"
https://bugs.webkit.org/show_bug.cgi?id=146554
http://trac.webkit.org/changeset/186251

Patch by Commit Queue <commit-qu...@webkit.org> on 2015-07-02

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (186253 => 186254)


--- trunk/Source/WebCore/ChangeLog	2015-07-03 02:35:08 UTC (rev 186253)
+++ trunk/Source/WebCore/ChangeLog	2015-07-03 02:40:00 UTC (rev 186254)
@@ -1,3 +1,17 @@
+2015-07-02  Commit Queue  <commit-qu...@webkit.org>
+
+        Unreviewed, rolling out r186251.
+        https://bugs.webkit.org/show_bug.cgi?id=146573
+
+        caused crashes in webaudio tests (Requested by cdumez on
+        #webkit).
+
+        Reverted changeset:
+
+        "Ensure media playback is stopped during page close"
+        https://bugs.webkit.org/show_bug.cgi?id=146554
+        http://trac.webkit.org/changeset/186251
+
 2015-07-02  Brent Fulgham  <bfulg...@apple.com>
 
         Ensure media playback is stopped during page close

Modified: trunk/Source/WebCore/Modules/webaudio/AudioContext.h (186253 => 186254)


--- trunk/Source/WebCore/Modules/webaudio/AudioContext.h	2015-07-03 02:35:08 UTC (rev 186253)
+++ trunk/Source/WebCore/Modules/webaudio/AudioContext.h	2015-07-03 02:40:00 UTC (rev 186254)
@@ -90,8 +90,6 @@
 
     Document* document() const; // ASSERTs if document no longer exists.
 
-    Document* hostingDocument() const override final { return document(); }
-
     AudioDestinationNode* destination() { return m_destinationNode.get(); }
     size_t currentSampleFrame() const { return m_destinationNode->currentSampleFrame(); }
     double currentTime() const { return m_destinationNode->currentTime(); }

Modified: trunk/Source/WebCore/dom/Document.cpp (186253 => 186254)


--- trunk/Source/WebCore/dom/Document.cpp	2015-07-03 02:35:08 UTC (rev 186253)
+++ trunk/Source/WebCore/dom/Document.cpp	2015-07-03 02:40:00 UTC (rev 186254)
@@ -112,7 +112,6 @@
 #include "PageGroup.h"
 #include "PageTransitionEvent.h"
 #include "PlatformLocale.h"
-#include "PlatformMediaSessionManager.h"
 #include "PlatformStrategies.h"
 #include "PlugInsResources.h"
 #include "PluginDocument.h"
@@ -701,8 +700,6 @@
     if (svgExtensions())
         accessSVGExtensions().pauseAnimations();
 
-    PlatformMediaSessionManager::sharedManager().stopAllMediaPlaybackForDocument(*this);
-
 #if ENABLE(REQUEST_ANIMATION_FRAME)
     clearScriptedAnimationController();
 #endif

Modified: trunk/Source/WebCore/html/HTMLMediaElement.h (186253 => 186254)


--- trunk/Source/WebCore/html/HTMLMediaElement.h	2015-07-03 02:35:08 UTC (rev 186253)
+++ trunk/Source/WebCore/html/HTMLMediaElement.h	2015-07-03 02:40:00 UTC (rev 186254)
@@ -147,9 +147,7 @@
     MediaPlayerEnums::MovieLoadType movieLoadType() const;
     
     bool inActiveDocument() const { return m_inActiveDocument; }
-
-    Document* hostingDocument() const override final { return &document(); }
-
+    
 // DOM API
 // error state
     PassRefPtr<MediaError> error() const;

Modified: trunk/Source/WebCore/platform/audio/PlatformMediaSession.h (186253 => 186254)


--- trunk/Source/WebCore/platform/audio/PlatformMediaSession.h	2015-07-03 02:35:08 UTC (rev 186253)
+++ trunk/Source/WebCore/platform/audio/PlatformMediaSession.h	2015-07-03 02:40:00 UTC (rev 186254)
@@ -37,7 +37,6 @@
 
 namespace WebCore {
 
-class Document;
 class MediaPlaybackTarget;
 class PlatformMediaSessionClient;
 
@@ -146,8 +145,6 @@
     State m_stateToRestore;
     int m_interruptionCount { 0 };
     bool m_notifyingClient;
-
-    friend class PlatformMediaSessionManager;
 };
 
 class PlatformMediaSessionClient {
@@ -180,8 +177,6 @@
     virtual bool isPlayingToWirelessPlaybackTarget() const { return false; }
     virtual void setShouldPlayToPlaybackTarget(bool) { }
 
-    virtual Document* hostingDocument() const = 0;
-
 protected:
     virtual ~PlatformMediaSessionClient() { }
 };

Modified: trunk/Source/WebCore/platform/audio/PlatformMediaSessionManager.cpp (186253 => 186254)


--- trunk/Source/WebCore/platform/audio/PlatformMediaSessionManager.cpp	2015-07-03 02:35:08 UTC (rev 186253)
+++ trunk/Source/WebCore/platform/audio/PlatformMediaSessionManager.cpp	2015-07-03 02:40:00 UTC (rev 186254)
@@ -29,7 +29,6 @@
 #if ENABLE(VIDEO)
 
 #include "AudioSession.h"
-#include "Document.h"
 #include "Logging.h"
 #include "NotImplemented.h"
 #include "PlatformMediaSession.h"
@@ -330,14 +329,6 @@
     updateSessionState();
 }
 
-void PlatformMediaSessionManager::stopAllMediaPlaybackForDocument(const Document& document)
-{
-    for (auto session : m_sessions) {
-        if (session->client().hostingDocument() == &document)
-            session->pauseSession();
-    }
 }
 
-}
-
 #endif

Modified: trunk/Source/WebCore/platform/audio/PlatformMediaSessionManager.h (186253 => 186254)


--- trunk/Source/WebCore/platform/audio/PlatformMediaSessionManager.h	2015-07-03 02:35:08 UTC (rev 186253)
+++ trunk/Source/WebCore/platform/audio/PlatformMediaSessionManager.h	2015-07-03 02:40:00 UTC (rev 186254)
@@ -36,7 +36,6 @@
 
 namespace WebCore {
 
-class Document;
 class HTMLMediaElement;
 class PlatformMediaSession;
 class RemoteCommandListener;
@@ -57,8 +56,6 @@
     WEBCORE_EXPORT void applicationWillEnterForeground() const;
     WEBCORE_EXPORT void applicationWillEnterBackground() const;
 
-    void stopAllMediaPlaybackForDocument(const Document&);
-
     enum SessionRestrictionFlags {
         NoRestrictions = 0,
         ConcurrentPlaybackNotPermitted = 1 << 0,
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to