Remove HTMLMediaElementDestructorScope
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 30 Oct 2019 05:12:28 +0000 (05:12 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 30 Oct 2019 05:12:28 +0000 (05:12 +0000)
https://bugs.webkit.org/show_bug.cgi?id=203600

Reviewed by Chris Dumez.

Removed the workaround introduced in r231392 for the bug 185284 now that it's been fixed.

No new tests since this code should be dead code.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::~HTMLMediaElement):
(WebCore::HTMLMediaElement::isRunningDestructor): Deleted.
(WebCore::HTMLMediaElementDestructorScope::HTMLMediaElementDestructorScope): Deleted.
(WebCore::HTMLMediaElementDestructorScope::~HTMLMediaElementDestructorScope): Deleted.
* html/HTMLMediaElement.h:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::checkCompleted):

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

Source/WebCore/ChangeLog
Source/WebCore/html/HTMLMediaElement.cpp
Source/WebCore/html/HTMLMediaElement.h
Source/WebCore/loader/FrameLoader.cpp

index 04c03df..4752b6e 100644 (file)
@@ -1,3 +1,23 @@
+2019-10-29  Ryosuke Niwa  <rniwa@webkit.org>
+
+        Remove HTMLMediaElementDestructorScope
+        https://bugs.webkit.org/show_bug.cgi?id=203600
+
+        Reviewed by Chris Dumez.
+
+        Removed the workaround introduced in r231392 for the bug 185284 now that it's been fixed.
+
+        No new tests since this code should be dead code.
+
+        * html/HTMLMediaElement.cpp:
+        (WebCore::HTMLMediaElement::~HTMLMediaElement):
+        (WebCore::HTMLMediaElement::isRunningDestructor): Deleted.
+        (WebCore::HTMLMediaElementDestructorScope::HTMLMediaElementDestructorScope): Deleted.
+        (WebCore::HTMLMediaElementDestructorScope::~HTMLMediaElementDestructorScope): Deleted.
+        * html/HTMLMediaElement.h:
+        * loader/FrameLoader.cpp:
+        (WebCore::FrameLoader::checkCompleted):
+
 2019-10-29  Andy Estes  <aestes@apple.com>
 
         [Quick Look] Clean up LegacyPreviewLoaderClients
index fcc9ca9..e099483 100644 (file)
@@ -554,23 +554,8 @@ void HTMLMediaElement::finishInitialization()
     mediaSession().clientWillBeginAutoplaying();
 }
 
-// FIXME: Remove this code once https://webkit.org/b/185284 is fixed.
-static unsigned s_destructorCount = 0;
-
-bool HTMLMediaElement::isRunningDestructor()
-{
-    return !!s_destructorCount;
-}
-
-class HTMLMediaElementDestructorScope {
-public:
-    HTMLMediaElementDestructorScope() { ++s_destructorCount; }
-    ~HTMLMediaElementDestructorScope() { --s_destructorCount; }
-};
-
 HTMLMediaElement::~HTMLMediaElement()
 {
-    HTMLMediaElementDestructorScope destructorScope;
     ALWAYS_LOG(LOGIDENTIFIER);
 
     beginIgnoringTrackDisplayUpdateRequests();
index 7e6cdd1..a69cebb 100644 (file)
@@ -166,8 +166,6 @@ public:
 
     WEBCORE_EXPORT static RefPtr<HTMLMediaElement> bestMediaElementForShowingPlaybackControlsManager(MediaElementSession::PlaybackControlsPurpose);
 
-    static bool isRunningDestructor();
-
     WEBCORE_EXPORT void rewind(double timeDelta);
     WEBCORE_EXPORT void returnToRealtime() override;
 
index b20375a..b78c853 100644 (file)
@@ -842,15 +842,6 @@ void FrameLoader::checkCompleted()
     // Have we completed before?
     if (m_isComplete)
         return;
-    
-#if ENABLE(VIDEO)
-    // FIXME: Remove this code once https://webkit.org/b/185284 is fixed.
-    if (HTMLMediaElement::isRunningDestructor()) {
-        ASSERT_NOT_REACHED();
-        scheduleCheckCompleted();
-        return;
-    }
-#endif
 
     // FIXME: It would be better if resource loads were kicked off after render tree update (or didn't complete synchronously).
     //        https://bugs.webkit.org/show_bug.cgi?id=171729