Title: [246001] branches/safari-607-branch/Source/WebCore
- Revision
- 246001
- Author
- alanc...@apple.com
- Date
- 2019-05-31 16:49:14 -0700 (Fri, 31 May 2019)
Log Message
Apply patch. rdar://problem/50871594
Modified Paths
Diff
Modified: branches/safari-607-branch/Source/WebCore/ChangeLog (246000 => 246001)
--- branches/safari-607-branch/Source/WebCore/ChangeLog 2019-05-31 23:43:29 UTC (rev 246000)
+++ branches/safari-607-branch/Source/WebCore/ChangeLog 2019-05-31 23:49:14 UTC (rev 246001)
@@ -1,3 +1,24 @@
+2019-05-31 Alan Coon <alanc...@apple.com>
+
+ Apply patch. rdar://problem/50871594
+
+ 2019-05-31 youenn fablet <youe...@gmail.com>
+
+ REGRESSION(245357): Netflix, Hulu, Amazon, YouTube Rental video playback crash at com.apple.WebCore: WebCore::WebKitMediaKeys::setMediaElement
+ rdar://problem/50871594
+
+ Do not cast WeakPtr<MediaProducer> into WeakPtr<HTMLMediaElement>.
+ Instead, make HTMLMediaElement again a CanMakeWeakPtr<HTMLMediaElement>
+ and directly create WeakPtr<HTMLMediaElement>.
+
+ For MediaStreamTrack, rely on weakThis to know whether 'this' is still alive and use 'this' directly.
+
+ Manually tested.
+
+ * Modules/mediastream/MediaStreamTrack.cpp:
+ (WebCore::MediaStreamTrack::applyConstraints):
+ * html/HTMLMediaElement.h:
+
2019-05-30 Kocsen Chung <kocsen_ch...@apple.com>
Apply patch. rdar://problem/50801017
Modified: branches/safari-607-branch/Source/WebCore/Modules/mediastream/MediaStreamTrack.cpp (246000 => 246001)
--- branches/safari-607-branch/Source/WebCore/Modules/mediastream/MediaStreamTrack.cpp 2019-05-31 23:43:29 UTC (rev 246000)
+++ branches/safari-607-branch/Source/WebCore/Modules/mediastream/MediaStreamTrack.cpp 2019-05-31 23:49:14 UTC (rev 246001)
@@ -331,16 +331,16 @@
m_promise = WTFMove(promise);
auto weakThis = makeWeakPtr(*this);
- auto failureHandler = [weakThis, this] (const String& failedConstraint, const String& message) {
- if (!weakThis || !m_promise)
+ auto failureHandler = [weakThis] (const String& failedConstraint, const String& message) {
+ if (!weakThis || !weakThis->m_promise)
return;
- m_promise->rejectType<IDLInterface<OverconstrainedError>>(OverconstrainedError::create(failedConstraint, message).get());
+ weakThis->m_promise->rejectType<IDLInterface<OverconstrainedError>>(OverconstrainedError::create(failedConstraint, message).get());
};
- auto successHandler = [weakThis, this, constraints] () {
- if (!weakThis || !m_promise)
+ auto successHandler = [weakThis, constraints] () {
+ if (!weakThis || !weakThis->m_promise)
return;
- m_promise->resolve();
- m_constraints = constraints.valueOr(MediaTrackConstraints { });
+ weakThis->m_promise->resolve();
+ weakThis->m_constraints = constraints.valueOr(MediaTrackConstraints { });
};
m_private->applyConstraints(createMediaConstraints(constraints), WTFMove(successHandler), WTFMove(failureHandler));
}
Modified: branches/safari-607-branch/Source/WebCore/html/HTMLMediaElement.h (246000 => 246001)
--- branches/safari-607-branch/Source/WebCore/html/HTMLMediaElement.h 2019-05-31 23:43:29 UTC (rev 246000)
+++ branches/safari-607-branch/Source/WebCore/html/HTMLMediaElement.h 2019-05-31 23:49:14 UTC (rev 246001)
@@ -126,11 +126,10 @@
: public HTMLElement
, public ActiveDOMObject
, public MediaControllerInterface
- , public CanMakeWeakPtr<HTMLMediaElement>
, public PlatformMediaSessionClient
, private MediaCanStartListener
, private MediaPlayerClient
- , private MediaProducer
+ , public MediaProducer
, private VisibilityChangeClient
, private ApplicationStateChangeListener
#if ENABLE(VIDEO_TRACK)
@@ -188,8 +187,6 @@
MediaPlayerEnums::VideoGravity videoFullscreenGravity() const { return m_videoFullscreenGravity; }
#endif
- using CanMakeWeakPtr<HTMLMediaElement>::weakPtrFactory;
-
void scheduleCheckPlaybackTargetCompatability();
void checkPlaybackTargetCompatablity();
void scheduleResolvePendingPlayPromises();
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes