Title: [224444] trunk/Source/WebCore
- Revision
- 224444
- Author
- rn...@webkit.org
- Date
- 2017-11-03 17:36:08 -0700 (Fri, 03 Nov 2017)
Log Message
ASSERTION FAILED: NoEventDispatchAssertion::InMainThread::isEventAllowed() || (frameView && frameView->isInChildFrameWithFrameFlattening())
https://bugs.webkit.org/show_bug.cgi?id=179259
Reviewed by Youenn Fablet.
Avoid updating the layout inside HTMLMediaElement::stop() and MediaElementSession::~MediaElementSession
No new tests since existing tests cover this.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::userCancelledLoad): Don't update VTT cues when the active DOM objects are being stopped.
* platform/audio/mac/MediaSessionManagerMac.mm:
(WebCore::MediaSessionManagerMac::removeSession): Update the updateNowPlayingInfo asynchronously
since this function can be called inside HTMLMediaElement::~HTMLMediaElement.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (224443 => 224444)
--- trunk/Source/WebCore/ChangeLog 2017-11-04 00:35:08 UTC (rev 224443)
+++ trunk/Source/WebCore/ChangeLog 2017-11-04 00:36:08 UTC (rev 224444)
@@ -1,3 +1,20 @@
+2017-11-03 Ryosuke Niwa <rn...@webkit.org>
+
+ ASSERTION FAILED: NoEventDispatchAssertion::InMainThread::isEventAllowed() || (frameView && frameView->isInChildFrameWithFrameFlattening())
+ https://bugs.webkit.org/show_bug.cgi?id=179259
+
+ Reviewed by Youenn Fablet.
+
+ Avoid updating the layout inside HTMLMediaElement::stop() and MediaElementSession::~MediaElementSession
+
+ No new tests since existing tests cover this.
+
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::userCancelledLoad): Don't update VTT cues when the active DOM objects are being stopped.
+ * platform/audio/mac/MediaSessionManagerMac.mm:
+ (WebCore::MediaSessionManagerMac::removeSession): Update the updateNowPlayingInfo asynchronously
+ since this function can be called inside HTMLMediaElement::~HTMLMediaElement.
+
2017-11-03 Alex Christensen <achristen...@webkit.org>
Add WEBCORE_EXPORT to CachedResourceHandleBase
Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (224443 => 224444)
--- trunk/Source/WebCore/html/HTMLMediaElement.cpp 2017-11-04 00:35:08 UTC (rev 224443)
+++ trunk/Source/WebCore/html/HTMLMediaElement.cpp 2017-11-04 00:36:08 UTC (rev 224444)
@@ -5344,7 +5344,12 @@
// Reset m_readyState since m_player is gone.
m_readyState = HAVE_NOTHING;
updateMediaController();
+
#if ENABLE(VIDEO_TRACK)
+ auto* context = scriptExecutionContext();
+ if (!context || context->activeDOMObjectsAreStopped())
+ return; // Document is about to be destructed. Avoid updating layout in updateActiveTextTrackCues.
+
updateActiveTextTrackCues(MediaTime::zeroTime());
#endif
}
Modified: trunk/Source/WebCore/platform/audio/mac/MediaSessionManagerMac.mm (224443 => 224444)
--- trunk/Source/WebCore/platform/audio/mac/MediaSessionManagerMac.mm 2017-11-04 00:35:08 UTC (rev 224443)
+++ trunk/Source/WebCore/platform/audio/mac/MediaSessionManagerMac.mm 2017-11-04 00:36:08 UTC (rev 224444)
@@ -95,7 +95,7 @@
{
PlatformMediaSessionManager::removeSession(session);
LOG(Media, "MediaSessionManagerMac::removeSession");
- updateNowPlayingInfo();
+ scheduleUpdateNowPlayingInfo();
}
void MediaSessionManagerMac::sessionWillEndPlayback(PlatformMediaSession& session)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes