Title: [239801] branches/safari-607-branch/Source/WebCore
- Revision
- 239801
- Author
- [email protected]
- Date
- 2019-01-09 17:38:14 -0800 (Wed, 09 Jan 2019)
Log Message
Cherry-pick r239711. rdar://problem/47158701
REGRESSION (r239519): ASSERTION FAILED: !m_adoptionIsRequired in com.apple.WebCore: void WTF::refIfNotNull<WebCore::CDMSessionMediaSourceAVFObjC> + 53
https://bugs.webkit.org/show_bug.cgi?id=193211
<rdar://problem/46937412>
Reviewed by Eric Carlson.
Make CDMSessionMediaSourceAVFObjC a CanMakeWeakPtr rather than RefCounted, as CDMSessions are stored in
std::unique_ptrs, and not in Ref or RefPtr.
* platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setCDMSession):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239711 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Diff
Modified: branches/safari-607-branch/Source/WebCore/ChangeLog (239800 => 239801)
--- branches/safari-607-branch/Source/WebCore/ChangeLog 2019-01-10 01:38:11 UTC (rev 239800)
+++ branches/safari-607-branch/Source/WebCore/ChangeLog 2019-01-10 01:38:14 UTC (rev 239801)
@@ -1,5 +1,42 @@
2019-01-09 Kocsen Chung <[email protected]>
+ Cherry-pick r239711. rdar://problem/47158701
+
+ REGRESSION (r239519): ASSERTION FAILED: !m_adoptionIsRequired in com.apple.WebCore: void WTF::refIfNotNull<WebCore::CDMSessionMediaSourceAVFObjC> + 53
+ https://bugs.webkit.org/show_bug.cgi?id=193211
+ <rdar://problem/46937412>
+
+ Reviewed by Eric Carlson.
+
+ Make CDMSessionMediaSourceAVFObjC a CanMakeWeakPtr rather than RefCounted, as CDMSessions are stored in
+ std::unique_ptrs, and not in Ref or RefPtr.
+
+ * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
+ * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
+ * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
+ (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setCDMSession):
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239711 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2019-01-07 Jer Noble <[email protected]>
+
+ REGRESSION (r239519): ASSERTION FAILED: !m_adoptionIsRequired in com.apple.WebCore: void WTF::refIfNotNull<WebCore::CDMSessionMediaSourceAVFObjC> + 53
+ https://bugs.webkit.org/show_bug.cgi?id=193211
+ <rdar://problem/46937412>
+
+ Reviewed by Eric Carlson.
+
+ Make CDMSessionMediaSourceAVFObjC a CanMakeWeakPtr rather than RefCounted, as CDMSessions are stored in
+ std::unique_ptrs, and not in Ref or RefPtr.
+
+ * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
+ * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
+ * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
+ (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setCDMSession):
+
+2019-01-09 Kocsen Chung <[email protected]>
+
Cherry-pick r239702. rdar://problem/47158664
Cleanup AudioTrackPrivateMediaStreamCocoa
Modified: branches/safari-607-branch/Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h (239800 => 239801)
--- branches/safari-607-branch/Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h 2019-01-10 01:38:11 UTC (rev 239800)
+++ branches/safari-607-branch/Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h 2019-01-10 01:38:14 UTC (rev 239801)
@@ -41,7 +41,7 @@
class CDMPrivateMediaSourceAVFObjC;
-class CDMSessionMediaSourceAVFObjC : public LegacyCDMSession, public SourceBufferPrivateAVFObjCErrorClient, public RefCounted<CDMSessionMediaSourceAVFObjC> {
+class CDMSessionMediaSourceAVFObjC : public LegacyCDMSession, public SourceBufferPrivateAVFObjCErrorClient, public CanMakeWeakPtr<CDMSessionMediaSourceAVFObjC> {
public:
CDMSessionMediaSourceAVFObjC(CDMPrivateMediaSourceAVFObjC&, LegacyCDMSessionClient*);
virtual ~CDMSessionMediaSourceAVFObjC();
Modified: branches/safari-607-branch/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h (239800 => 239801)
--- branches/safari-607-branch/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h 2019-01-10 01:38:11 UTC (rev 239800)
+++ branches/safari-607-branch/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h 2019-01-10 01:38:14 UTC (rev 239801)
@@ -282,7 +282,7 @@
Deque<RetainPtr<id>> m_sizeChangeObservers;
Timer m_seekTimer;
#if ENABLE(LEGACY_ENCRYPTED_MEDIA)
- RefPtr<CDMSessionMediaSourceAVFObjC> m_session;
+ WeakPtr<CDMSessionMediaSourceAVFObjC> m_session;
#endif
MediaPlayer::NetworkState m_networkState;
MediaPlayer::ReadyState m_readyState;
Modified: branches/safari-607-branch/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm (239800 => 239801)
--- branches/safari-607-branch/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm 2019-01-10 01:38:11 UTC (rev 239800)
+++ branches/safari-607-branch/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm 2019-01-10 01:38:14 UTC (rev 239801)
@@ -911,7 +911,7 @@
if (session == m_session)
return;
- m_session = toCDMSessionMediaSourceAVFObjC(session);
+ m_session = makeWeakPtr(toCDMSessionMediaSourceAVFObjC(session));
if (CDMSessionAVStreamSession* cdmStreamSession = toCDMSessionAVStreamSession(m_session.get()))
cdmStreamSession->setStreamSession(streamSession());
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes