-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
jsc_fuz/wktr: *flaky* RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(!retai…
…nedPointer || !m_controlBlock->objectHasBeenDeleted()); in MediaRecorderPrivateWriter::compressedVideoOutputBufferCallback MediaRecorderPrivateWriterCocoa.mm:107 https://bugs.webkit.org/show_bug.cgi?id=257780 rdar://109659987 Reviewed by Eric Carlson. After the introduction of ThreadSafeRefCountedAndCanMakeThreadSafeWeakPtr, we are now lazily creating our weak pointer on various threads, and this can happen while destroying the object in main thread. To make sure we do not end up in that situation, we are now closing MediaRecorderPrivateWriter before destroying it. In closing, we destroy the compressors which are the ones calling the callbacks that can create the weak pointers. * LayoutTests/fast/mediastream/mediarecorder-close-expected.txt: Added. * LayoutTests/fast/mediastream/mediarecorder-close.html: Added. * Source/WebCore/platform/mediarecorder/MediaRecorderPrivateAVFImpl.cpp: (WebCore::MediaRecorderPrivateAVFImpl::MediaRecorderPrivateAVFImpl): * Source/WebCore/platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.h: * Source/WebCore/platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm: (WebCore::MediaRecorderPrivateWriter::~MediaRecorderPrivateWriter): (WebCore::MediaRecorderPrivateWriter::close): * Source/WebKit/GPUProcess/webrtc/RemoteMediaRecorder.cpp: (WebKit::RemoteMediaRecorder::~RemoteMediaRecorder): Originally-landed-as: 259548.822@safari-7615-branch (3282e8c). rdar://113224891 Canonical link: https://commits.webkit.org/266596@main
- Loading branch information
1 parent
6d13b16
commit b08d868
Showing
6 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
PASS if not crashing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<body> | ||
<div>PASS if not crashing</div> | ||
<script> | ||
if (window.testRunner) | ||
testRunner.dumpAsText(); | ||
|
||
onload = async () => { | ||
for (let i = 0; i < 25; i++) { | ||
await caches.has('a'); | ||
const stream = await navigator.mediaDevices.getUserMedia({video: true}); | ||
const mediaRecorder = new MediaRecorder(stream); | ||
location.hash = 'x'; | ||
mediaRecorder.start(); | ||
} | ||
}; | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters