Skip to content

Commit dfbdfe7

Browse files
[EME] Keep MediaKeySystemAccess alive in createMediaKeys() async task (#1364)
Bring back piece of code from upstream that is missing in 2.38 Original PR: #922
1 parent f8cd370 commit dfbdfe7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Source/WebCore/Modules/encryptedmedia/MediaKeySystemAccess.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ void MediaKeySystemAccess::createMediaKeys(Document& document, Ref<DeferredPromi
6767
// When this method is invoked, the user agent must run the following steps:
6868
// 1. Let promise be a new promise.
6969
// 2. Run the following steps in parallel:
70-
document.eventLoop().queueTask(TaskSource::MediaElement, [this, weakThis = WeakPtr { *this }, weakDocument = WeakPtr { document }, promise = WTFMove(promise)] () mutable {
70+
queueTaskKeepingObjectAlive(*this, TaskSource::MediaElement, [this, weakThis = WeakPtr { *this }, weakDocument = WeakPtr { document }, promise = WTFMove(promise)] () mutable {
7171
RefPtr protectedThis = weakThis.get();
7272
if (!protectedThis)
7373
return;

0 commit comments

Comments
 (0)